entity framework not available in Visual Studio 2010 - visual-studio-2010

I have a strange error with Visual Studio 2010 in that Entity Framework doesn't work for me.
In the toolbox down the side the icon for the EntityDataSource (and several other components) shows a text snippet icon:
Then when I try to insert it via double clicking I just get a massive bunch of text inserted instead of the control:
I have tried installing the latest Entity Framework 4.1 standalone installer. I have also installed the Visual Studio 2010 SP1. I did have the SP1 RC installed before but the install notes for SP1 state clearly that you don't need to uninstall the RC before installing the final SP1.
I have been using Linq to SQL for a long time now and finally wanted to start learning EF so I am not sure how long this has been broken and I just haven't noticed.
It seems that the issue has occurred for others:
http://connect.microsoft.com/VisualStudio/feedback/details/622189/entitydatasource-control-is-missing-from-my-visual-studio-2010-ultimate-toolbox
But Microsoft closed the bug as not-reproducible. I commented on there about a month ago but nothing has been responded to.
As I stated in that thread I did try the fix suggested but it didn't work.
Does anybody have any idea what steps I can take to get this working?

It seems that the most obvious solution doesn't occur until after you have spent 10 minutes taking screenshots and posting up a question on SO.
I have just solved this issue by right clicking on the toolbox and choose Reset Toolbox.

Related

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.

Visual Studio 2013 - Cannot merge Views

For a couple of weeks now I have been unable to merge Views within Visual Studio 2013 in response to conflicts when getting Source Code from Visual Studio Team Services. I am sure I used to be able to this (we recently moved from Visual Studio Professional 2012 so I cannot be one hundred percent certain - automerging may have been sufficient in the early days of the project).
The "Accept Merge" and move to next change/conflict buttons are all greyed out and inoperable. See screenshot snippet-
This originally only happened with Views, but now seems to affect some other classes. Changes are highlighted and indicated on the scroll bar so the diff tool otherwise appears to be functioning. This only originally affected me, but now affects a new colleague into the team.
I can still either Keep Local Version or Take Server Version but this is rarely sufficient. This leaves me manually altering the local copy to apply changes highlighted by the merge tool. (Edit - See a better workaround in "Second Update" below).
Has anyone come across this before?
Visual Studio 2013 Premium (patch RTM/Update 1/Update 2 - all with the same problem), with Resharper 8.2 (originally 8.0.2) C# and Web Essentials installed. Running on Windows 7 Professional x64.
Project is ASP.NET 4.5 using MVC 5.1.2 (now additionally updated from MVC 5 where the problem first occurred) (upgraded from MVC 4 following the upgrade instructions on the ASP.NET website) in C#, using latest versions of Razor (3.1.2) and Entity Framework (6.1.0 RTM).
Edit: Initially a repair install of Visual Studio 2013 appeared to have fixed the issue. It has now however returned exactly as it was before. Since it took an hour to do the repair I cannot repeatedly do this in order to merge views. I am currently able to round trip the solution between Visual Studio 2012 Update 4 and Visual Studio 2013 in order to do merges in Visual Studio 2012 where it is working normally.
Second Edit: I am currently manually resolving conflicts by selecting the desired code (local/server), saving the merge window and then closing it which will prompt to accept the merge result. This seems to function but is obviously sub-optimal. It may however be helpful for other users.
In the event, installing Resharper 8.1 on top of 8.02 appears to have fixed it fixed it briefly before the problem returned yet again. I had previously completed a repair install of Visual Studio Premium 2013 as well - which briefly seemed to have fixed it before it broke again. I only mention it in case the fix is cumulative.
I am unclear if it was a bug in Resharper that was somehow preventing the merge, or a persistent problem with the installation that the upgrade cleaned up (Resharper removes previous versions and then installs updates, rather than attempting to install over the top). Update - I am extremely confident that this is not related to ReSharper and that it was the configuration of Visual Studio as a result of re-installing the extension and not the extension itself that fixed the issue.
In either case, the issue (for now) seems to have disappeared and this seems to be related to the upgrade, or is an extremely strong co-incidence.
Colleagues with the same versions of Visual Studio and Resharper, working on the same project, the same version of Windows and (in one case) the same hardware were not affected, so it seems likely it is an edge case niche issue caused by corrupted data somewhere.
I have a current working theory that this is related to different patch versions of Visual Studio (for example Visual Studio 2012 Update 2, Visual Studio 2013 RTM, Visual Studio 2013 Update 1, Visual Studio 2013 Update 2. This only affects Visual Studio 2013 for us.
Simple solution I use is carry on with your manual merge process once you are done simply Close the Merge-* tab (the one you are using to merge files) this will bring up a prompt for confirming if you want to Save the changes made (this is the merge changes you made to your local file) click 'yes' Now it comes back to Resolve Conflicts tab and brings up another prompt asking if you want to Accept Merge Result, click 'yes'(this is same as the button Accept Merge)
Since you have VS2012 installed and merge is working there, you can create a link to its TF.exe in VS2013, similar to one on the picture below, and fix the issues there. Set Command to c:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\TF.exe and Arguments to resolve.
You do that in Tools->External Tools.

Visual studio closes when debugging (after install update 2)

I just installed the visual studio update 2 on two computers and now when I try to debug my program, the visual studio closes!!
It doesn't show any exception, just closes.
What should I do? I tried to reinstall the visual studio and install again but I got the same problem.
According to Marc Paine (Visual Studio Debugger QA Lead):
You are using the Visual Web Devleoper version of VS, correct? If so, we have a known bug in this CTP only affecting VWD. You can copy symsvr.dll from any other install of VS (other express versions or pro) into the common7\ide directory for VWD. That should fix the problem. We have fixed this problem already and it should be avialable in the next CTP.
Unfortunately it doesn't worked for me... so I tell it in the support forum but Microsoft just marked my feedback as closed and didn't answer me anymore...
So unfortunately my solution was formatting my computer.
It's a CTP right now, which isn't really supposed to be stable; on the contrary - it has experimental features. So it shouldn't really surprise you that it crashes. Gather as much data as possible and send it to Microsoft; hopefully they'll fix it.

Webmatrix 2 Beta and Visual Studio 10 Issue

I just downloaded the Webmatrix 2 Prerelease Beta-
http://www.microsoft.com/web/gallery/install.aspx?appid=webmatrix&prerelease=true
I played around and made a database with some tables. Then I went to open up Visual Studio 2010 and I was prompted to install some missing components. That all went well except when the plaform installer tried to install ASP Razor 2 Syntax for Visual Studio. I get the following error-
"The product you are trying to install is not supported on your operating system. Click here for more information."
I click, nothing useful comes up. Has anyone seen this and know a solution? Or am I just a little too early and have to wait?
Thanks for your time.
This sounds like a bug in pre-release software. Could you report it here?
https://connect.microsoft.com/webmatrix/Feedback

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