arcade: Strange build error when calling "pack" target

Reported by @AdamYoblick by e-mail:

We’re seeing a strange error in the winforms internal build. The errors don’t seem to cause the step to fail.

Sample build: https://dev.azure.com/dnceng/public/_build/results?buildId=424221&view=logs

.dotnet\sdk\5.0.100-alpha1-014915\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets(198,5): error NU5128: Some target frameworks declared in the dependencies group of the nuspec and the lib/ref folder do not have exact matches in the other location. Consult the list of actions below:
- Add lib or ref assemblies for the netcoreapp5.0 target framework
.dotnet\sdk\5.0.100-alpha1-014915\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets(198,5): error NU5131: References were found in the nuspec, but some reference assemblies were not found in both the nuspec and ref folder. Add the following reference assemblies:
- Add System.Drawing.dll to the netcoreapp5.0 reference group in the nuspec
- Add System.Design.dll to the netcoreapp5.0 reference group in the nuspec
- Add System.Drawing.Design.dll to the netcoreapp5.0 reference group in the nuspec
- Add System.Windows.Forms.dll to the netcoreapp5.0 reference group in the nuspec
- Add System.Windows.Forms.xml to the netcoreapp5.0 reference group in the nuspec
- Add System.Windows.Forms.Design.dll to the netcoreapp5.0 reference group in the nuspec
- Add System.Windows.Forms.Design.xml to the netcoreapp5.0 reference group in the nuspec
- Add System.Windows.Forms.Design.Editors.dll to the netcoreapp5.0 reference group in the nuspec
- Add System.Windows.Forms.Design.Editors.xml to the netcoreapp5.0 reference group in the nuspec
- Add Microsoft.VisualBasic.dll to the netcoreapp5.0 reference group in the nuspec
- Add Accessibility.dll to the netcoreapp5.0 reference group in the nuspec
- Add Accessibility.xml to the netcoreapp5.0 reference group in the nuspec

I don’t think we’ve made any changes to the package in over a month. Are you aware of anyone else seeing this?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 18 (18 by maintainers)

Most upvoted comments

Those are warnings that are getting elevated to errors in the build likely.

https://docs.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu5128 https://docs.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu5131

The warnings are something that was added in 3.0.100, and ideally should be addressed. They communicate authoring in packages that might not work in the exact way the author intended them to work.

I’d recommend you analyze the warnings, I’d be happy to chat through any issues if necessary.

fyi @zivkan