SQLitePCL.raw icon indicating copy to clipboard operation
SQLitePCL.raw copied to clipboard

Buid issues related to net6.0 references

Open krwq opened this issue 10 months ago • 1 comments

I've tried to build the repository (dotnet run from build directory) but it ends up with errors like:

-------- dotnet pack -c Release in d:\src\SQLitePCL.raw\src\SQLitePCLRaw.lib.e_sqlite3.android
MSBuild version 17.3.4+a400405ba for .NET
  Determining projects to restore...
C:\Program Files\dotnet\sdk\6.0.428\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1147: To build this project, the following workloads must be installed: android [d:\src\SQLitePCL.raw\src\SQLitePCLRaw.lib.e_sqlite3.android\SQLitePCLRaw.lib.e_sqlite3.android.csproj]
C:\Program Files\dotnet\sdk\6.0.428\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1147: To install these workloads, run the following command: dotnet workload restore [d:\src\SQLitePCL.raw\src\SQLitePCLRaw.lib.e_sqlite3.android\SQLitePCLRaw.lib.e_sqlite3.android.csproj]

When trying to do dotnet workload restore from the directory mentioned in the error message I'm getting cryptic error - when looking at the verbose output there are some clues which suggest that net6.0 should not be used since it's out of support (also when changing global.json to use net8.0 the error becomes more explicit that it's out of support):

...
[NuGet Manager] [Info]   GET https://dnceng.pkgs.visualstudio.com/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/49a1bb2b-12b0-475f-adbd-1560fc76be38/nuget/v3/registrations2-semver2/microsoft.net.workload.emscripten.manifest-6.0.400.msi.x64/index.json
[NuGet Manager] [Info]   NotFound https://dnceng.pkgs.visualstudio.com/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/49a1bb2b-12b0-475f-adbd-1560fc76be38/nuget/v3/registrations2-semver2/microsoft.net.sdk.maccatalyst.manifest-6.0.400.msi.x64/index.json 215ms
...
Installing b243304ddf63e366ff3ad2eb76c7a5e5-x64.msi ................ Failed
Workload installation failed. Rolling back installed packs...
Workload installation failed: Failed to install b243304ddf63e366ff3ad2eb76c7a5e5-x64.msi. Error: 0x00000652. Another installation is already in progress. Complete that installation before proceeding with this install.

I believe the proper fix is to remove net6.0 references (or replace them with net8.0).

krwq avatar Feb 05 '25 09:02 krwq

This change has been made in the no-xamarin branch, but I haven't fully switched over to that yet.

ericsink avatar Mar 07 '25 18:03 ericsink