none
Cannot open C# projects in Visual Studio 2012

    Question

  • Hello,

    I installed  Visual Studio 2012 (en_visual_studio_professional_2012_x86_dvd_920779), on a Windows 7 64x with Visual Studio 2010 also installed.

    I cannot create or open C# project, and I receive the error:

    Project <Name> could not be opened because the Visual C# 2012 compiler could not be created. Error creating instance of managed object 'Microsoft.VisualStudio.CSharp.Services.Language.ManagedObjectFactory' (Error code is 0x80131513).

    Reinstall did not solve the issue.

    I read this similar post for older versions of visual studio:

    http://social.msdn.microsoft.com/forums/en-US/Vsexpressinstall/thread/04be49aa-de6b-4f45-9a27-86e3f214a0fe/#3467254

    but devenv /ResetSkipPkgs didn't work for me

    I also looked with regedit for

    [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\Packages],

    but I only have [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0], without Packages, so I didn't try to edit any keys yet.

    Any idea?

    Thank you for your help.

    Thursday, August 16, 2012 4:00 PM

Answers

All replies

  • I have the same issue :(
    Thursday, August 16, 2012 4:33 PM
  • I looked through my list of installed application, and the installation of RTM did not update my RC release. I'm now trying to uninstall the RC and any other SKUs I have on my machine to see if that resolves the issue.
    Thursday, August 16, 2012 4:37 PM
  • I have the same issue, very bad:((

    I had VS 2010, so I removed it, removed VS 2012, reinstalled VS 2012, but it's still the same. I can open an existing project, though. I can also create a VB project, but not C#.

    • Edited by GerardF Thursday, August 16, 2012 5:30 PM
    Thursday, August 16, 2012 5:16 PM
  • After uninstalling RC and a stale Express SKU I found on my machine, the C# compiler successfully loads and everything is good!
    Thursday, August 16, 2012 5:17 PM
  • I am having the same issue. I uninstalled the RC before installing the RTM version, but didn't try to manually edit any configurations. Any help would be greatly appreciated :)
    Thursday, August 16, 2012 6:59 PM
  • Same issue here... I also uninstalled everything, cleaned up files/folders/registry... still no joy. I also started VS with the /log parameter and on the log I can see several warnings:
    • Unexpected system error mode before loading package [Visual Studio Component Enumerator Package]
    • Unexpected system error mode before loading package [Visual Studio Common IDE Package]
    • Unexpected system error mode before loading package [File Change Manager Package]
    • Unexpected system error mode before loading package [Visual C# Project System]

    and a lot more... I first installed the web-based version, then removed, clean up, tried to install the downloaded version, then removed (again), clean up... now I'm downloading the ISO, but I don't think that will solve anything...

    Edit1: The ISO didn't work either... also, it is strange that the problem seems to be related to C#... if I try to create a VB project, I don't have any problems, but if I try to create a C# project (web, console, whatever) I get a "Project xxx could not be opened because the Visual C# 2012 compiler could not be created. Error creating instance of managed object 'Microsoft.VisualStudio.CSharp.Services.Language.ManagedObjectFactory' ... Error code is 0x80131513"

    Any ideas?


    Marcelo Volmaro


    Thursday, August 16, 2012 10:00 PM
  • I had the same issue. In my case problem was in conflict between VS2012 and WP8 SDK, so uninstalling SDK helped.
    Friday, August 17, 2012 9:10 AM
  • Looking I've found that the error code means MissingMethodException (from msdn:designed to handle cases where an attempt is made to dynamically access a renamed or deleted method of an assembly that is not referenced by its strong name), so it seems that the VS RC uninstaller is leaving some leftovers and the release version it is not overriding them.

    Another user on another forum said it solved the issue by removing all, installing the RC and on top of it (so, without uninstalling it) installed the final.

    Will try... downloading the RC now...


    ____________________ Marcelo Volmaro

    Friday, August 17, 2012 3:38 PM
  • Hi folks,

    I have reported the issue on Connect website, the URL is as below.  I try to get product engineers investigate it: http://connect.microsoft.com/VisualStudio/feedback/details/758520/cannot-create-or-open-c-project-vs2012rtm

    Please follow up with it.

    thanks.


    Forrest Guo | MSDN Community Support | Feedback to manager

    Friday, August 17, 2012 3:42 PM
    Moderator
  • I have the RTM VS 2012, and I am experiencing the same errors - but only on the "Application", "Build", "Build Events" and "Reference Paths" tabs of a C# project properties.

    Keith

    Friday, August 17, 2012 5:01 PM
  • Hi Irina,

    Does the problem continue?  If so, would you help collect the Visual Studio setup log? Team is following up the issue on connect website:

    You can get the log files with the following steps:
    1) Download collect.exe from the link below. <http://go.microsoft.com/?LinkId=8967043>
    2) You may choose to save the tool for later use, or to run directly.
    3) The utility creates a compressed cabinet of all the VS and .NET logs to %TEMP%\vslogs.cab.

    Please either upload it to the connect issue above, or share it on Skydrive: http://skydrive.live.com

    It's encouraged that each of you can share the log, we'd like to get log as soon as possible.

    thanks & regards,


    Forrest Guo | MSDN Community Support | Feedback to manager

    Monday, August 20, 2012 5:09 AM
    Moderator
  • Hello,

    I tried to uninstall .NET fr, VS2010 and related components and install only .NET fr 4.5 and VS2012, but i get the same error when i create a simple Console App.

    I attached the log here https://connect.microsoft.com/VisualStudio/feedback/details/758520/cannot-create-or-open-c-project-vs2012rtm

    Thank you for your help.

    Monday, August 20, 2012 8:11 AM
  • Thank you Irina.

    Forrest Guo | MSDN Community Support | Feedback to manager

    • Proposed as answer by nhusovic Wednesday, August 22, 2012 2:20 PM
    • Unproposed as answer by nhusovic Wednesday, August 22, 2012 2:20 PM
    Monday, August 20, 2012 8:27 AM
    Moderator
  • Hello,

    A fix posted today on stackoverflow finally did the trick for me.

    http://stackoverflow.com/questions/11988077/plain-c-sharp-editor-in-visual-studio-2012-no-intellisense-no-indentation-no

    Check out Oleg Tkachenko's response about an "interop assemblies unexpectedly installed into the GAC, while it shouldn't be"

    I didn't have the value he mentions in registry, so I only run "gacutil /u Microsoft.VisualStudio.CSharp.Services.Language.Interop"

    I can create c# projects, build existing ones and i have autocomplete.

    Thank you all for your support.

    • Proposed as answer by RobertBriggs Tuesday, August 21, 2012 5:51 PM
    • Marked as answer by IrinaM Friday, August 24, 2012 10:54 AM
    Tuesday, August 21, 2012 7:03 AM
  • i had the same problem, following the post on stackoverflow from IrinaM solved the problem for me.

    I had to delete the key in the registry and also run "gacutil /u ..." from an administrative vs 2012 native command prompt.

    Thanks!!

    Mark

    Thursday, September 13, 2012 4:03 PM
  • hi!

    I had this problem

    Solution

    1. Open exe, VS2012 x86 Native Tools Command Prompt (Run as administrator).

    Path: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Visual Studio 2012\Visual Studio Tools

    2. Then run gacutil /u Microsoft.VisualStudio.CSharp.Services.Language.Interop

    This will successfully uninstall the service from GAC, which was causing the problem.

    Open the VS 12 again and start creating projects.....

    good luck.

    • Proposed as answer by jamal kaksouri Wednesday, May 15, 2013 4:00 PM
    Wednesday, May 15, 2013 4:00 PM