Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

DotNetCoreCLI@2 pack command failing with .NET 8 upgrade

$
0
0

I have just upgraded one of our projects to .NET 8 and the devops pipeline is now failing on the pack command.

A lot of the errors seem to look like this

Encountered conflict between 'Platform:System.Xml.Serialization.dll' and 'Platform:System.Xml.Serialization.dll'. Could not determine winner due to equal file and assembly versions.

and

13:11>GenerateNuspec:
NuGet.Packaging.Core.PackagingException: The file 'D:\agent\1_work\16\s\DotNet\CoreLibs\xxx\bin\Release\net8.0\xxx.dll' to be packed was not found on disk.

at NuGet.Build.Tasks.Pack.PackTaskLogic.InitLibFiles(IMSBuildItem[] libFiles, IDictionary2 aliases) at NuGet.Build.Tasks.Pack.PackTaskLogic.GetPackArgs(IPackTaskRequest1 request)
at NuGet.Build.Tasks.Pack.PackTask.Execute()
Done executing task "PackTask" -- FAILED.
13:11>Done building target "GenerateNuspec" in project "xxx.Core.csproj" -- FAILED.
13:11>Done Building Project "D:\agent\1_work\16\s\DotNet\CoreLibs\xxx\xxx.Core.csproj" (pack target(s)) -- FAILED.

I found this issue

https://github.com/dotnet/sdk/issues/10335

I have tried setting all of my projects to have

<GeneratePackageOnBuild>False</GeneratePackageOnBuild>

and

<GeneratePackageOnBuild>True</GeneratePackageOnBuild>

But neither seems to help - however if i run the pack command locally using the -p:GeneratePackageOnBuild=false flag, then the package builds successfully.

I am a bit lost on how to progress, any help would be appreciated.


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>