uno.templates icon indicating copy to clipboard operation
uno.templates copied to clipboard

[Bug] Unable to resolve Uno.Sdk for unolib

Open Takoooooo opened this issue 9 months ago • 9 comments

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

Takoooooo avatar May 07 '24 14:05 Takoooooo

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?

jeromelaban avatar May 07 '24 15:05 jeromelaban

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

Takoooooo avatar May 07 '24 15:05 Takoooooo

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

Takoooooo avatar May 07 '24 15:05 Takoooooo

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

jeromelaban avatar May 07 '24 18:05 jeromelaban

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

Takoooooo avatar May 08 '24 10:05 Takoooooo

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?

jeromelaban avatar May 08 '24 11:05 jeromelaban

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

Takoooooo avatar May 08 '24 13:05 Takoooooo

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

jeromelaban avatar May 08 '24 13:05 jeromelaban

@jeromelaban Here it is Unolib.zip

Takoooooo avatar May 08 '24 13:05 Takoooooo

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.

dansiegel avatar Aug 20 '24 18:08 dansiegel