Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package targeting net8.0-windows7.0 does not get restored by msbuild #4267

Open
kmaki-pf opened this issue Jul 30, 2024 · 0 comments
Open

Package targeting net8.0-windows7.0 does not get restored by msbuild #4267

kmaki-pf opened this issue Jul 30, 2024 · 0 comments

Comments

@kmaki-pf
Copy link

Description

I have a project that is targeting net8.0-windows and a package that only provides files for net8.0-windows7.0. When I build in Visual Studio everything works as expected, however when using msbuild v17 the package does not get restored and the build fails. This seems related to #4241 but not sure exactly.

We are using paket in magic mode, which resolves to 8.0.3 at this time.

Repro steps

  1. Create a winforms project that targets net8.0-windows and add WinForms.DataVisualization to paket.references
  2. Add some code that references that package, e.g. using System.Windows.Forms.DataVisualization.Charting;
  3. Confirm running .paket update followed by building in VS2022 works
  4. Commit the resulting paket.lock file and do a fresh clone
  5. Run msbuild /t:Restore /p:Configuration=Release followed by msbuild /p:Configuration=Release and the build will fail

Expected behavior

msbuild should succeed since the Visual Studio build works without issue.

Actual behavior

msbuild fails with the dependency not being included in the build, and the package is not present in obj/project.assets.json or obj/project.nuget.cache

Known workarounds

We added the .dll from the DataVisualization package to our repo and are linking to it directly instead of using paket.references. However this breaks the designer in VS2022 and so WinForms development is severely limited.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant