Skip to content

[NETSDKE2E][Regression]With 11.0.0-preview.1.26069.103 SDK installed, Error NETSDK1094 happens when publish NuGetPackageExplorer(net9.0) failed using PublishReadyToRun="true" in CLI. #52565

@vdanche

Description

@vdanche

REGRESSION INFO
Works well on 11.0.100-alpha.1.26062.101

Image

INSTALL STEPS
1.Install .NET 11.0.0-preview.1.26069.103 SDK on Windows11-x64

REPRO STEPS
1.Download and unzip NuGetPackageExplorer-main.zip(net9.0) on win-x64
2.In CLI, cd NuGetPackageExplorer-main\NuGetPackageExplorer-main\PackageExplorer
3.dotnet publish -c Release -r win-x64 /p:PublishReadyToRun=true /p:SelfContained=true NuGetPackageExplorer.csproj

Expected
Publish successfully

Actual
Publish failed with below error NETSDK1094
Unable to optimize assemblies for performance: a valid runtime package was not found. Either set the PublishReadyToRun property to false, or use a supported runtime identifier when publishing. When targeting .NET 6 or higher, make sure to restore packages with the PublishReadyToRun property set to true.

Image

Dotnet --info
.NET SDK:
Version: 11.0.100-preview.1.26069.103
Commit: adf42f5dce
Workload version: 11.0.100-manifests.ca39333e
MSBuild version: 18.4.0-preview-26069-103+adf42f5dc

Runtime Environment:
OS Name: Windows
OS Version: 10.0.26100
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\11.0.100-preview.1.26069.103\

.NET workloads installed:
System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {177F0C4A-1CD3-4DE7-A32C-71DBBB9FA36D} failed due to the following error: 80040154 Class not registered (0x80040154 (REGDB_E_CLASSNOTREG)).
at System.RuntimeTypeHandle.AllocateComObject(Void* pClassFactory)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
at Microsoft.DotNet.Cli.Commands.Workload.List.VisualStudioWorkloads.GetSetupConfiguration()
at Microsoft.DotNet.Cli.Commands.Workload.List.VisualStudioWorkloads.GetInstalledWorkloads(IWorkloadResolver workloadResolver, InstalledWorkloadsCollection installedWorkloads, Nullable1 sdkFeatureBand, ISetupConfiguration2 setupConfiguration) at Microsoft.DotNet.Cli.Commands.Workload.WorkloadInfoHelper.AddInstalledVsWorkloads(IEnumerable1 sdkWorkloadIds)
at Microsoft.DotNet.Cli.Commands.Workload.WorkloadCommandDefinition.ShowWorkloadsInfo(ParseResult parseResult, WorkloadInfoHelper workloadInfoHelper, IReporter reporter, String dotnetDir, Boolean showVersion)
at Microsoft.DotNet.Cli.CommandLineInfo.PrintWorkloadsInfo()
at Microsoft.DotNet.Cli.CommandLineInfo.PrintInfo()
at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime)
at Microsoft.DotNet.Cli.Program.Main(String[] args)

Host:
Version: 11.0.0-preview.1.26069.103
Architecture: x64
Commit: adf42f5dce
RID: win-x64

.NET SDKs installed:
11.0.100-preview.1.26069.103 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 11.0.0-preview.1.26069.103 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 11.0.0-preview.1.26069.103 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 11.0.0-preview.1.26069.103 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
None

Environment variables:
Not set

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions