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

Visual Studio extension doesn't build anymore #8300

Closed
mrhelmut opened this issue May 8, 2024 · 2 comments · Fixed by #8302
Closed

Visual Studio extension doesn't build anymore #8300

mrhelmut opened this issue May 8, 2024 · 2 comments · Fixed by #8302

Comments

@mrhelmut
Copy link
Contributor

mrhelmut commented May 8, 2024

It seems that building the Visual Studio Extension for VS2022 fails, likely due to recent changes within the Microsoft.VisualStudio.SDK package which tries to resolve a sub package of the same version that doesn't exist Microsoft.VisualStudio.SDK.Analyzers.

D:\a\MonoGame\MonoGame\Templates\MonoGame.Templates.VSExtension\MonoGame.Templates.VSExtension.csproj : error NU1102: Unable to find package Microsoft.VisualStudio.SDK.Analyzers with version (>= 17.7.20)
D:\a\MonoGame\MonoGame\Templates\MonoGame.Templates.VSExtension\MonoGame.Templates.VSExtension.csproj : error NU1102: - Found 26 version(s) in nuget.org [ Nearest version: 16.10.10 ]
D:\a\MonoGame\MonoGame\Templates\MonoGame.Templates.VSExtension\MonoGame.Templates.VSExtension.csproj : error NU1102: - Found 0 version(s) in Microsoft Visual Studio Offline Packages

Investigations would be welcome to fix the build script.

@JakeLegendXIII
Copy link
Contributor

JakeLegendXIII commented May 11, 2024

Hey @mrhelmut I have a couple solutions to get the builds working again. Neither are "perfect", but they do allow the CakeFrosting builds to complete and output all the normal things again. I have a PR open #8302 for option 1 (the simplest fix), but I am open to suggestions or changes.

  1. Change the package reference wildcard versioning for Microsoft.VSSDK.BuildTools to be Version="17.9.*"
  2. Override the version of the child dependency Microsoft.VisualStudio.SDK.Analyzers specifically using the 16.* wildcard. The latest version is 16.10.10 which is in the dependency tree for both correctly. This was last released in 2021 and does not change much, but does add an extra dependency to the csproj file. The upside to this change is we can keep both the other SDK packages on "17.*".

Microsoft.VSSDK.BuildTools seems to be the problem package in my testing. There are some 17.10.* pre-release packages that when pulled in as a wildcard introduce the error (seems odd since it should use stable versions with the wildcard but I can easily reproduce this problem over and over again). If you reference them explicitly they work, but whenever BuildTools is set to 17.* or 17.10.* right now it breaks.

It might make sense to update both SDK packages to 17.9 if option 1 is the way forward. Hopefully though 17.10's actual release won't have this issue and then it could be set back to the wildcard. Option 2 adds another dependency and will show a build warning till 17.10 is fixed , but is less likely to need a follow up change in the near future. Either one will work, but has some tradeoff.

@mrhelmut
Copy link
Contributor Author

  1. Seems cleaner and likely all we can do for the time being.

Thanks for looking into it! I'll go ahead and merge your PR. 🙌

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

Successfully merging a pull request may close this issue.

2 participants