Building ASP.Net CORE (.Net Framework) on TeamCity - even possible?

Hi, we have a solution built with Visual Studio 2015, with a ASP.Net Core (aka ASP.Net 5) project with .Net Framework 4.5.2 (we could have chosen 4.6 instead, but not relevant for this issue).

Please observe - not a true .Net CORE project, just ASP.Net CORE built on .Net Framework! (hence no csproj file, only project.json/xproj)

This ASP.Net (WebAPI) project references class library projects also built Entity Framework 4.5.2. The later fact forced us to use nuget restore instead of dotnet restore as indicated by hundreds of post on that specific issue. All well, this package restore part works now it seems.

However - how do we build our ASP.Net CORE project without having to install the entire Visual Studio 2015 on the build server? Is it even possible? MSBuild may not be used since it is an xproj/project.json based project.

Please any advice would be greatly appreciated, this is killing us slowly...

Comment actions Permalink
Official comment


Currently MSFT actively pushes all users to convert their existing project.json projects to the new csproj format. As result old builds of dotnet core cli tools are retired and latest recently released build only supports csproj files.

New csproj format also supports referencing full framework projects, but to build such projects you need to have MSBuild 15 (bundled with VS 2017) and NuGet 3.5+. MSFT says that they don't want to support building old style csproj in scope of .net cli tools.

So, if you want to get rid of MSBuild/Visual Studio installation on your build agents you have to upgrade all of your projects to the new csproj format and use .net core cli tools to build your project.

Comment actions Permalink


Please see the related blog post: .NET Core plugin requires .NET Core SDK installed on the agent machine.

Comment actions Permalink

Ok, but is that really relevant also for non .Net CORE projects? Please obeserve that we have an ASP.Net CORE project targeting the .Net Framework (not .Net CORE).

Scott Hanselman explains our setup on his blog: page:

Best regards,





Comment actions Permalink

Ok, we upgraded to VS 2017 and it worked as expected.

ASP.Net CORE on .Net Framework and VS2015 and was really a bad experience for several CI setups/products according to the numerous threads on Stackoverflow and Github.

Comment actions Permalink

For .NetCore2.0 project with netX (e.g. net452) target framework installation of .Net framework sdk should help.


Please sign in to leave a comment.