We have strange behaviour in Visual Studio 2015.
If a teammate updates some nuget packages the other colleague is getting reference errors as shown in the picture. You are not able to build.
If we click on the erroneous reference the error disappears and everything works as expected. You are able to build.
What is causing this error? This is quite annoying...
Anybody got a solution how to come over this?
Related
I work with Unity, and recently I came across some sort of bug with Visual Studio. For some reason one day the Script Editor stopped working.
When I first open it up through Unity, it would open as usual and seem fine, but after 5 seconds of interaction, Visual Studio would then freeze and crash without an error report. Following tries with the editor would just crash almost right away.
I did some research and found out that it was some sort of problem with Unity's MEF Cache, the Microsoft Documentation would ask me to do the following: Delete the following file: "%localappdata%\Microsoft\VisualStudio<version>\ComponentModelCache" and if the problem continues, I should run this line of code on VS' CMD as a administrator "devenv /setup".
I tried both methods with Visual Studio, but neither seemed to work, only to return to being fine for 5 seconds before freezing and crashing.
I have updated Visual Studio 2017 to the newer version and performed the same method, but the problem persists.
I would like to know if anyone have any solutions to my situation, if I should try reinstalling Visual Studio, try to reinstall Unity or just use another Script Editor.
edit: Just to inform, the version of Unity I was using was 2021.2.8f1. But I don't know if it matters since the bug didn't seem to depend on the Unity version.
I managed to fix the issue by installing Visual Studio 2022
I've used the Nuget Package Manager in Visual Studio 2017 to install StyleCop.Analyzers, which I'm very happy with. However, every time I close and re-open Visual Studio, StyleCop is no longer listed in the analyzers.
The only way I can get it back to analyzing my code is to uninstall it from Nuget, then reinstall it, and go through the process of enabling/disabling rules per that project. After that, it will work properly. How do I keep StyleCop.Analyzers working when I restart Visual Studio?
It looks like the issue was Unity, so this is a very niche problem. There are a couple attempts at solving it listed here:
https://forum.unity.com/threads/unity-and-stylecop-analyzers.639784/
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.
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).
I'm trying to create my own VSIX package using the Project template. But when I actually launch it, it doesn't appear to be loading anything. That is, when running the project, it opens up another copy of visual studio, but it doesn't actually load up my plugin. I've compared my plugin to the other sample templates, and I just don't see anything wrong. It seems like it should be pretty straightforward. Are there any other steps besides creating the project that I have to do?
Are you using the visual studio experimental instance for debugging? You can enable this in the Project properties (right click your project and choose properties). Go to the 'Debug' tab and add the following line to 'Command line arguments': /rootsuffix Exp
More information about the experimental instance can be found on msdn.
I spent an entire day trying to reset Visual Studio (2015 Community Edition) by unloading features, deleting the cache directory, using the install to repair -- all with no success.
I finally uninstalled Visual Studio with success. When I initially installed Visual Studio, I had packages errors, like Python, that failed to load, but my Test Explorer worked beautifully. The test Explorer package stopped working in time. After re-installation, everything worked without any package load errors. Also, pay attention to the xml error files, because mine produced exceptions thrown by the package. (The xml error file is reported in the error dialog when Visual Studio informs the package failed to load.