You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Create a winforms project that targets net8.0-windows and add WinForms.DataVisualization to paket.references
Add some code that references that package, e.g. using System.Windows.Forms.DataVisualization.Charting;
Confirm running .paket update followed by building in VS2022 works
Commit the resulting paket.lock file and do a fresh clone
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.
The text was updated successfully, but these errors were encountered:
I was finally able to find a solution for this issue by changing the framework target in paket.dependencies from net8.0 to auto-detect. Seems like some combination of packages/projects targeting net8.0-windows instead of just net8.0 would sometimes cause the restore to skip dependencies. I don't know why Visual Studio was able to consistently figure it out while msbuild could not...
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
using System.Windows.Forms.DataVisualization.Charting;
.paket update
followed by building in VS2022 worksmsbuild /t:Restore /p:Configuration=Release
followed bymsbuild /p:Configuration=Release
and the build will failExpected 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.
The text was updated successfully, but these errors were encountered: