I have a ASP.Net Core .xproj. I want to deploy the website continuously on to a server which is hosting the website using IIS. I have TeamCity installed on my server and able to deploy other .NET applications using MSBuild and PowerShell scripts. But now, I want to deploy .NET Core application either using MSBuild or PowerShell or is there any other way of achieving this?
2 Answers
There is designated TeamCity dotnet plugin which gives you all required .NET core commands:
- build,
- pack,
- publish,
- restore,
- test
For dotnet cli parameter specs look in [MS Docs] (https://learn.microsoft.com/en-us/dotnet/articles/core/tools/).
While you use xproj/project.json concept, you need to use .NET Core CLI tools like dotnet build, dotnet publish.
MSBuild has been supporting starting from .NET Core 1.0 Preview 3 and one of the main requirement is a project migration to csproj format. See Announcing .NET Core Tools MSBuild “alpha”.
