Error when generating database from model in Visual Studio 2013 - visual-studio-2013

I have installed VS2013 but still have VS2012. In VS2013 I cannot generate a database from a model in Entity Framework. I get the following error message:
The files in the error message do exist!
Does anyone have any idea how I can fix this?

Your tip about checking the drive made me see what I should have seen before.
The environment variable VS120COMNTOOLS had the wrong drive letter. Can't remember, but I initially installed VS2013 on another drive and then changed it back to C. Anyway setting it correctly fixed the problem.
/Peter

I believe VS is not updating the VS120COMNTOOLS variable correctly when reinstalling VS to a different drive. See this SO thread for an extended answer.

Related

Package management initialization failed: Access Denied Error when opening Visual Studio 2017

I'm getting the following error when opening VS 2017 on Windows 7 64-bit:
Package management initialization failed: Access Denied.
You can get more information by examining the file:
C:\Users\<username>\AppData\Roaming\Microsoft\VisualStudio\15.<version>\ActivityLog.xml
It all started after I added my solution to SVN. I had no problems until I tried to add a file and got the following error:
Value does not fall within the expected range
I followed the steps mentioned in this answer and did a 'devenv /setup', after that I started getting the Package management initialization failed: Access Denied. error when opening VS. Now Visual Studio doesn't even start.
Has anyone else experienced this problem and resolved it?
Edit:
I tried starting as an administrator and it worked. But otherwise it doesn't.
It turns out that this is a bug, that hasn't yet been resolved. This error also occurs when starting Visual Studio after an update.
But there is a workaround from this thread that worked for me,
Delete the privateregistry.bin file from the following folder:
C:\users\%username%\Appdata\Local\Microsoft\VisualStudio\15.0_<version id>\
This is however a temporary fix and resets the user's preferences. That's why it worked when I started it as an administrator, since the problem is user specific.
Update
This bug is supposedly fixed in the latest versions of Visual Studio. But for the bug fix to work, the old privateregistry.bin file still needs to be deleted.
#Xpleria, the answer works fine. To open the AppData folder, you can type:
%AppData%
directly in the Address bar.
https://support.pointlogic.com/faq/troubleshooting/accessing-the-appdata-folder
I had this issue after installing SSDT for VS 2017 in a new vs instance.
So it's like I have two visual studio in my machine.
To fix that, I uninstalled the SSDT package, restart my machine and reinstall it on the initial installed visual studio instance.
I had the same problem and when I looked at
C:\Users\UserName\AppData\Local\Microsoft\VisualStudio
I noticed that I had miltiple versions of visual studio meaning the current update might not have been successfull, as I was not able to delete the file that #Neil Patro says, I simply deleted the entire updates and all was ok.
I guess adding this as an answer might help.
Happened to me with an existing VS instance running, where I disabled an extension (VsChromium). Closing all VS instances solved the error and VS starts normally.
Env: VS 2019 Pro, Win 10 x64, running as current user.

'VSPackage' package did not load correctly

I'm having this error pop up once I start Visual Studio professional 2013 with update 3.
I don't know whats going on and also when I created a web form and try to put items from the toolbox into a table in my code it doesn't let me. the items are dim and can't select them any more. before I would make a table and try to add Labels, textbox, etc and it wasn't a problem.
Visual Studio 2013 Update 4
Tools -> Extensions and Updates
Disabled "Release Management for Visual Studio 2013 v2.1".
That worked for me.
I got the same issue today, but the error message should be giving you some guidance.
Take a look at mine, it tells me to check the "ActivityLog.xml" for more information.
After looking at the entry my error showed me that it ocured the evening before around 5:30pm and I know I was installing the Visual Studio 2013 Update 4 at this time. So it seems I had a problem with my Update installation.
(Sorry maybe someone can school me on how to properly load an image for viewing)
So I realized my problem was an install issue I created, yours might be an add-on or something similar that you just updated your Visual Studio with that corrupted your VS.
So a little more researching and asking some buddies at work and we tried doing this step in another SO article, which should have the same effect of fixing our package loading problem also.
the Provider package did not load.
After running the steps listed there my Visual Studio started up without any obvious issue.
Hope this helps.
Open ActivityLog.xml in a viewer (I've used Microsoft Edge) and you'll find the error. VSPackage is the "Developer Analytics Tools" extension for me.
The error is gone after uninstalling that package. You can obtain the package and attempt to reinstall from the Developer Analytics Tools page in the Visual Studio Gallery.
I uninstalled and reinstalled Visual Studio and the problem went away for a little bit. It eventually came back complaining about different packages.
Then I noticed my home directory was encrypted. I decrypted the directory and the problem went away.
If it is not an encryption issue, I'd try just uninstalling and reinstalling VS 2013.
Message could be shown in case of "Path" environment variable longer than 2048 characters. In that case, system doesn't work proply with system paths like %windir%.
If it's your case, shorten "Path" environment variable and everything works again.

the service microsoft.visualstudio.shell.interop.iselectioncontainer already exists in the service container

I recently installed Visual Studio 2013 Ultimate version on my machine. I'm just trying to create a sample windows form project and trying to open the designer / form by double clicking on Form1.cs and I'm getting this weird error message:
"the service microsoft.visualstudio.shell.interop.iselectioncontainer already exists in the service container"
My system is already having Visual Studio 2010 which is working smoothly from a long time. I then installed Visual Studio 2012 which was giving the same problem as above. So I went ahead with installing VS 2013 hoping that I might be able to get rid of this issue, but no use.
Once I click OK on the error windows, I can see the following "message" in the bottom Error List window:
"The file 'C:\Users\ABCD\Documents\Visual Studio 2013\Projects\WebSite1\WindowsFormsApplication1\Form1.cs' does not support code parsing or generation because it is not contained within a project that supports code."
I have spent 2-3 days searching various blogs like these, all of which talk about previous version of Visual Studio like VS 2005 / VS 2008:
https://connect.microsoft.com/VisualStudio/feedback/details/311949/the-service-microsoft-visualstudio-shell-interop-iselectioncontainer-already-exists-in-the-service-container
Form inheritance in Visual Studio 2008 doesn't work
I have even tried uninstalling and reinstalling VS 2013, again no use.
It would be really great if someone can help me out in fixing this.
I've just had the exact same error message.
After compiling the solution(F6 or Build->Build Solution) it worked fine for me.
To deal with your issue, please first make sure that you installed latest updates on your Windows 8 machine, and then repair VS2013.
During your repairing process, please temporally turn off your anti-virus/antispyware software and repair VS2013 with the Administrator privilege.
follow this link
The problem got resolved finally, after so many days and various frustrating tries to resolve the issue. I should thank Tim Atkins from Microsoft for helping me with resolving this issue.
Fix: When we tried 'gacutil /l system.design', we found that there were 3 variants of system.design; One from .Net 2.0 targetting MSIL, second from .Net 4.0 targetting x86 and last one also from .Net 4.0, but targetting MSIL.
On a working machine, there were only 2 entries, the .Net 4.0 one targetting x86 wasn't there. Hence we uninstalled this version using gacutil which did the magic. I was so relieved seeing the win forms popping up without any errors anymore :)
I changed the target framework from 4.5 to 4.6.1 and it fixed it for me. My assumption is sometimes when you change target framework back and forth and the process does not go through all the way (cancelling in the middle of changing it) - something happens that leads to this error. Hope that helps
I solved this be closing VS, deleting contents of the .vs folder where my solution is, restarting VS and recompiling.
Seems like one of those file/settings/caching problems that pop up now and then, might be after switching source branch.
VS2019, .net fw 4.6.2.
If your C drive (Where you are installing Visual Studio) does not have enough space, try moving some files from the C drive to another drives.

'exception has been thrown by a target of invocation' when starting up Visual Studio 2010

When I start up Visual Studio 2010 I often get the error 'exception has been thrown by a target of invocation' which prevents me from opening Visual Studio. A reboot of my computer makes the error go away, but a few days later it returns.
What causes this error and how can I get rid of it?
I've found a lot of questions on SO that mention this error when running their code in Visual Studio, but none when opening Visual Studio.
It seems the problem was that my system path became too long for Windows to handle: it was over the 2048 characters limit (hat tip to this article).
I had this issue with Visual Studio 2012 today. Something seemed to be gone wrong during the first setup, so it helped to delete these registry entries:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0_Config
Visual Studio will then setup again when you start it. You can also just rename it.
I had the same problem with Visual Studio 2012 and SQL Server Management Studio, solution was to reduce the SYSTEM PATH variable length.
Symptoms: After one instance of Visual Studio 2012 was started, any other attempt to start another or one of SQL Server Management Studio would fail. The computer reboot would allow me to start again a single instance of VS2012.
Repairing the VS2012 installation didn't help.
None of these solutions solved the problem with my Visual Studio 2012, but I finally managed to fix it by installing the latest Update 4 from the Visual Studio website
My path also seemed to affect accessing Advanced System Settings from Control Panel\system\Advanced system Settings so I was unable to edit the path.
Had to launch this from windows\system32 to display the Advanced System Settings dialog, then edit te environment variables from there.
A recent install of the MEAN stack had added a path statement for my user account. I removed this setting entirely and then VS2010 and the Advanced System Settings dialog started without problem.
BioGeek's answer fixed my issue. In my case, the overflow of system path not only break visual studio, it also break the GUI to change system path itself.
I got error on: Control Panel > System > Advanced system settings.
The workaround is run c:\windows\system32\SystemPropertiesAdvanced.exe.
I had a similar problem while trying to run the "Task Runner Explorer" in VS2015, I got an error:
"Exception has been thrown by the target of an invocation".
I solved it by reinstalling only the "Microsoft ASP.NET and Web Tools" patch (DotNetCore.1.0.0-VS2015Tools.Preview2.exe) from this link.
I received this error when I installed SQL Server Express 2014 on a machine that already had 2012. I installed it with tools, which apparently broke SSMS 2012. Specifically when trying to "Edit top 200 rows" the error was thrown.
Using SSMS 2014 seems to work fine.
To add to BioGeek's answer. You don't necessarily have to get rid of entries in your path, you can work around the character limitation by introducing more variables.
e.g.
PATH = {1800 CHARACTER LONG STRING}{500 MORE CHARACTERS}
You would add a EXTENDEDPATH variable, like so:
EXTENDEDPATH = {500 MORE CHARACTERS}
And finally you reference this variable in your PATH
PATH = {2000 CHARACTER LONG STRING};%EXTENDEDPATH%;
I'd recommend leaving at least 100-200 characters of breathing room in your path so you don't have to be babysitting the PATH environment variable every time you install something.
System Path variable is too long. Copy current content to notepad and remove repeated entries and unwanted enteries and copy back to path variable.
In my case this error was due to an invalid key in the web.config file. Try to revert last changes made to the file.
i had same problem but i figured out "connectionStrings" must be under "configSections" in the web.config
This problem occurs due to long path in your environment variable windows supports only 2048 characters.
In order to solve this problem you need to remove few environment varibale from your system from PATH.
I had the same problem with Atmel Studio 7. Resolved by deleting the *.componentinfo.xml file in the same folder as the project file.

VS2010 Crystal-Reports: "Invalid Keycode"

On a legacy product I successfully migrated to VS2010 about a month ago: When I open it today and try to launch the Crystal Reports editor I get an error "Invalid Keycode" and a blank editor screen.
VS2010
Windows 7, 64b
Most advice is pointing me towards "Reinstall VS2010" - but I've also found a few forum posts indicating a keycode fix or registry edit. I've tried a few of these, but I still get the error.
You've got to uninstall "Crystal Reports for Visual Studio 2010 - Beta x" and install the release version which can be downloaded from: http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_13_0.exe.
The beta expired on 12/31/2010
Acording with SENC4ME said, You can try to change the date of your system, change it to Nov/01/2010. I had the same problem y when I changed the date the problem was fixed.
Crystal Reports is no longer included with VS2010. I suspect that might have something to do with it. Here's a blog post from the company that owns it now that tells you why you should be happy about that. I don't understand much of it, but then again I also don't understand why companies like SAP are still in business.
Reinstalling / repairing Visual Studio is the only thing that helped me.
I have suffered from this issue for the last 2 days.
I think this issue occurred before installing Visual studio 2008. I originally installed Visual studio 2010 and Crystal report V13.
Make a back up copy of registry files of business objects by right clicking on the business object, then select export and then execute the registry file to your target machine.
If your OS installed into different directory then you have to make change the path and the common directory.
See screen shot for more help:
Reinstalling Crystal Reports 13.0.18 works for me, but I have to do it after any session in VS2010 where I touch the reports. Next time I try it I get the Invalid Keycode msgbox. This is mildly irritating to say the least.

Resources