Open NinjaCross opened 3 years ago
@nohwnd could you look into this?
Perhaps caused by:
If this is the cause, I think you can override it by defining IsPackable=true in the project.
Perhaps caused by:
- Microsoft.NET.Test.Sdk.props sets IsTestProject=true: https://github.com/microsoft/vstest/blob/5c9abb2ae1b0318dc52729a3639e72089c79fb3c/src/package/nuspec/Microsoft.NET.Test.Sdk.props#L17
- NuGet.Build.Tasks.Pack.targets detects IsTestProject=true and sets IsPackable=false: https://github.com/NuGet/NuGet.Client/blob/7363366401b43f4ea250394db8dad3707e9a9636/src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.targets#L35
If this is the cause, I think you can override it by defining IsPackable=true in the project.
I will try that and let you know
I can confirm that setting IsPackable=true solves the problem
I'm experiencing a rather bizarre behaviour. It seems that, when a CSPROJ is referencing the package Microsoft.NET.Test.Sdk, the GeneratePackageOnBuild is ignored and the NUPKG is not generated.
Everything works ok except for this.
The CSPROJ looks like this:
Once i removed the
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0"/>
, the build process started to correctly generate the NUPKG.Here is the build log produced with the
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0"/>
nodeHere is the build log produced without the
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0"/>
nodeAs you can see, only the second log contains the sentence
Successfully created package 'H:\MyNameSpace\Libraries\MyNameSpace.Tests\bin\Debug\MyNameSpace.Tests.1.0.0.nupkg'
This is the list of SDKs and runtimes installed into my machine.