4

When I open Visual Studio 2013 C# project in Visual Studio Code (v 0.1.0) editor, download link here, I'm getting dozen of errors:

The type 'Object' is defined in the assembly that is not referenced. You must add reference to assembly 'mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes'. [my c# project name]

Project uses .NET Framework 4.5. mscorelib.dll automatically referenced when project is opened in Visual Studio 2013 is Version=4.0.0.0.

Is there a way to configure VS2013 project, so that Visual Studio Code recognizes references and Framework version properly?

System: Windows, no Visual Studio 2015 components installed.

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536
Nenad
  • 24,809
  • 11
  • 75
  • 93
  • How are you opening a VS 2013 C# project in Visual Studio Code? The options I see are to open a file (*File* > *Open File...*) or open a folder (*File* > *Open Folder...*). If I open the folder for a VS 2013 C# project that targets .NET Framework 4.5, I do not get any errors, just its files listed in the *EXPLORE* panel. If I open its `.csproj` file, Code just opens it to edit like any XML file. – J0e3gan May 14 '15 at 15:54
  • I use `File > Open Folder`. But, interestingly, with new MVC WebApplication project I'm getting only warnings for assembly version miss-match 'Assuming assembly reference '....', you man need to supply runtime policy [WebApplcation1]'. I could not find any significant difference between csproj and web.config in my project and in new MVC app. – Nenad May 14 '15 at 17:11

1 Answers1

1

According this StackOverflow answer you can try the following to solve your issue:

I was able to fix this by issuing an update-package -reinstall command at the Package Manager Console.

Community
  • 1
  • 1
Amadeus Sanchez
  • 2,375
  • 2
  • 25
  • 31