You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a console app. Set GeneratePackageOnBuild=true. Run dotnet pack. This bug as there since 2.0
Microsoft (R) Build Engine version 16.3.0-preview-19375-03+c19c7499a for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
Restore completed in 130.75 ms for C:\work\sdk\artifacts\tmp\Debug\It_packs_succ---E7D10EDE\HelloWorld.csproj.
C:\work\sdk\artifacts\bin\Debug\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(154,5): error MSB3030: Could not copy the file "C:\work\sdk\artifacts\tmp\Debug\It_packs_succ---E7D10EDE\bin\Debug\netcoreapp2.1\HelloWorld.deps.json" because it was not found. [C:\work\sdk\artifacts\tmp\Debug\It_packs_succ---E7D10EDE\HelloWorld.csproj]
C:\work\sdk\artifacts\bin\Debug\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(154,5): error MSB3030: Could not copy the file "obj\Debug\netcoreapp2.1\HelloWorld.dll" because it was not found. [C:\work\sdk\artifacts\tmp\Debug\It_packs_succ---E7D10EDE\HelloWorld.csproj]
C:\work\sdk\artifacts\bin\Debug\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(154,5): error MSB3030: Could not copy the file "obj\Debug\netcoreapp2.1\HelloWorld.pdb" because it was not found. [C:\work\sdk\artifacts\tmp\Debug\It_packs_succ---E7D10EDE\HelloWorld.csproj]
C:\work\sdk\artifacts\bin\Debug\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(154,5): error MSB3030: Could not copy the file "C:\work\sdk\artifacts\tmp\Debug\It_packs_succ---E7D10EDE\bin\Debug\netcoreapp2.1\HelloWorld.runtimeconfig.json" because it was not found. [C:\work\sdk\artifacts\tmp\Debug\It_packs_succ---E7D10EDE\HelloWorld.csproj]
The text was updated successfully, but these errors were encountered:
What I did is essentially write a different dependency graph in GeneratePackageOnBuild = true to avoid circular dependency . Original bug. I added the https://github.com/dotnet/sdk/pull/3255/files and essentially regressed NuGet/Home#7801. Instead of the logic is in nuget, it is in SDK now. Publish should not skip Build if GeneratePackageOnBuild is true. Or it will mean no build even use Publish verb.
But revert 3255 means, dotnet#2114 will be back. The solution is to break Pack’s dependency on Build in GeneratePackageOnBuild. But it still need Publish. So I need to let Pack depend directly on no build version of publish.
> Why cannot directly use “_PublishNoBuildAlternative”?
We want to exclude Build step regardless NoBuild flag is true or not.
> Will it work this time?
It will, since I have GeneratePackageOnBuild + PackAsTool + Publish/Build/Pack all combinations covered in tests. Although I did discover GeneratePackageOnBuild+Pack dotnet#3471 does not work. But it was there since 2.0. And without nuget help, we cannot easily fix it.
Create a console app. Set GeneratePackageOnBuild=true. Run
dotnet pack
. This bug as there since 2.0The text was updated successfully, but these errors were encountered: