Skip to content

Publishing a server hosted wasm app fails in dotnet 7 rc1 #44182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
MarkStega opened this issue Sep 26, 2022 · 29 comments
Closed
1 task done

Publishing a server hosted wasm app fails in dotnet 7 rc1 #44182

MarkStega opened this issue Sep 26, 2022 · 29 comments
Labels
area-blazor Includes: Blazor, Razor Components feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly investigate Needs: Repro Indicates that the team needs a repro project to continue the investigation on this issue Pillar: Technical Debt Priority:3 Work that is nice to have

Comments

@MarkStega
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

If you attempt to publish a server hosted wasm app it fails

Expected Behavior

Expect to be able to publish

Steps To Reproduce

  1. Using .net 7 RC1 and VS 17.4.0 Preview 2.1 with the workload of 'wasm-tools installed create a blazor wasm app that is server hosted.

  2. issue the following command:

C:\Solutions\TemporarySolutions\BlazorApp2>dotnet publish blazorapp2\server\blazorapp2.server.csproj --os linux --arch x64 --configuration Release -p:PublishProfile=DefaultContainer -p:Version=1.0.0 -p:ContainerImageName=blazorServerApp
  1. Observe the following output:
MSBuild version 17.4.0-preview-22428-01+14c24b2d3 for .NET
  Determining projects to restore...
  All projects are up-to-date for restore.
C:\Program Files\dotnet\sdk\7.0.100-rc.1.22431.12\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(219,5): mes
sage NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\Solutions\TemporarySolutions\BlazorAp
p2\blazorapp2\server\blazorapp2.server.csproj]
C:\Program Files\dotnet\sdk\7.0.100-rc.1.22431.12\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(219,5): mes
sage NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\Solutions\TemporarySolutions\BlazorAp
p2\blazorapp2\Shared\BlazorApp2.Shared.csproj]
  BlazorApp2.Shared -> C:\Solutions\TemporarySolutions\BlazorApp2\blazorapp2\Shared\bin\Release\net7.0\BlazorApp2.Shared.dll
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0-rc.1.22426.10\Sdk\WasmApp.targets(194,5): error : $(MicrosoftNetCor
eAppRuntimePackDir)='', and cannot find %(ResolvedRuntimePack.PackageDirectory)=. One of these need to be set to a valid path [C:\Solutions\T
emporarySolutions\BlazorApp2\blazorapp2\Client\BlazorApp2.Client.csproj]

Exceptions (if any)

None

.NET Version

7.0.100-rc.1.22431.12

Anything else?

C:\Solutions\TemporarySolutions\BlazorApp2>dotnet --info
.NET SDK:
 Version:   7.0.100-rc.1.22431.12
 Commit:    f1cf61e1c0

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19044
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\7.0.100-rc.1.22431.12\

Host:
  Version:      7.0.0-rc.1.22426.10
  Architecture: x64
  Commit:       06aceb7015

.NET SDKs installed:
  3.1.423 [C:\Program Files\dotnet\sdk]
  6.0.400 [C:\Program Files\dotnet\sdk]
  6.0.401 [C:\Program Files\dotnet\sdk]
  7.0.100-rc.1.22431.12 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 3.1.29 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.0-rc.1.22427.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.29 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.0-rc.1.22426.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.29 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 7.0.0-rc.1.22427.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
  x86   [C:\Program Files (x86)\dotnet]
    registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
  Not set

global.json file:
  Not found

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

Download .NET:
  https://aka.ms/dotnet/download
@TanayParikh TanayParikh added area-blazor Includes: Blazor, Razor Components feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly labels Sep 26, 2022
@MackinnonBuck MackinnonBuck added this to the 7.0.0 milestone Sep 27, 2022
@TanayParikh
Copy link
Contributor

Hey @MarkStega is this a regression, or were you trying this out for the first time?

Have you tried adding the build containers package (dotnet add package Microsoft.NET.Build.Containers) prior to publishing? More info here: https://devblogs.microsoft.com/dotnet/announcing-builtin-container-support-for-the-dotnet-sdk/

@TanayParikh TanayParikh added the Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. label Sep 30, 2022
@ghost
Copy link

ghost commented Sep 30, 2022

Hi @MarkStega. 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.

@MarkStega
Copy link
Author

The microsoft.net.build.containers package is installed

The complete repository is at https://github.com/Dioptra/Website.2203 in the vPublish branch

@ghost ghost added Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. and removed Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. labels Oct 2, 2022
@TanayParikh
Copy link
Contributor

And just to confirm, is this a regression, or were you trying this out for the first time?

@TanayParikh TanayParikh added Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. and removed Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. labels Oct 2, 2022
@ghost
Copy link

ghost commented Oct 2, 2022

Hi @MarkStega. 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.

@TanayParikh
Copy link
Contributor

Also just took a quick peek at the project you linked. Are you able to provide a minimal public GitHub project which reproduces this issue?

@MarkStega
Copy link
Author

I am trying to build an app from a simple server hosted web assembly (https://github.com/MarkStega/BlazorApp1). I have not yet been able to reproduce the issue. I will keep adding content from the failing project until I can reproduce...

@ghost ghost added Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. and removed Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. labels Oct 4, 2022
@TanayParikh
Copy link
Contributor

I am trying to build an app from a simple server hosted web assembly (https://github.com/MarkStega/BlazorApp1). I have not yet been able to reproduce the issue. I will keep adding content from the failing project until I can reproduce...

Thanks! Just going to add back the "needs feedback" label.

@TanayParikh TanayParikh added Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. and removed Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. labels Oct 4, 2022
@ghost
Copy link

ghost commented Oct 4, 2022

Hi @MarkStega. 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.

@MarkStega
Copy link
Author

@TanayParikh

I have cut the vPublish branch of https://github.com/Dioptra/Website.2203 to a minimal reproduction project.

@ghost ghost added Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. and removed Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. labels Oct 5, 2022
@TanayParikh
Copy link
Contributor

Thanks @MarkStega, however that branch still has a (lot) of content above the base Blazor template. We request a minimal repro so we can isolate issues to framework code, and help quickly resolve issues. Unfortunately we aren't able to investigate extensively with complex user apps, as that would usually require additional domain context into project architecture and so on.

Would you be able to put together a minimal reproduction application using the base Blazor template?

@TanayParikh TanayParikh added Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. and removed Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. labels Oct 5, 2022
@ghost
Copy link

ghost commented Oct 5, 2022

Hi @MarkStega. 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.

@MarkStega
Copy link
Author

@TanayParikh @japui-coder

I just upgraded the branch to .Net 7 release and the error persists.

It's not a regression, the issue was observed in RC1 when the feature was released.

@bricelam
Copy link
Contributor

@TanayParikh We have a similar report on EF Core (dotnet/efcore#29491) that has regressed our Migration Bundles feature in 7.0. The bundle is a separate project that references the Blazor app. It fails when calling dotnet publish on the bundle project.

@ghost
Copy link

ghost commented Oct 6, 2023

To learn more about what this message means, what to expect next, and how this issue will be handled you can read our Triage Process document.
We're moving this issue to the .NET 9 Planning milestone for future evaluation / consideration. Because it's not immediately obvious what is causing this behavior, we would like to keep this around to collect more feedback, which can later help us determine how to handle this. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact work.

@MarkStega
Copy link
Author

I created a new solution with a wasm client hosted by a server. The publish step still fails, but with a different error message from the original issue.

Current error:

C:\Solutions\TemporarySolutions\BlazorApp2>dotnet publish blazorapp2\server\blazorapp2.server.csproj --os linux --arch x64 --configuration Release -p:PublishProfile=DefaultContainer -p:Version=1.0.0 -p:ContainerImageName=blazorServerApp
MSBuild version 17.8.0-preview-23418-03+0125fc9fb for .NET
  Determining projects to restore...
  Restored C:\Solutions\TemporarySolutions\BlazorApp2\blazorapp2\Shared\BlazorApp2.Shared.csproj (in 590 ms).
  Restored C:\Solutions\TemporarySolutions\BlazorApp2\blazorapp2\Client\BlazorApp2.Client.csproj (in 763 ms).
  Restored C:\Solutions\TemporarySolutions\BlazorApp2\blazorapp2\server\blazorapp2.server.csproj (in 2.17 sec).
C:\Program Files\dotnet\sdk\8.0.100-rc.1.23455.8\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(311,5): message NETSDK1057:
 You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\Solutions\TemporarySolutions\BlazorApp2\blazorapp2\server\blazorapp2
.server.csproj]
C:\Program Files\dotnet\sdk\8.0.100-rc.1.23455.8\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(311,5): message NETSDK1057:
 You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\Solutions\TemporarySolutions\BlazorApp2\blazorapp2\Shared\BlazorApp2
.Shared.csproj]
  BlazorApp2.Shared -> C:\Solutions\TemporarySolutions\BlazorApp2\blazorapp2\Shared\bin\Release\net7.0\BlazorApp2.Shared.dll
C:\Users\ms\.nuget\packages\microsoft.net.sdk.webassembly.pack\8.0.0-rc.1.23419.4\build\Microsoft.NET.Sdk.WebAssembly.Browser.targets(227,28): error MSB4064
: The "Message" parameter is not supported by the "Error" task loaded from assembly: Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKe
yToken=b03f5f7f11d50a3a from the path: C:\Program Files\dotnet\sdk\8.0.100-rc.1.23455.8\Microsoft.Build.Tasks.Core.dll. Verify that the parameter exists on
the task, the <UsingTask> points to the correct assembly, and it is a settable public instance property. [C:\Solutions\TemporarySolutions\BlazorApp2\blazora
pp2\Client\BlazorApp2.Client.csproj]
C:\Users\ms\.nuget\packages\microsoft.net.sdk.webassembly.pack\8.0.0-rc.1.23419.4\build\Microsoft.NET.Sdk.WebAssembly.Browser.targets(227,5): error MSB4063:
 The "Error" task could not be initialized with its input parameters.  [C:\Solutions\TemporarySolutions\BlazorApp2\blazorapp2\Client\BlazorApp2.Client.cspro
j]

C:\Solutions\TemporarySolutions\BlazorApp2>

Current configuration:

C:\Solutions\TemporarySolutions\BlazorApp2>dotnet --info
.NET SDK:
 Version:   8.0.100-rc.1.23455.8
 Commit:    e14caf947f

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19045
 OS Platform: Windows
 RID:         win-x64
 Base Path:   C:\Program Files\dotnet\sdk\8.0.100-rc.1.23455.8\

.NET workloads installed:
There are no installed workloads to display.

Host:
  Version:      8.0.0-rc.1.23419.4
  Architecture: x64
  Commit:       92959931a3
  RID:          win-x64

.NET SDKs installed:
  6.0.414 [C:\Program Files\dotnet\sdk]
  7.0.401 [C:\Program Files\dotnet\sdk]
  8.0.100-rc.1.23455.8 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.22 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.0-rc.1.23421.29 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.22 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.0-rc.1.23419.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 6.0.22 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 7.0.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 8.0.0-rc.1.23420.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
  x86   [C:\Program Files (x86)\dotnet]
    registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
  Not set

global.json file:
  Not found

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

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

C:\Solutions\TemporarySolutions\BlazorApp2>

@MackinnonBuck MackinnonBuck added the Needs: Repro Indicates that the team needs a repro project to continue the investigation on this issue label Dec 5, 2023
@ghost
Copy link

ghost commented Dec 5, 2023

Thank you for filing this issue. In order for us to investigate this issue, please provide a minimal repro project that illustrates the problem without unnecessary code. Please share with us in a public GitHub repo because we cannot open ZIP attachments, and don't include any confidential content.

@ghost ghost added Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. Status: No Recent Activity labels Dec 5, 2023
@ghost
Copy link

ghost commented Dec 11, 2023

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

See our Issue Management Policies for more information.

@MarkStega
Copy link
Author

I have already supplied the minimal steps to reproduce...

@ghost ghost added Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. and removed Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. Status: No Recent Activity labels Dec 11, 2023
@mkArtakMSFT mkArtakMSFT removed the Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. label Dec 13, 2023
@ghost
Copy link

ghost commented Dec 13, 2023

To learn more about what this message means, what to expect next, and how this issue will be handled you can read our Triage Process document.
We're moving this issue to the .NET 9 Planning milestone for future evaluation / consideration. Because it's not immediately obvious what is causing this behavior, we would like to keep this around to collect more feedback, which can later help us determine how to handle this. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact work.

@mkArtakMSFT mkArtakMSFT added the Priority:3 Work that is nice to have label Jan 9, 2024
@mkArtakMSFT mkArtakMSFT closed this as not planned Won't fix, can't repro, duplicate, stale Nov 13, 2024
@mkArtakMSFT
Copy link
Member

Thanks for your report.
We were unable to prioritize this issue due to other more impactful issues that we have on our plate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly investigate Needs: Repro Indicates that the team needs a repro project to continue the investigation on this issue Pillar: Technical Debt Priority:3 Work that is nice to have
Projects
None yet
Development

No branches or pull requests

8 participants
@MarkStega @bricelam @MackinnonBuck @TanayParikh @mkArtakMSFT and others