15

I just downloaded Visual Studio Code and try for a couple hours as common editor, and it works really amazing. But when I want to open my currently running ASP.Net MVC Project, it doesn't detect the project as working project, that I can't use the InteliSense provided for C#.

Can I open the ASP.Net MVC Project that created from Visual Studio? If can, then what should I do in order to achieve this?

3
  • I'm using visual studio 2012, the project using ASP.Net MVC 4. Commented May 5, 2015 at 13:18
  • Is this a web application project, or a web site "project"? In particular, is there a .csproj file or .vbproj file? Commented May 11, 2015 at 18:51
  • The reality is that you will have to convert it to a "real" vs code project. create a new vs code c# project and copy files etc. in it. then it will work. make sure you don't have .net dependencies that won't run in Linux. Commented Aug 12, 2019 at 14:31

5 Answers 5

1

open folder rather than just file and it will work

Sign up to request clarification or add additional context in comments.

Comments

1

Basically VSCode supports two project systems:

  1. DNX projects with project.json and global.json files and
  2. MSBuild projects.

The support for the latter is a bigger challenge and not yet perfect. If you have a sln and csproj files VSCode should detect that and start. Can you check the flame in the lower left if OmniSharp has started and can you check the log (Ctrl+L,L) for messages?

Comments

0

I just tried what you said. I could be able to open my solution by using "File->Open Folder" option. And selected folder of my MyProject.sln file's root folder. And after all files reloaded, I clicked Extensions page of VSCode just to be sure if C# extension loaded or not. I clearly saw C# extension was enabled. If yours is not enabled, try to enable or redownload it. And you should be able to use C# Intellisense on every .cs files.

Comments

0

it is just a code editor with some awesome features. You need to install Visual Studio (Community edition) to work on .net projects.

2 Comments

Hey there, that's not true. All you really need is the .netcore framework installed to get vscore to build, currently I don't have any Visual Studio installed but quite happily writing apps.
Wishfull thinking, yes it should be possible, but the reality is that in most times it won t work.
0

VS Code will not work with MVC 1-5 only with ASP.NET Core MVC (MVC 6). VS Code has very limited support for full framework applications:

https://github.com/OmniSharp/omnisharp-vscode/wiki/Desktop-.NET-Framework

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.