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'm working on upgrading a net6 product suite (which uses paket) to net8. Some of the projects are Windows UI applications, and as such they target net6.0-windows. Everything works fine targeting net6. However, when upgrading to net8, something is causing VS 2022 to no longer restore any packages in projects that target net8.0-windows. The net8.0 projects work fine. And ALL projects work if I run a build from the command line using dotnet.exe. So the problem is specific to VS when combined with net8.0-windows projects.
Repro steps
I have multiple projects that target net8.0, and multiple that target net8.0-windows. The behavior described above is consistent in all of them, and it doesn't matter which nuget packages I'm referencing. In VS, net8.0 projects work, but net8.0-windows projects do not. And everything works from the command line. I should also add that "dotnet paket restore" does bring everything down into the packages folder as expected.
Just to be clear, my paket.dependencies file does have groups defined. One has a restriction of net8.0 and one has a restriction of net8.0-windows. I know I'm using the correct groups in the various paket.references files because: 1) The same groups worked fine for net6; and 2) It works fine for net8 if I build it from the command line with dotnet.exe.
Also, I'm using paket v8.0.0. I'm using that same paket version with the net6 codebase and it's fine.
Expected behavior
Packages should be restored to the projects in VS Solution Explorer and builds should work within VS.
Actual behavior
There is no "Packages" node listed under the Dependencies section for the net8.0-windows projects in VS Solution Explorer. And of course, builds fail because it doesn't recognize the referenced objects.
Known workarounds
I'd love to find one. :(
The text was updated successfully, but these errors were encountered:
Description
I'm working on upgrading a net6 product suite (which uses paket) to net8. Some of the projects are Windows UI applications, and as such they target net6.0-windows. Everything works fine targeting net6. However, when upgrading to net8, something is causing VS 2022 to no longer restore any packages in projects that target net8.0-windows. The net8.0 projects work fine. And ALL projects work if I run a build from the command line using dotnet.exe. So the problem is specific to VS when combined with net8.0-windows projects.
Repro steps
I have multiple projects that target net8.0, and multiple that target net8.0-windows. The behavior described above is consistent in all of them, and it doesn't matter which nuget packages I'm referencing. In VS, net8.0 projects work, but net8.0-windows projects do not. And everything works from the command line. I should also add that "dotnet paket restore" does bring everything down into the packages folder as expected.
Just to be clear, my paket.dependencies file does have groups defined. One has a restriction of net8.0 and one has a restriction of net8.0-windows. I know I'm using the correct groups in the various paket.references files because: 1) The same groups worked fine for net6; and 2) It works fine for net8 if I build it from the command line with dotnet.exe.
Also, I'm using paket v8.0.0. I'm using that same paket version with the net6 codebase and it's fine.
Expected behavior
Packages should be restored to the projects in VS Solution Explorer and builds should work within VS.
Actual behavior
There is no "Packages" node listed under the Dependencies section for the net8.0-windows projects in VS Solution Explorer. And of course, builds fail because it doesn't recognize the referenced objects.
Known workarounds
I'd love to find one. :(
The text was updated successfully, but these errors were encountered: