unoplatform / uno.templates

Uno Platform project templates
https://platform.uno/
Other
16 stars 11 forks source link

[Bug] Unable to resolve Uno.Sdk for unolib #675

Closed Takoooooo closed 1 month ago

Takoooooo commented 4 months ago

Current behavior

Currently when you instantiate the unolib template in Rider csproj will fail to load because it couldn't locate the Uno.Sdk.

Expected behavior

unolib template in Rider could be instantiated succsessfully and it loads correctly.

Affected platforms

No response

Template Host

Rider

Host OS

Windows

Template Options

All template options are used with the default values, nothing has changed.

Template Version

5.2.31 version of templates is used

Anything else we need to know?

I guess we should include visualStudioSdkWorkaround parameter as we do for other templates in order to fix that

jeromelaban commented 4 months ago

Interesting. In this particular context, the global.json in the folder should be enough, as the issue reported for visualStudioSdkWorkaround should only be valid for VS and 8.0.100.

Does restore work for your in the CLI?

Takoooooo commented 4 months ago

@jeromelaban dotnet restore says that restore is completed successfully but when i try to re-load the project i get the same error

Takoooooo commented 4 months ago

Btw, the same issue happens when i instantiate that template from VS, but i didn't include it in the description since Dan is going to exclude CLI templates to be shown in VS

jeromelaban commented 4 months ago

Thanks. Which version of visual studio are you running, and which version of the dotnet sdk are you using?

Takoooooo commented 4 months ago

VS 17.9.6 Here is the list of sdks i have, i guess the last one is used image

jeromelaban commented 4 months ago

Thanks. This is very curious that VS is also showing this error. Could you show it in the context of VS? Also, do you have any custom feed that requires authentication?

Takoooooo commented 4 months ago

Here how it works on my PC in VS Анимация1 I have only nuget feed enabled, so no custom feeds

jeromelaban commented 4 months ago

Thanks. Can you also post the generated folder in a zip here?

Takoooooo commented 4 months ago

@jeromelaban Here it is Unolib.zip

dansiegel commented 1 month ago

upon testing this more this seems like an issue with Visual Studio specifically. The issue is caused when the global.json is not in the directory with the solution file. I am going to close this issue as there isn't really something that we can do in the template itself however I will be opening issues for the Wizard experience to work around this.