Open AndrewKeepCoding opened 1 week ago
Thanks for the report.
This is likely a misconfiguration of Visual Studio of some kind. Can you validate that the app that has been created (it should be on the disk even if VS does not load it) can be compiled using dotnet new
on the command line?
Hi @jeromelaban !
Do you mean dotnet build
? The first time got an error mentioning WindowsSdkPackageVersion
.
After adding:
<WindowsSdkPackageVersion>10.0.19041.38</WindowsSdkPackageVersion>
on the Uno Library *.csproj, the build successed.
Do you mean dotnet build?
I did, my apologies :)
It's interesting that you're getting that particular error. Is it loading in VS after this?
Is it loading in VS after this?
No. Same error. I'm not the only one by the way. @ArchieCoder gets the same behavior. 🤔
Would you have private nuget feed that is not working in your nuget feeds list?
Just in case, here is my Visual Studio version:
Microsoft Visual Studio Enterprise 2022 (64-bit) - Preview Version 17.12.0 Preview 4.0
I tried in Andrew's solution and yeah I got the bug.
I tried in my solution and it works.
I'm on regular VS version.
@AndrewKeepCoding are you able to provide a repro?
This is the repo. I get the error trying to add an Uno Platform Library.
https://github.com/AndrewKeepCoding/WinUI3Localizer/tree/uno-platform
In my environment, I get the same behavior trying to create/add a brand-new Uno Platform Library...🤔
Thanks. Indeed I can reproduce the problem. The issue here is caused by the fact that VS does not provide a good way for determining that global.json should be used or not, and where.
The workaround, so far, is to go to the folder that was created, move the global.json file next to the sln, then add the csproj manually.
@jeromelaban Thank you for the quick support! I confirmed that the workaround works!
Current behavior
I get the following error dialog when creating/adding a new Uno Platform Library project.
These files are created but not loaded to the solution.
The created global.json and .csproj look good to me.
global.json
.csproj
Expected behavior
Creates/Adds an Uno Platform Library without errors.
Affected platforms
No response
Template Host
Visual Studio
Host OS
Windows
Template Options
Just [Add a new project] -> [Uno Platform Library] on Visual Studio 2022 [Preview].
Template Version
Anything else we need to know?
uno-check
runs successfully.