-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Running "dotnet publish" on a console projects failed when GeneratePackageOnBuild is true.
dotnet --version 3.0.100-preview6-012264
It seems Microsoft.NET.Publish.targets skips build when GeneratePackageOnBuild is true.
Steps to reproduce:
1.install .NETCore SDK 3.0.100-preview6-012264
2.run "dotnet new console" to create a project A
3.add "<GeneratePackageOnBuild>true</GeneratePackageOnBuild>" in A.csproj PropertyGroup and save.
4.run "dotnet publish A.csproj"
Expected behavior:
Publish successfully.
Actual behavior:
Failed with following error messages:
C:\Program Files\dotnet\sdk\3.0.100-preview6-012264\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(149,5): error MSB3030: Could not copy the file "obj\Debug\netcoreapp3.0\A.dll" because it was not found. [C:\repos\A\A.csproj]
C:\Program Files\dotnet\sdk\3.0.100-preview6-012264\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(149,5): error MSB3030: Could not copy the file "C:\repos\A\bin\Debug\netcoreapp3.0\A.deps.json" because it was not found. [C:\repos\A\A.csproj]
C:\Program Files\dotnet\sdk\3.0.100-preview6-012264\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(149,5): error MSB3030: Could not copy the file "obj\Debug\netcoreapp3.0\A.pdb" because it was not found. [C:\repos\A\A.csproj]
C:\Program Files\dotnet\sdk\3.0.100-preview6-012264\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(149,5): error MSB3030: Could not copy the file "C:\repos\A\bin\Debug\netcoreapp3.0\A.runtimeconfig.json" because it was not found. [C:\repos\A\A.csproj]
C:\Program Files\dotnet\sdk\3.0.100-preview6-012264\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(149,5): error MSB3030: Could not copy the file "C:\repos\A\obj\Debug\netcoreapp3.0\A.exe" because it was not found. [C:\repos\A\A.csproj]