Rayzel
Rayzel

Reputation: 102

Uno platform setup

I'm trying to set up a desktop application using Uno Platform. I have been trying that for a week and it's not working. In the period of downloading the platform my incternet connection wasn't that great so I doubt it's like packeges have not been downloaded correctly but I can't find a way to solve my problem. I have tried use the Uno Platform template wizard to build it. the command was:

dotnet new unoapp -o unot2 -preset "recommended" -id "com.companyname.unot2" -pub "O=unot2" -platforms "maccatalyst" -platforms "windows" -theme-service  -vscode  -pwa False -theme "material" -presentation "mvux" -config  -di  -log "default" -nav "regions" -http  -loc  -server  -tests "unit" -tests "ui" -toolkit  -dsp 

I got that huge failure list:

The template "Uno Platform App" was created successfully.

Processing post-creation actions...
Restoring C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.sln:
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2\unot2.csproj : warning NU1503: Skipping restore for project 'C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2\unot2.csproj'. The project file may be invalid or missing targets required for restore. [C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.sln]
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Mobile\unot2.Mobile.csproj : warning NU1503: Skipping restore for project 'C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Mobile\unot2.Mobile.csproj'. The project file may be invalid or missing targets required for restore. [C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.sln]
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Windows\unot2.Windows.csproj : warning NU1503: Skipping restore for project 'C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Windows\unot2.Windows.csproj'. The project file may be invalid or missing targets required for restore. [C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.sln]
  Determining projects to restore...
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Tests\unot2.Tests.csproj : error NU1100: Unable to resolve 'FluentAssertions (>= 6.12.0)' for 'net8.0'. PackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, contoso.com, NuGet official package source. [C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.sln]
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Tests\unot2.Tests.csproj : error NU1100: Unable to resolve 'Microsoft.NET.Test.Sdk (>= 17.8.0)' for 'net8.0'. PackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, contoso.com, NuGet official package source. [C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.sln]
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Tests\unot2.Tests.csproj : error NU1100: Unable to resolve 'NUnit (>= 4.0.1)' for 'net8.0'. PackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, contoso.com, NuGet official package source. [C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.sln]
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Tests\unot2.Tests.csproj : error NU1100: Unable to resolve 'NUnit3TestAdapter (>= 4.5.0)' for 'net8.0'. PackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, contoso.com, NuGet official package source. [C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.sln]
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Tests\unot2.Tests.csproj : error NU1100: Unable to resolve 'coverlet.collector (>= 6.0.0)' for 'net8.0'. PackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, contoso.com, NuGet official package source. [C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.sln]
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Server\unot2.Server.csproj : error NU1100: Unable to resolve 'Swashbuckle.AspNetCore (>= 6.5.0)' for 'net8.0'. PackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, contoso.com, NuGet official package source. [C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.sln]
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.UITests\unot2.UITests.csproj : error NU1100: Unable to resolve 'FluentAssertions (>= 6.12.0)' for 'net8.0'. PackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, contoso.com, NuGet official package source. [C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.sln]
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.UITests\unot2.UITests.csproj : error NU1100: Unable to resolve 'Microsoft.NET.Test.Sdk (>= 17.8.0)' for 'net8.0'. PackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, contoso.com, NuGet official package source. [C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.sln]
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.UITests\unot2.UITests.csproj : error NU1100: Unable to resolve 'Newtonsoft.Json (>= 13.0.3)' for 'net8.0'. PackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, contoso.com, NuGet official package source. [C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.sln]
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.UITests\unot2.UITests.csproj : error NU1100: Unable to resolve 'NUnit (>= 4.0.1)' for 'net8.0'. PackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, contoso.com, NuGet official package source. [C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.sln]
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.UITests\unot2.UITests.csproj : error NU1100: Unable to resolve 'NUnit3TestAdapter (>= 4.5.0)' for 'net8.0'. PackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, contoso.com, NuGet official package source. [C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.sln]
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.UITests\unot2.UITests.csproj : error NU1100: Unable to resolve 'Uno.UITest.Helpers (>= 1.1.0-dev.70)' for 'net8.0'. PackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, contoso.com, NuGet official package source. [C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.sln]
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.UITests\unot2.UITests.csproj : error NU1100: Unable to resolve 'Xamarin.UITest (>= 4.3.3)' for 'net8.0'. PackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, contoso.com, NuGet official package source. [C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.sln]
  Restored C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.DataContracts\unot2.DataContracts.csproj (in 332 ms).
  Failed to restore C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.UITests\unot2.UITests.csproj (in 329 ms).
  Failed to restore C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Tests\unot2.Tests.csproj (in 333 ms).
  Failed to restore C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Server\unot2.Server.csproj (in 387 ms).
Restore failed.
Restoring C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2\unot2.csproj:
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2\unot2.csproj : error : Could not resolve SDK "Uno.Sdk". Exactly one of the probing messages below indicates why we could not resolve the SDK. Investigate and resolve that message to correctly specify the SDK.
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2\unot2.csproj : error :   SDK resolver "Microsoft.DotNet.MSBuildWorkloadSdkResolver" returned null.
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2\unot2.csproj : error :   Unable to resolve 'Uno.Sdk (= 5.1.50)' for '.NETStandard,Version=v0.0'. PackageSourceMapping is enabled, the following source(s) were not considered: contoso.com, NuGet official package source.
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2\unot2.csproj : error :   MSB4276: The default SDK resolver failed to resolve SDK "Uno.Sdk" because directory "C:\Program Files\dotnet\sdk\8.0.200\Sdks\Uno.Sdk\Sdk" did not exist.
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2\unot2.csproj : error MSB4236: The SDK 'Uno.Sdk' specified could not be found.
Restore failed.
Restoring C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Shared\unot2.Shared.csproj:
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Shared\unot2.Shared.csproj : error : Could not resolve SDK "Microsoft.Build.NoTargets". Exactly one of the probing messages below indicates why we could not resolve the SDK. Investigate and resolve that message to correctly specify the SDK.
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Shared\unot2.Shared.csproj : error :   SDK resolver "Microsoft.DotNet.MSBuildWorkloadSdkResolver" returned null.
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Shared\unot2.Shared.csproj : error :   Unable to resolve 'Microsoft.Build.NoTargets (= 3.7.56)' for '.NETStandard,Version=v0.0'. PackageSourceMapping is enabled, the following source(s) were not considered: contoso.com, NuGet official package source.
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Shared\unot2.Shared.csproj : error :   MSB4276: The default SDK resolver failed to resolve SDK "Microsoft.Build.NoTargets" because directory "C:\Program Files\dotnet\sdk\8.0.200\Sdks\Microsoft.Build.NoTargets\Sdk" did not exist.
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Shared\unot2.Shared.csproj : error MSB4236: The SDK 'Microsoft.Build.NoTargets' specified could not be found.
Restore failed.
Restoring C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Server\unot2.Server.csproj:
  Determining projects to restore...
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Server\unot2.Server.csproj : error NU1100: Unable to resolve 'Swashbuckle.AspNetCore (>= 6.5.0)' for 'net8.0'. PackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, contoso.com, NuGet official package source.
  Failed to restore C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Server\unot2.Server.csproj (in 67 ms).
  1 of 2 projects are up-to-date for restore.
Restore failed.
Restoring C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.DataContracts\unot2.DataContracts.csproj:
  Determining projects to restore...
  All projects are up-to-date for restore.
Restore succeeded.
Restoring C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Tests\unot2.Tests.csproj:
  Determining projects to restore...
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Tests\unot2.Tests.csproj : error NU1100: Unable to resolve 'FluentAssertions (>= 6.12.0)' for 'net8.0'. PackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, contoso.com, NuGet official package source.
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Tests\unot2.Tests.csproj : error NU1100: Unable to resolve 'Microsoft.NET.Test.Sdk (>= 17.8.0)' for 'net8.0'. PackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, contoso.com, NuGet official package source.
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Tests\unot2.Tests.csproj : error NU1100: Unable to resolve 'NUnit (>= 4.0.1)' for 'net8.0'. PackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, contoso.com, NuGet official package source.
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Tests\unot2.Tests.csproj : error NU1100: Unable to resolve 'NUnit3TestAdapter (>= 4.5.0)' for 'net8.0'. PackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, contoso.com, NuGet official package source.
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Tests\unot2.Tests.csproj : error NU1100: Unable to resolve 'coverlet.collector (>= 6.0.0)' for 'net8.0'. PackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, contoso.com, NuGet official package source.
  Failed to restore C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Tests\unot2.Tests.csproj (in 18 ms).
Restore failed.
Restoring C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.UITests\unot2.UITests.csproj:
  Determining projects to restore...
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.UITests\unot2.UITests.csproj : error NU1100: Unable to resolve 'FluentAssertions (>= 6.12.0)' for 'net8.0'. PackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, contoso.com, NuGet official package source.
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.UITests\unot2.UITests.csproj : error NU1100: Unable to resolve 'Microsoft.NET.Test.Sdk (>= 17.8.0)' for 'net8.0'. PackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, contoso.com, NuGet official package source.
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.UITests\unot2.UITests.csproj : error NU1100: Unable to resolve 'Newtonsoft.Json (>= 13.0.3)' for 'net8.0'. PackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, contoso.com, NuGet official package source.
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.UITests\unot2.UITests.csproj : error NU1100: Unable to resolve 'NUnit (>= 4.0.1)' for 'net8.0'. PackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, contoso.com, NuGet official package source.
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.UITests\unot2.UITests.csproj : error NU1100: Unable to resolve 'NUnit3TestAdapter (>= 4.5.0)' for 'net8.0'. PackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, contoso.com, NuGet official package source.
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.UITests\unot2.UITests.csproj : error NU1100: Unable to resolve 'Uno.UITest.Helpers (>= 1.1.0-dev.70)' for 'net8.0'. PackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, contoso.com, NuGet official package source.
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.UITests\unot2.UITests.csproj : error NU1100: Unable to resolve 'Xamarin.UITest (>= 4.3.3)' for 'net8.0'. PackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, contoso.com, NuGet official package source.
  Failed to restore C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.UITests\unot2.UITests.csproj (in 13 ms).
Restore failed.
Restoring C:\Users\Admin\Desktop\uno platform\t4\unot2\Directory.Packages.props:
Restore succeeded.
Restoring C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Mobile\unot2.Mobile.csproj:
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Mobile\unot2.Mobile.csproj : error : Could not resolve SDK "Uno.Sdk". Exactly one of the probing messages below indicates why we could not resolve the SDK. Investigate and resolve that message to correctly specify the SDK.
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Mobile\unot2.Mobile.csproj : error :   SDK resolver "Microsoft.DotNet.MSBuildWorkloadSdkResolver" returned null.
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Mobile\unot2.Mobile.csproj : error :   Unable to resolve 'Uno.Sdk (= 5.1.50)' for '.NETStandard,Version=v0.0'. PackageSourceMapping is enabled, the following source(s) were not considered: contoso.com, NuGet official package source.
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Mobile\unot2.Mobile.csproj : error :   MSB4276: The default SDK resolver failed to resolve SDK "Uno.Sdk" because directory "C:\Program Files\dotnet\sdk\8.0.200\Sdks\Uno.Sdk\Sdk" did not exist.
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Mobile\unot2.Mobile.csproj : error MSB4236: The SDK 'Uno.Sdk' specified could not be found.
Restore failed.
Restoring C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Windows\unot2.Windows.csproj:
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Windows\unot2.Windows.csproj : error : Could not resolve SDK "Uno.Sdk". Exactly one of the probing messages below indicates why we could not resolve the SDK. Investigate and resolve that message to correctly specify the SDK.
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Windows\unot2.Windows.csproj : error :   SDK resolver "Microsoft.DotNet.MSBuildWorkloadSdkResolver" returned null.
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Windows\unot2.Windows.csproj : error :   Unable to resolve 'Uno.Sdk (= 5.1.50)' for '.NETStandard,Version=v0.0'. PackageSourceMapping is enabled, the following source(s) were not considered: contoso.com, NuGet official package source.
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Windows\unot2.Windows.csproj : error :   MSB4276: The default SDK resolver failed to resolve SDK "Uno.Sdk" because directory "C:\Program Files\dotnet\sdk\8.0.200\Sdks\Uno.Sdk\Sdk" did not exist.
C:\Users\Admin\Desktop\uno platform\t4\unot2\unot2.Windows\unot2.Windows.csproj : error MSB4236: The SDK 'Uno.Sdk' specified could not be found.
Restore failed.
Post action failed.
Manual instructions: Run 'dotnet restore' 

In addition, I noticed that: Skipping NuGet package signature verification.

Upvotes: 4

Views: 594

Answers (2)

baskren
baskren

Reputation: 1232

Uno docs make reference to this issue. At the time of this writing, the following are suggested:

  • Make sure to update your Uno Platform extension in VS 2022 to 5.3.x or later. Earlier versions may automatically update to an incorrect version of the Uno.SDK.
  • Make sure to re-run Uno.Check to get all the latest dependencies.
  • Ensure that all NuGet feeds are authenticated properly. When building on the command line, some enterprise NuGet feeds may not be authenticated properly.
  • Ensure that no global package mappings are interfering with nuget restore. To validate that no package mappings are set, on Windows for Visual Studio 2022:
    • Make a backup copy of %AppData%\NuGet\NuGet.Config
    • Open a visual studio instance that does not have any solution opened
    • Go to Tools, Options, NuGet Package Manager, then Package Source Mappings
    • If there are entries in the list, click then click Remove All

Also, let me add that none of the above worked for me ... but deleting the Uno.Sdk folder from my machine's Nuget global-packages folder did work!!! Here's where you can find that folder:

Delete the Uno.Sdk folder in your development environment's Nuget packages global-packages folder:

  • Windows: %userprofile%.nuget\packages
  • Mac/Linux: ~/.nuget/packages

This folder may be overridden using the NUGET_PACKAGES environment variable, the globalPackagesFolder or repositoryPath configuration settings (when using PackageReference and packages.config, respectively), or the RestorePackagesPath MSBuild property (MSBuild only). The environment variable takes precedence over the configuration setting.

Upvotes: 0

borealis-c
borealis-c

Reputation: 692

I have upgraded my uno environment to .NET 8 and tried to check, if there's an issue with .NET 8 SDK or the FluentAssertions NuGet package, but could not reproduce your problem. Therefore I would guess, it might be related to your local installation.

Try to update it to the latest version and check the installation subsquently using the commands:

dotnet tool update -g uno.check

uno-check

There should be no warnings or errors. FluentAssertions seems to had an issue when .NET 8 came out, but your post seems newer (https://github.com/fluentassertions/fluentassertions/issues/2465). Maybe you can just check and update your post with the uno-check information, if the update/check don't resolve the problem.

Upvotes: 0

Related Questions