I have a WebApp built using ASP.NET 2.2
and using TeamCity
to deploy it. My build steps are as follow
When I check the publish directory I can see that the wwwroot
folder is missing. For my own sanity I did a dotnet build
and dotnet publish
(Visual Studio is not used) on my local version and I can see that the wwwroot is being copied to the publish folder.
Why there is a difference in the behaviour and what should I do please to make sure that this works?
As a side note: I am using bundleconfig.json
and gulpfile.js
and all content are copied fine locally.
On my local machine I have Visual Studio 2019 v16.3.8
plus the below
On TeamCity I am using .NET Core SDK v2.2.402
So first I still don't know why when running the dotnet publish
command locally it works and on TeamCity it doesn't, but here how I fixed my issue:
bundleconfig.json
.That NuGet package contains an MSBuild task that will run the exact same compilers on the bundleconfig.json file in the root of the project.
gulp
manually.