Strange message in Solution Explorer.
ef1000 "possible sql injection vulnerability"
It doesn't prevent compile, no errors, no warnings, no messages in "Errors List".
No similar messages in the output on compile...
Click doesn't move focus to "vulnerability" line. No referenced file/line related information.
But there is context menu with "Delete" button which doesn't work (nothing happens). There are no Analyzers related entries in proj file.
Looks like common package references bug. How to fix it?
I went to that location C:\Users\User.nuget .. etc and deleted the package. I closed visual studio and reopened it. The package was restored and the error was gone. I was using a .net framework application in visual studio at the same time and was opening and closing the core solution repeatedly so I'm thinking the package got corrupted somehow.
Just unload the project and reload it again, the warning is disappeared.
The source
UPDATE for Visual Studio 2019:
If you use Visual Studio 2019 you have always to get last version. So if there are any updates available just install it.
Click on Help => Check for Updates => Update.
As I start visual studio 13 it raises unknown error by saying "Microsoft Visual Studio 2014 has stop working" without any further explanation.
Here's what I've tried to solve this problem;
I reinstall .Net framework
I repair, uninstall-install Visual Studio
2013
I installed another version of VS13
but still the problem persists. Do you have any further suggestion ?
I am using Windows 8.
I've run into a similar situation described here. Once i find a solution, i will post it there.
As a first attempt i would try to generate a logfile via the /log option and see if there is a problematic extension that you could disable/deinstall, e.g. NuGet.
You say you reinstalled VS2013, so the problem might be related to settings. If reverting all settings is an option for you, see this thread on how to truly really reset your settings. This involves calling your devenv.exe with special parameters (e.g. in a cmd.exe), removing files and tinkering with the registry.
I have found the solution to this or a similar problem if you are starting Visual Studio by loading a solution file.
The symptoms are that a solution that previously could be loaded with no problems, suddenly starts having the unknown error box appear for every project in the solution. Sometimes you can't see the relationship to the continuous reappearance of the error message and the project loading, because you don't have the solution explorer open, so you aren't even aware there is a correlation.
The solution to this is to use task manager to stop visual studio, confirm with visual studio that you wish to shut it down and then look for the .suo file for the solution you are trying to load. In VS2012 it appears in the same directory as the solution file and has the extension solutionname.v11.suo while in VS2015 it appears in a hidden .vs directory under the location where the solution file is found, in a folder named for the solution.
Delete this file and the problem will go away.
The .suo file contains the user preferences for the solution you are trying to load and it is perfectly safe to delete it as it is regenerated when you load the solution.
If you are getting the unknown error when you haven't tried to load any solutions, this is probably not the right answer.
I have serious problem with my modeling project, created in Visual Studio 2010. Today I was renaming my project and solution name and path's. And now it throws me some kind of error, when I wish to open any diagram. And then i role everything back to the first settings, but still the same.
Error:
Cannot load
'C:\Users\Klemen\Trgovina\Knjiznica\UMLUseCaseDiagram1.
usecasediagram': You must open this UML diagram inside the Visual
Studio modeling project that was used to create it.
Does anyone know, how to make my project work again?
Thanks
Do you have any Add-On/Plugin ? I had a conflicting add-on and after removing it, it is working again.
When I'm trying to change the default Image of a Control on Windows Forms in Form Designer (no matter where on which control) I get this error:
Error message: An item with the same
key has already been added
I tried to delete and recreate the Resources.resx file.. I assured that only 1 resx file with these keys exist.. (in fact that's my only resource file) but it still does not work.
I have som strings in it and some images. That's all.
Any idea?
I had this problem too. The solution is to never create a .resx file with the name "Resources.resx" because it conflicts with the "Resources.resx" files that can be automatically created in the project's properties dialog.
Just right-click and rename the "Resources.resx" and you should be able to change images perfectly.
If you really want to figure out what is going wrong, you can try and attach a debugger to VS and break while devenv.exe is showing the message box. From the call stack it should be obvious what VS is doing. Here are more details about debugging Visual Studio: http://blogs.msdn.com/kirillosenkov/archive/2008/12/07/how-to-debug-crashes-and-hangs.aspx
If you like, you can post the call stack of the Visual Studio main thread here and I can try to investigate what is going on.
Was getting this error while adding a project to a solution. None of the above metioned scenarios applied but restarting visual studio fixed this. Silly, yes.
Visual studio version - 2015 enterprise.
I had the same issue. But in my case it was because I had twice the same file listed in my resources folder.
Probably a problem after a merge.
when loading up a solution in VS2008 I get:
An error was encountered while
opening associated documents the last
time this solution was loaded.
Document load is being skipped during
this solution load in order to avoid
that error.
How can I find which document is causing the problem?
I can't say I've seen this particular error, but I'm wondering if that might be stored in the .suo file associated with your solution. The .suo is where VS tracks which files you had open previously, so maybe it tracks failed ones as well. You might try renaming or deleting that file and then reloading the solution to see if the error goes away. Unfortunately, those files aren't entirely human-readable, so if that proves to be the location, it may not be trivial to determine which file was at fault.
I cleaned my solution via Build->Clean Solution.
Then I rebuilded my solution. Seems to work for me.
edit: i use VS 2010
I've been shut down by this problem all morning, so I've been doing some forced research. here's a tidbit that may help, along with some links I've found (but IO haven't read them all yet).
First of all, the tidbit. It seems that if I can get the solution to open at all (which I can, the second time, when VS.NET skips the "Document loading" step), and then immediately do a Rebuild All, that might "fix" the problem (meaning, the problem will go away for a while and show up a few days later, but at least I can get some work done).
Of course, that may turn out to be a red herring, but it appears to hold true right now.
Next, here are some links I've found. I haven't read all of them, but they are about this problem or very similar ones, and they may help somebody.
http://social.msdn.microsoft.com/forums/en-US/vssetup/thread/cb73c8d6-077f-4220-aaf8-463039ee1d5f
Why does Visual Studio crash opening ASPX with MVC RC1
Resharper (R#) 4.5 and MVC (1.0) solutions cause Visual Studio 2008 SP1 to crash on solution load
http://www.lostechies.com/blogs/hex/archive/2009/03/02/hot-fix-available-for-visual-studio-2008-sp1-crashing-when-opening-up-aspx-files-views-on-vista-sp1-x64.aspx
http://www.chowamigo.co.uk/2009/10/fix-visual-studio-hangs-crashes-and.html
http://forums.asp.net/p/1384470/2942121.aspx#2942121
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=471570
http://blogs.msdn.com/jnak/archive/2009/02/26/fix-available-asp-net-mvc-rc-crash-in-a-windows-azure-cloud-service-project.aspx
I'm using VS2010 and had the same fault.
I removed the 2 SUO files associated to the solution and it worked fine.
It may not be possible to definitely determine which file is causing the issue. Similar errors have been reported with widely varying circumstances, except for the condition where there is at least 1 file that was still open for editing at the last time the solution was successfully opened and closed.
I've looked at this myself with WinDbg active, and the call stack is filled with a chain of DLLs in thread/module unload state. Most likely this is being caused by a race condition or other faulty multi-threading behavior in visual studio.
Here are other references you can view, in case others update them with additional information.
IDE Reports Error ... # Microsoft Connect
Error Loading Solution 100% of the time ... # Microsoft Connect
Error opening associated documents ... # Stack Overflow
Edit:
I should add that my conclusion of this being a race condition is based upon clues gathered while trying to create a minidump of the crash in Visual Studio with WinDbg; and prior history with similar unexplained bugs in older versions of Visual Studio.
In my exploration, WinDbg consistently reports that a minidump cannot be created for this crash because ReadProcessMemory has failed. The stack trace contains a trail of DllUnloads called for various reasons. There are no reports of this bug happening when there are no document views that were open at the last time the solution was closed. In combining these clues, my guess is that there are bugs in the order of instantiation; perhaps as two views of the same type are opened, one completes ahead of the other and causes the cleanup of a resource that is shared by both actions.
It is possible that this isn't a race condition or threading bug, though the symptoms strongly suggest it. Fortunately for myself and others who have chimed in with answers, when I've encountered this bug, deleting the .SUO file (and .NCB file in older versions of Visual Studio) fixes the problem.
I had this issue as well. I deleted the *.suo file associated with the solution. When I attempted to load the solution again I was prompted with the same error except that this time Visual Studio didn't crash instantly. When I clicked "ok" on the error dialog the solution seemed to load just fine.
Received this "document load skipped" error, then an "object reference not set to an instance of an object" error when I tried to close VS. I fixed both by deleting:
C:\Users{user}\AppData\Local\Microsoft\VisualStudio\ComponentModelCache and
C:\Users{user}\AppData\Local\Microsoft\VisualStudio\devenv.exe.config
C:\Users{user}\AppData\Local\Microsoft\VisualStudio.NETFramework,Version=v4.0,Set=Extensions,Hash=6D09DECC.dat
C:\Users{user}\AppData\Local\Microsoft\VisualStudio.NETFramework,Version=v4.0,Set=Extensions,Hash=9951BC03.dat
C:\Users{user}\AppData\Local\Microsoft\VisualStudio.NETFramework,Version=v4.5.2,Set=RecentAssemblies,Hash=0.dat
I found those first two were causing other errors related to missing packages when I'd load up my project, and the "object reference not set to an instance of an object" when trying to close VS, and was receiving errors from the JavaScript Language Service, complaining of missing js files from those last .NETFramework files (which I do not get if I do not add them back in):
01:10:11.7550: Referenced file 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\JavaScript\References\libhelp.js' not found.
01:10:11.7550: Referenced file 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\JavaScript\References\sitetypesWeb.js' not found.
01:10:11.7550: Referenced file 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\JavaScript\References\domWeb.js' not found.
01:10:11.7550: Referenced file 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\JavaScript\References\underscorefilter.js' not found.
01:10:11.7550: Referenced file 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\JavaScript\References\showPlainComments.js' not found.
I might just need to re-install/repair the JavaScript Language Service plug-in, and it's possible those were the files getting "skipped". But I would try getting rid of all of the files I listed above and restarting Visual Studio. They should get re-created, except for the .NETFramework files. If you like, you can back the .NETFramework files up, then delete them, and then paste them back in one at a time and relaunch VS between each file copy-back that you do, to narrow things down, as I did.
Posted my process I used to figure this out at Visual Studio 2015 error "Object reference not set to an instance of an object" after install of ASP.NET and Web Tools 2015 (RC1 Update 1)
I received this error today in Visual Studio 2019. I solved it in 2 steps
Build | Clean Solution
Rebuild Solution
I'm uncertain which of the 2 steps above did the trick, but I am certain that it is fixed. I would be nothing without Stack. Thank you everyone for posting on this site.