Edit ASP.NET Web API project with Visual Studio Code

I have been using Visual Studio Code (VSC) in web development for a while and I love its speed, expandability and general design. Today I got an idea, which felt like a lightning strike (not literally, but figuratively). Could I use VSC in my big .NET projects? Lets find out!

I'm currently working with a quite big Web API project. Solution contains multiple projects, Nuget packages, automated tests and so on. I use Postman to test app, so I don't need a Visual Studio to test app. I'm also using IIS to host app, so I don't need IIS Express to run app. Only thing I will lack in VSC is a debugger. That is of course a huge thing, but maybe I can use Visual Studio to debug app and VSC in main coding?

Setup for test run

VSC use PATH environment variable to resolve msbuild path. So first I need add msbuild path into PATH variable. I have regular Windows machine so correct path is C:\Windows\Microsoft.NET\Framework\v4.0.30319

MSBuild in task.json

Then I launch VSC and open project folder. Cool, it took only few seconds to load whole folder. Compared to Visual Studios 15 seconds that is fast. Then press Ctrl+Shift+B to build and vola! Oh, no vola. No task runner configured. Well lets configure one then. Comment TypeScript out because I'm not interested from that now... and uncomment msbuild. Ctrl+Shift+B again to build. Lots of build messages appears into console.

Restoring Nuget packages...
All packages listed in packages.config are already installed.

and vola! Well almost. Time elapsed 17 seconds and 4 error(s).

I have four times error "MSB4019". Put that error code on Stack Overflow and found out following:
It is due to Vs2012 adding in csproj file this part:
    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
    <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
You can safely remove that part and your solution will build.
Well lets get rid of that nuisance and try again. Note: Its easy to edit project files by just ctrl+clicking the path given in error message. Property group is found from main project. Let's remove it and try again.

    0 Error(s)
Time Elapsed 00:00:17.43

Cheers! I'm up and running.

Well let's test few things next:
I make a little change into code, build, test with Postman and everything seems to work. This seems to go too well. Next let's try to make a little bit bigger change which includes call into another project.

error BC30002: Type 'Customer' is not defined.

Yes I need to add reference, but there is no way to add it. I have to do it manually or use Visual Studio to add it for me. I'm also lacking import/using statement for projects namespace and VSC don't know how to do that. That is also manual labor.


So what are the benefits and drawbacks of using VSC to edit WebAPI projects.
VSC use about 200 MB of memory with this project.
Visual Studio use 650 MB.

VSC builds project in 17 seconds.
Visual Studio build time depends on size of changes. Visual Studio can optimize build process much more than  msbuild does so it's almost every time faster than VSC.

Visual Studio supports ReSharper, but there is no confirmed timeline for VSC ReSharper plugin and VSC doesn't support nunit/mstest out of the box (those would be a very cool plugins btw.).

VSC don't know how to add references or using/import statements, so for that Visual Studio is still needed. It seems that VSC is suitable for small code editing, but Visual Studio is still king of the hill in WebAPI/MVC projects.

However VSC is good tool to edit project files, make small changes into code and to simply build whole solution quickly.


  1. This is a great post. I like this topic.This site has lots of advantage. It helps me in many ways.Thanks for posting this again.
    Web development Company in India Company | Web development Company Bangalore
    Web Development Company in Bangalore | Responsive Web development

    1. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a .Net developer learn from Dot Net Training in Chennai. or learn thru Dot Net Training in Chennai. Nowadays Dot Net has tons of job opportunities on various vertical industry.
      or Javascript Training in Chennai. Nowadays JavaScript has tons of job opportunities on various vertical industry.

  2. As a website design company .Web India Market offer a full-circle approach in responsive website designing and web development services. Our website designing services covers Strategic Planning, Business Intelligence, Creative Application Development, Digital Marketing, SEO services and e-commerce solutions.

  3. This comment has been removed by the author.

  4. Wow.... your site fulfil my all requirements..thanks for this amazing information
    internet marketing solution in delhi
    E-Commerce Solution in delhi

  5. I have read this article and it is really interesting for reading. You have mentioned all the related things with efficiency. Really appreciated.

    Now buffalo web development service is available from Crystal Tech Solution in a professional way.

  6. Spark Interact web design Agency Sydney with 12+ years experience in Web development & WordPress.

    With High quality Website Design & Affordable prices. Check below the website links for more details (Apply for Job at Spark Interact)
    web design
    website design sydney
    web development sydney
    web designers
    web designer sydney
    logo design sydney
    web developers sydney
    website designers sydney
    website designers
    sydney web design
    web designers sydney

  7. I was reading your article and wondered if you had considered creating an ebook on this subject. Your writing would sell it fast. You have a lot of writing talent. Web Design Malaysia

  8. Very good points you wrote here..Great stuff...I think you've made some truly interesting points.Keep up the good work. advertising firms

  9. I feel really happy to have seen your webpage and look forward to so many more entertaining times reading here. Thanks once more for all the details.
    Read More: App development Company
    Mobial App development Company


  10. You have discussed an interesting topic that every designer to know. Very well explained with examples. Spark interact is recruiting for 2018 check out the great new positions and apply online now Visit web design sydney and upload your resume.

  11. This comment has been removed by the author.

  12. I got such a good information on this topic its very interesting one. You made a good site and I have found a similar website, please check this one App Designers Sydney
    visit the site to know more.

  13. I really appreciate this post and I like this very much. I am waiting for new post here and Please keep it up in future.Marble Benchtops Sydney

  14. I really appreciate this post and I like this very much. I am waiting for new post here and Please keep it up in future.Stone Benchtops Sydney

  15. Thanks for taking the time to discuss this, I feel strongly that love and read more on this topic. If possible, such as gain knowledge, would you mind updating your blog with additional information? It is very useful for me. startup brand company