dotnet publish --no-build with separate build
See original GitHub issueIs there an existing issue for this?
- I have searched the existing issues
Describe the bug
I am working on a container build for an aspnetcore project in an azure devops pipeline. For better debugging I am trying to use a separate ‘dotnet build’ and ‘dotnet publish’ commands. That section of the container file looks like this.
RUN dotnet build --configuration Debug --no-restore --no-incremental --use-current-runtime \
--verbosity=minimal
RUN dotnet publish --configuration Debug --no-build \
--verbosity=minimal \
{project csproj file location}
This is the error from the docker build task in ADO
/usr/share/dotnet/sdk/6.0.405/Sdks/Microsoft.NET.Sdk.Razor/targets/Microsoft.NET.Sdk.Razor.StaticWebAssets.targets(680,7): error : Manifest file at 'obj/Debug/net6.0/staticwebassets.build.json' not found.
This error is nearly identical to that found in another issue, https://github.com/dotnet/aspnetcore/issues/41149, but that issue was closed after the author found it was fixed but changing ‘release’ to ‘Release’, but that does not seem to be relevant here. I confirmed the same result with either Debug or Release. Combining the two commands as such works.
RUN dotnet publish --configuration Debug \
--verbosity=minimal \
{project csproj file location}
.NET Version
6.0.405
Issue Analytics
- State:
- Created 8 months ago
- Reactions:1
- Comments:6 (4 by maintainers)
@pcappaert can you also confirm if this repros for .NET 7?
yes, I see the same error when I update the repro project and Containerfile to use .NET 7