Visual Studio 2017 (sln) Runner

Answered

Hi,

 

I know this has been asked before, but times have changed since. I currently use the VS sln runner to build my projects and i have VS2015 installed on my build machines.

I've updated TC to 10.0.4 which i believe has support for Visual studio 2017, but i wonder if installing "Build Tools for Visual Studio 2017 RC" is enough? And can this also live alongside VS 2015?

I've searched everywhere for the bare minimum for VS17 to work and i can't find anything concrete - and nothing (that i could find) in the documentation. I've read in the docs that "The Visual Studio (sln) build runner requires the proper version of Microsoft Visual Studio installed on the build agent." but is this the whole version of VS? or are the build tools enough?

Can someone advise me on this? What exactly is needed?

 

Thanks,

Alex

1
6 comments

Hello Alex,

Microsoft Visual Studio 2017 is supported since TeamCity 10.0.4 version. Yes, in the documentation we have a requirement to install Microsoft Visual Studio on the agent. Unfortunately we have not chance to test how it works if only build tools are installed, here is the request: https://youtrack.jetbrains.com/issue/TW-42944.

According to user report the following packages are sufficient:

Microsoft .NET Framework Developer Pack
Microsoft Build Tools
Microsoft Visual Studio Shell

0

And along the same lines of questioning - what are the requirements for building .NET Core projects? From limited experiments, it seems that VS2017 has to be installed in full to support .NET Core 1.1 builds on TC?

0

Hello,

To run .NET Core project the .NET Core SDK has to be installed on the build agent machines. For more details please see the blog post: https://blog.jetbrains.com/teamcity/2016/11/teamcity-dotnet-core/.

0

Thx for the reply .. and sry for not being more specific.

We experienced trouble setting up build steps for a solution containing both a .NET Core project and a project with multiple targets setup - the later project has to be compiled for both .NET 4.6.1 and .NET Core (we're doing PCL stuff to hit AWS Lambdas).

The build step for restoring .NET Core nuget packages seemingly went ok, but the succeeding build step building the mixed project failed with a "project.assets.json not found. Run a NuGet package restore to generate this file" error. It seems that the build runner is not capable of handling the multiple target situation? A workaround is to introduce separate build steps for restoring the .NET Core project and the multiple target project separately?!

0

Could you please try to run the same build step via command line in the agent machine in the checkout directory? Please use the guidelines. Does it run successfully? 

0
Avatar
Permanently deleted user

Had a similar problem with a project building Azure functions that failed to build on Team City with "project.assets.json not found. Run a NuGet package restore to generate this file".
I ended up resolving it by changing the NuGet Installer Build Step to use NuGet 4.3 (previously it was using NuGet 3.5).
After a great deal of investigation I came to this conclusion because when VS 2017 built it on my laptop collocated with the obj\\project.assets.json file was a csproj.nuget.g.props file that mentioned  NuGetToolVersion was 4.2

0

Please sign in to leave a comment.