NETSDK1148 error when building for runtime win7-x86
See original GitHub issueWe are seeing an issue when trying to build Powershell against .NET 6 preview.1 SDK. The error is:
C:\Users\adity\AppData\Local\Microsoft\dotnet\sdk\6.0.100-preview.1.21104.4\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(108,5): error NETSDK1148: Found multiple publish output files with the same relative path: C:\Users\adity\.nuget\packages\microsoft.netcore.app.runtime.win-x86\6.0.0-preview.1.21102.12\runtimes\win-x86\native\API-MS-Win-core-xstate-l2-1-0.dll, C:\Users\adity\.nuget\packages\runtime.win7-x86.microsoft.netcore.windows.apisets\1.0.1\runtimes\win7-x86\native\api-ms-win-core-xstate-l2-1-0.dll. [D:\PSGit\PowerShell\src\powershell-win-core\powershell-win-core.csproj]
The command line used to build:
dotnet publish --no-restore /property:GenerateFullPaths=true /property:IsWindows=true --configuration Release --framework net6.0 --runtime win7-x86 /property:SDKToUse=Microsoft.NET.Sdk.WindowsDesktop
Might be related to #14020
/cc @sfoslund as per Marc Paine.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:14 (10 by maintainers)
Top Results From Across the Web
NET SDK error list - .NET CLI
Typically this issue can occur if the RuntimeIdentifier property is set during build or publish but not during restore. For more information ...
Read more >.net 5 - A referenced assembly was compiled using ...
Now, it has an error building. NETSDK1148 A referenced assembly was compiled using a newer version of Microsoft.Windows.SDK.NET.dll.
Read more >Untitled
Tools that provide common build infrastructure … NETSDK1148 error when building for runtime win7-x86 … Webdotnet-sdk - Core functionality needed to create ....
Read more >Fixing Error NETSDK1152 after upgrading to .NET 6
This error seems to be generated by the SDK when MSBuild detects duplicate files in the publish output but cannot figure out which...
Read more >When building platforms x86 and x64 consecutively, one of ...
I have defined '<RuntimeIdentifiers>win7-x64,win7-x86</RuntimeIdentifiers>' but "Batch Build" still gives the same error.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m also getting this error on the preview pipeline for the dot.net website using the .NET 6 Preview 1 SDK 2021-02-17T23:35:43.3589315Z C:\hostedtoolcache\windows\dotnet\sdk\6.0.100-preview.1.21103.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(108,5): error NETSDK1148: Found multiple publish output files with the same relative path: C:\hostedtoolcache\windows\dotnet\sdk\6.0.100-preview.1.21103.13\Sdks\Microsoft.NET.Sdk.BlazorWebAssembly\targets\BlazorWasm.web.config, D:\a\1\s\src\netlandingpage\web.config. [D:\a\1\s\src\netlandingpage\netlandingpage.csproj]
Same pipeline with .NET 5 SDK publishes without any errors.
I’m facing the same issue with 6.0.101 SDK
Error reports the same file as duplicate, just different character case in path (which is actually the same path for windows file systems), and it is not appsettings.json, it’s mongodb driver dll.
It worked well with 5.0.100 SDK