Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[SDK 6.0.100-preview.2.21155.3] the single exe of 'dotnet publish' cause error 'api-ms-win-core-winrt-l1-1-0.dll is missing'

See original GitHub issue

[SDK 6.0.100-preview.2.21155.3] the single exe of ‘dotnet publish’ cause error ‘api-ms-win-core-winrt-l1-1-0.dll is missing’

os:windows 7 dotnet sdk: SDK 6.0.100-preview.2.21155.3 download as Binaries, not as Installers

set DOTNET_ROOT=D:\hpc-bio\dotnet\dotnet-sdk-6.0
%DOTNET_ROOT%\dotnet build -c Release AppNet60.csproj

%DOTNET_ROOT%\dotnet publish -c Release /p:PublishSingleFile=true /p:SelfContained=true /p:PublishTrimmed=true /p:PublishReadyToRun=true -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishReadyToRunShowWarnings=true --framework net6.0-windows  -r win7-x64 AppNet60.csproj

the api-ms-win-core-winrt-l1-1-0.dll is not found in D:\hpc-bio\dotnet\dotnet-sdk-6.0 too.

as a compare, .net sdk v5.0.4 works well.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:17 (6 by maintainers)

github_iconTop GitHub Comments

Pyrdacorcommented, Dec 10, 2021

Is it possible to use the “old publish” with NET6? I really need self-contained single-file executables on Win7 and I also need the most recent C# version. So this is a huge problem. I don’t care if the files are extracted or not but I need to be able to create such file with NET6/C#10 support.

wangyuguicommented, Oct 11, 2021


D:\dotnet\lib_fmt_tests\AppNet6>D:\hpc-bio\dotnet\dotnet-sdk-6.0\dotnet publish -c Release /p:PublishSingleFile=true /p:SelfContained=true --self-contained /p:PublishTrimmed=false /p:PublishReadyToRun=true -p:IncludeNati
veLibrariesForSelfExtract=true -p:PublishReadyToRunShowWarnings=true --framework net6.0-windows  -r win7-x64 AppNet60.csproj
Microsoft (R) Build Engine version 17.0.0-preview-21460-01+8f208e609 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
  Restored D:\dotnet\lib_fmt_tests\AppNet6\AppNet60.csproj (in 311 ms).
D:\hpc-bio\dotnet\dotnet-sdk-6.0\sdk\6.0.100-rc.1.21463.6\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(162,5): error NETSDK1180: Specified runtime identifier 'win7-x64'' implies Windows
 7 compatibility. Single File publishing is not compatible with Windows 7. [D:\dotnet\lib_fmt_tests\AppNet6\AppNet60.csproj]

Could we remove this limitation added in .net 6.0?

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found