Closed GeertvanHorrik closed 2 years ago
@GeertvanHorrik thanks for contacting us.
Are you trying to pack a Blazor webassembly app?
Hi @GeertvanHorrik. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
@GeertvanHorrik thanks for contacting us.
Are you trying to pack a Blazor webassembly app?
Correct.
It's a server project with a reference to a Blazor we assembly app being packed into a docker image.
So running pack on the server which references we assembly app project.
Blazor Webassembly apps are not packable.
Blazor Webassembly apps are not packable.
It used to work fine in in net 5.0? So I am packing the server project, can give you the exact command line of you would like to see it.
@GeertvanHorrik what is your motivation for trying to use dotnet pack
? What are you trying to achieve here?
Hi @GeertvanHorrik. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
Sorry I confused anyone, it's not "pack", it's "publish".
Here is the full command line:
"C:\Program Files\dotnet\sdk\6.0.100\dotnet.dll" publish .\src\MyProject.Server\MyProject.Server.csproj --output C:/Source/MyProject/output/Release/MyProject.Server/output/output --configuration Release /property:ContinuousIntegrationBuild=true /property:ResolveNuGetPackages=false /property:OverridableOutputRootPath=C:\Source\MyProject\output\Release /property:OverridableOutputPath=C:\Source\MyProject\output\Release\MyProject.Server\output\output /property:PackageOutputPath=C:\Source\MyProject\output\Release\MyProject.Server\output\output /property:ConfigurationName=Release /property:PackageVersion=1.0.0-alpha3263 /property:RunCodeAnalysis=false /maxcpucount /fileLogger /fileloggerparameters:LogFile=C:/Source/MyProject/output/Release/MsBuild_MyProject.Server_pack_log.log /binarylogger:C:\Source\MyProject\output\Release\MsBuild_MyProject.Server_pack.binlog;ProjectImports=Embed /nologo"
Project structure:
MyProject.Server => references both MyProject.Shared and MyProject.UI MyProject.UI (Blazor webassembly) => references MyProject.Shared
I think the issue is caused by this:
I think it should either:
@javiercn do you think my analyses is correct or is this a different issue?
@GeertvanHorrik I believe the issue is in a different place, there should not be duplicates when you get to that point.
Based on the fact that you are mentioning publish, I suspect that the issue is a bit before we call that task. Do you have a .config
file or similar in any of your assemblies?
We recently fixed an issue where some items on the build were being incorrectly duplicated, and that might be causing this issue.
If you mean MyProject.Shared.dll.config
, then yes, but it seems to be getting generated by the build, it's not inside any source directory.
Is there a way I can test the potential fix you mentioned?
@javiercn Any updates on this? Is there a way I can either provide more information or test a potential fix?
Feels similar to https://github.com/dotnet/aspnetcore/issues/37610
Tried 6.0.200-preview.21579.1, but does not seem to work yet.
Looks like the issue has been solved with the latest SDK. Thanks!
Describe the bug
A project pack fails because the same file is being compressed twice.
Here are the logs that show the output:
For simplification, I've added line numbers. As you can see, the same file (MyProject.Shared.dll) is being compressed twice (line 01 and 05), which could be the reason the error occurs (line 10).
To Reproduce
Still figuring it out, but I think:
MyProject.Shared MyProject.Client (references MyProject.Shared) MyProject.UI (Blazor project, references both MyProject.Client and MyProject.Shared)
Update 01:
Sorry I confused anyway, it's not "pack", it's "publish".
Here is the full command line:
Project structure:
MyProject.Server => references both MyProject.Shared and MyProject.UI, the project being packed MyProject.UI (Blazor webassembly) => references MyProject.Shared
Further technical details
dotnet --info
:dotnet --info Output
``` .NET SDK (reflecting any global.json): Version: 6.0.100 Commit: 9e8b04bbff Runtime Environment: OS Name: Windows OS Version: 10.0.19043 OS Platform: Windows RID: win10-x86 Base Path: C:\Program Files (x86)\dotnet\sdk\6.0.100\ Host (useful for support): Version: 6.0.0 Commit: 4822e3c3aa .NET SDKs installed: 2.1.526 [C:\Program Files (x86)\dotnet\sdk] 2.2.104 [C:\Program Files (x86)\dotnet\sdk] 3.0.101 [C:\Program Files (x86)\dotnet\sdk] 5.0.403 [C:\Program Files (x86)\dotnet\sdk] 6.0.100 [C:\Program Files (x86)\dotnet\sdk] .NET runtimes installed: Microsoft.AspNetCore.All 2.1.30 [C:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.2 [C:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.30 [C:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.2 [C:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.0.1 [C:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.12 [C:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.21 [C:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.3 [C:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.12 [C:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.0 [C:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.30 [C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.2 [C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.0.1 [C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.12 [C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.21 [C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.3 [C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.4 [C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.12 [C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0 [C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.0.0 [C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.0.1 [C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.1.12 [C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.1.21 [C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.3 [C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.4 [C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.12 [C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.0 [C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App] ```