I am trying to optimize the build on azure devops. I build all projects in a previous task with dotnet build --configuration release.
I force the use of dotnet 6.0.x which is 6.0.201 at the moment.
I then execute the following command:
/opt/hostedtoolcache/dotnet/dotnet publish /home/vsts/work/1/s/mywebproject /mywebproject .csproj --configuration release --output /home/vsts/work/1/a/mywebproject --no-build
It throws the error: /opt/hostedtoolcache/dotnet/sdk/6.0.201/Sdks/Microsoft.NET.Sdk.Razor/targets/Microsoft.NET.Sdk.Razor.StaticWebAssets.targets(681,7): error : Manifest file at '/home/vsts/work/1/s/mywebproject /obj/release/net6.0/staticwebassets.build.json' not found. [/home/vsts/work/1/s/mywebproject /mywebproject .csproj]
On my windows machine, I started with a clean repository and executed exactly the same tasks as specified in my azure build and it works fine.
I am trying to optimize the build on azure devops. I build all projects in a previous task with dotnet build --configuration release.
I force the use of dotnet 6.0.x which is 6.0.201 at the moment.
I then execute the following command:
/opt/hostedtoolcache/dotnet/dotnet publish /home/vsts/work/1/s/mywebproject /mywebproject .csproj --configuration release --output /home/vsts/work/1/a/mywebproject --no-build
It throws the error: /opt/hostedtoolcache/dotnet/sdk/6.0.201/Sdks/Microsoft.NET.Sdk.Razor/targets/Microsoft.NET.Sdk.Razor.StaticWebAssets.targets(681,7): error : Manifest file at '/home/vsts/work/1/s/mywebproject /obj/release/net6.0/staticwebassets.build.json' not found. [/home/vsts/work/1/s/mywebproject /mywebproject .csproj]
On my windows machine, I started with a clean repository and executed exactly the same tasks as specified in my azure build and it works fine.