Open junlinz2 opened 9 months ago
Having the same issue.
Same issue here as well. This is preventing us from releasing our app with .NET 8.
Same issue here, compiling on an M2 MacBook Pro under Parallels. I can get a little further by specifying -p:Platform=x64 -r win-x64, but then I get the following error. It's trying to pull a dependency from both the 'root' dependency bin folder -AND- from the win-x64 sub-directory and flagging that as an error. However, the file doesn't actually exist in the win-x64 subdirectory at all.
APPX1101: Payload contains two or more files with the same destination path
Project structure:
The error message gives essentially: ....nuget\packages\microsoft.windowsappsdk\1.3.230724000\buildTransitive\Microsoft.Build.Msix.Packaging. targets(1500,5): error APPX1101: Payload contains two or more files with the same destination path 'App.Mvvm .pdb'. Source files: [....csproj::TargetFramework=net8.0 -windows10.0.22621.0] ....nuget\packages\microsoft.windowsappsdk\1.3.230724000\buildTransitive\Microsoft.Build.Msix.Packaging. targets(1500,5): error APPX1101: ...App.Mvvm\bin\x64\Release\net8.0-windows 10.0.22621.0\App.Mvvm.pdb [...App.csproj::TargetF ramework=net8.0-windows10.0.22621.0] ....nuget\packages\microsoft.windowsappsdk\1.3.230724000\buildTransitive\Microsoft.Build.Msix.Packaging. targets(1500,5): error APPX1101: ...\App.Mvvm\bin\x64\Release\net8.0-windows 10.0.22621.0\win-x64\App.Mvvm.pdb [...\App.csproj: :TargetFramework=net8.0-windows10.0.22621.0]
Same issue here as well. This is preventing us from releasing our app with .NET 8.
Did you get a fix? I am trying to release my software ASAP and need an executable. Would there be anyone online that could help? When is the next patch for dotnet maui?
Same issue.
Same issue here. Is there any solution?
Drop the --runtime win-x64
from your command line to make it publish for a runtime called win10-x64
With above suggestion this seems to work for me:
dotnet publish --configuration Release --self-contained --framework "net8.0-windows10.0.19041.0"
I seem to get this issue doing a dotnet build -c Release
too
Adding /p:UseRidGraph=true to the publish command resolved this issue for us
@e012345678 - What does that actually do? The docs are pretty light on the matter... Have you noticed any downsides?
Is anybody using 'Individual Accounts' as authentication method and finding problems on releasing the app on IIS?
why ms tech stack sucks so much, a known issue could exist for so long time without any fix or workaround.
why ms tech stack sucks so much, a known issue could exist for so long time without any fix or workaround.
@jinge1936 My workaround doesn't work for you? https://github.com/dotnet/sdk/issues/37118#issuecomment-1870104929
@NJullienSweet ,
I resolved the issue , and shared my solution in stackoverflow in which redirect me to here.
I am sure it's a bug in dotnet sdk8 for target windows, the issue does not happen in macOS.
So disappointed , I haven't used dotnet to write tools for so long a time, in my mind, c# ,dotnet is best tools in the market, but it looks now it's painful to use. write one tools , having so many bugs. Cannot find solution with search engines, and all llms.
Describe the bug
dotnet publish
fails when trying to use the .NET 8 win-x64 RID as suggested by this breaking change. This is observed in MAUI as we are trying to publish MSIX applications that use MAUI, however it might affect other frameworks as well. Instead, the following message is shown:To Reproduce
This is tested on .NET 8.0.100 and .NET MAUI 8.0.3, using Windows 11 21H2:
dotnet new maui --name "HelloWorld"
cd HelloWorld
dotnet publish --configuration Release --self-contained --framework "net8.0-windows10.0.19041.0" --runtime "win-x64"
Expected: MSIX package should be produced without errors. This worked on .NET 7.0.402, MAUI 7.0.96. Actual: the log output above is produced and the publish fails.
Exceptions (if any)
N/A
Further technical details
dotnet --info
The above was tested using a standalone install of .NET with MAUI workloads installed. But I can also repro this issue with the version of .NET that Visual Studio installs as well, again using .NET SDK 8.0.100. The publish works in Visual Studio 17.8 but I presume it's because Visual Studio itself is still using the previous RID graph: