Microsoft (R) Build Engine version 16.7.0+7fb82e5b2 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.
Successfully created package 'C:\src\m\experiments\dotnet-pack-bug-demo\bin\Debug\dotnet-pack-bug-demo.1.0.0.nupkg'.
Actual Result
Microsoft (R) Build Engine version 16.7.0+7fb82e5b2 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.
C:\Program Files\dotnet\sdk\3.1.402\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets(198,5): error NU5026: The file 'C:\src\m\experiments\dotnet-pack-bug-demo\bin\Debug\netcoreapp3.1\dotnet-pack-bug-demo.runtimeconfig.json' to be packed was not found on disk. [C:\src\m\experiments\dotnet-pack-bug-demo\dotnet-pack-bug-demo.csproj]
... because dotnet pack probably doesn't look in the correct folder for (previous) build output. If RuntimeIdentifier is specified, though, it does. I assume that the --runtime is not propagated correctly (at all?) when --no-build is set.
Environment
dotnet --version
3.1.402
dotnet msbuild /version
Microsoft (R) Build Engine version 16.7.0+7fb82e5b2 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.
16.7.0.41201
Steps to reproduce
Expected Result
Actual Result
Workaround
... because
dotnet pack
probably doesn't look in the correct folder for (previous) build output. IfRuntimeIdentifier
is specified, though, it does. I assume that the--runtime
is not propagated correctly (at all?) when--no-build
is set.Environment