vcsjones / AzureSignTool

SignTool Library and Azure Key Vault Support
MIT License
272 stars 85 forks source link

tool install fails with .NET 7 (net6 installed) #199

Closed dubajj closed 1 year ago

dubajj commented 1 year ago

I'm not having any success installing AzureSign tool through dotnet. I think I have every sdk installed i could possibly need and i saw in the other bug you dont want to update to .net7 yet.

dotnet tool install --global AzureSignTool --version 4.0.1

...restore.csproj : 
error NU1202: Package AzureSignTool 4.0.1 is not compatible with net70 (.NETFramework,Version=v7.0) / any.
 Package AzureSignTool 4.0.1 supports: net6 .0 (.NETCoreApp,Version=v6.0) / any                                                                                     

The tool package could not be restored.

my local dev setup looks like this for dotnet

C:\WINDOWS\system32>dotnet --info
.NET SDK:
 Version:   7.0.304
 Commit:    7e794e2806

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19045
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\7.0.304\

Host:
  Version:      7.0.7
  Architecture: x64
  Commit:       5b20af47d9

.NET SDKs installed:
  3.1.302 [C:\Program Files\dotnet\sdk]
  6.0.410 [C:\Program Files\dotnet\sdk]
  7.0.304 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 3.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.18 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.18 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.18 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 7.0.7 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
  x86   [C:\Program Files (x86)\dotnet]
    registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
  Not set

Is it still possible for me to install this tool without uninstalling net7?

dubajj commented 1 year ago

worth noting i did also try this with --framework net6.0 and it still fails

dubajj commented 1 year ago

It turns out something else i had installed had set MSBuildSDKsPath as an environment variable. This breaks everything. Once deleted the tool installs fine.

I'm just going to add some more words here to try and get this to hit on google searches /gpt scrapes since i could find nothing online about this. Hopefully this will save someone else!

nu1202 not compatible with net 70 (.NETCoreApp,Version=v6.0) / any not compatible with net60 (.NETFramework,Version=v6.0) / any. Package AzureSignTool 4.0.1 supports: net6 .0 (.NETCoreApp,Version=v6.0) / any