Hi,
I'm trying to add an Uno Platform "Cross-Platform Library" to a solution containing an Uno's Cross-Platform App. Visual studio keeps freezing (default frosting/not-responding overlay) while trying to add such a project.
That the project is added without a fuss :)
The latter project is created on disk, but (I assume) when it tries to change the sln file, it freezes.
Visual Studio
Relevant plugins
I've tried:
Creating a new solution, adding the library first, then adding the app project.
(Adding other Uno-libraries afterwards work fine too btw...)
Did you try running Visual Studio in Admin mode?
Just found a fix:
I compared the sln files of my original solution with a test-sln where I tried the workaround as I stated above.
The only difference was this line:
_(original solution)_
VisualStudioVersion = 16.0.29209.62
_(new solution)_
VisualStudioVersion = 16.0.29215.179
After changing this line in the original solution and reloading it, I was able to add the library project.
Thanks for the report!
This is an issue with the way the SDK Libraries are handled by Visual Studio, something that appears only when creating a library for the first time when the nuget cache is empty.
The workaround is the following:
workaround.csproj with the following content:<Project Sdk="MSBuild.Sdk.Extras/2.0.41">
<PropertyGroup>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
</PropertyGroup>
</Project>
msbuild /r
This will force the restore of the MSBuild.Sdk.Extras package.
Note that 2.0.41 may vary, depending on installed vsix version. See this file for the latest used version.
It could indeed be related to the cache, it seems to be working in all cases now. (I haven't cleared the nuget cache of course)
Hmm. Let's keep this one open. This definitely isn't the first-time experience we want folks to have with the Uno platform. If it happens to you again (or anyone else) please raise a Visual Studio for Windows feedback ticket via https://docs.microsoft.com/en-us/visualstudio/ide/feedback-options?view=vs-2019#report-a-problem
We're interested in your ideas for improving our products and documentation; here's how to send us feedback.
Most helpful comment
Thanks for the report!
This is an issue with the way the SDK Libraries are handled by Visual Studio, something that appears only when creating a library for the first time when the nuget cache is empty.
The workaround is the following:
workaround.csprojwith the following content:This will force the restore of the
MSBuild.Sdk.Extraspackage.Note that 2.0.41 may vary, depending on installed vsix version. See this file for the latest used version.