Old Visual Studio project with ambiguous reference errors - c#

A client has given me an old (approx. 2010) .sln project for visual studio that they would like to have modified. The problem is that it is large and it now has a lot of errors in it from ambiguous references. The time it would take me to fix all the references is not worth the small change the client wants to make to the project. Is there a way of reverting this project so that I can open it without the errors? I have tried opening it in VS 2010 and VS 2013 but the errors are still there.
Any help would be greatly appreciated.

Related

Unity referances not working Visual Studio 2022

As seen in the image bellow, references are not showing up in visual studio.
I was just using visual studio and i closed the project opened some other project and opened the unity project again in visual studio.
But then none of the references shows up and i cant really fix it.
Any ideas on how to fix this?
In Unity Editor try:
Edit -> Preferences... -> External Tools -> Regenerate project files
This problem happened to me, I couldn't solve it, I reinstalled visual again and downloaded c# plugins and module so it worked
The code pair may not be able to compile due to not referencing the relevant library files and namespaces

CSS/JS errors clogging Visual Studio 2015 Error List in C# MVC Project

I have started using ASP.NET Core with Visual Studio 2015, and have been getting frustrated with the error list.
With visual studio 2013 only C# errors would show, but visual studio 2015 errors from js and css (which often come from minified libraries and packages i have imported) are clogging the area.
It wont stop the build, but it is annoying having to sift through them to find the CS errors.
I have looked up on google and here to find the answer, but am unable to find a solution.
I found the answer 5 minutes after posting bounty.
In the error list next to filters I had Build + intellisense on, once I changed that to only "BUILD" it gave the desired result

How to stop visual studio 2013 to change .sln version

i have a C# project that i work on using visual studion 2013, the project was created with visual studio 2010, and the entire project is located on a local server and i am using Team Explorer to access it.
the problem is that if i make changes to the project and check-in the Solution (.sln) to the server, and my co workers, that use visual studio 2010, try to open the solution they get an error that the solution was created with a newer version of visual studio.
is there any way to force visual studio 2013 to not change the version number in the solution file? so even though i make changes to the solution the version will not change?
thanks for the help guys, i just ended up creating a copy of the solution file so i'll have 2 .sln files, one for each version.
not the best solution i hoped for but it'll have to do.
thanks.

Visual Studio 2013 reporting erroneous "does not contain a definition for" error for recent extension methods

Visual Studio 2013 (vs) compiles a solution fine when manually building (i.e., it reports "Build succeeded", there are no errors in the error list, and running a program shows the latest changes). However, when vs starts building in the background (for Intellisense?), then errors start to come up for recently added extension methods. The extension methods are underlined in red, and right-clicking on them to "go to definition" results in an error that says "Cannot navigate to [method name]".
Extension methods that were created (in the same classes as the methods listed in the erroneous error messages) previous to when this started happening do not show up in the error messages.
I have done a build clean, to no avail.
I do not have resharper installed.
How do I reset the intelisense cache in Visual Studio 2013? I see instructions for Visual Studio 2008, but not for Visual Studio 2013.
For Visual Studio 2015, my solution didn't have an .sdf file, and restarting didn't help. However, the following steps fixed my problem:
Close Visual Studio (important)
Go to [solution folder]\.vs\[solution name]\v14
Delete the .suo file
Start Visual Studio
It turns out that closing all open files, then shutting down Visual Studio, and restarting fixed the issue. pff!
I had a similar problem that I resolved by deleting *.sdf file in the solution directory. VS2013 will re-create it.
UPDATE This is what I know now: https://stackoverflow.com/a/38708050/90475
After testing all above mentioned solutions simply clean and build worked for me.
In VS2010, the only thing that worked for me was removing and adding the reference again.
Very old question, but it happened to me also with VS2019. I have multiple projects in my solution: right-click on the project -> "Unload Project" for each one, and then reload them. This worked for me.
Clean + Build, or
Close all the files + restart VS + clean
Those didn't work (for me).

Visual Studio Extensibility Package 2010 and 2012. Is there a way to have one package for both?

A while ago I created a Visual Studio Package/Add-In for Visual Studio 2010 (for those curious: http://visualstudiogallery.msdn.microsoft.com/ea23f9a7-a942-45b2-87e6-5df6ff0444ff). If I try to download that and install it in Visual Studio 2012, it doesn't work, I get a version error.
So my first thought was to see what happens if I try to port it to 2012. I downloaded and installed the VS2012 RC SDK, and basically recreated the whole thing in a separate solution and it all works. What I noticed was that many of the assemblies I had to reference (Microsoft.VisualStudio.*) were now version 11 as opposed to version 10 (for obvious reasons). After copying and pasting all the code over, I got it to work correctly in Visual Studio 2012.
My question now is this: Is it possible to have one .vsix file for multiple versions of Visual Studio (I'm guessing no.) If not, what's the correct approach to take as far as uploading the different versions? Can I upload two versions of a .vsix? Will the Add-In manager in visual studio pick the correct one automatically? Do I need to create a new package e.g. "Visual Pastie 2012"? Just looking for some guidance.
Rename the VSIX package to give it a ZIP extension and open it up. You'll find a file called extension.vsixmanifest. Inside this XML file you'll find an element called SupportedProducts which should look like the following to work in VS2012.
<SupportedProducts>
<VisualStudio Version="11.0">
<Edition>Pro</Edition>
</VisualStudio>
</SupportedProducts>
HTH

Categories

Resources