Skip to content

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

@MarkStega

Description

@MarkStega

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: ReproIndicates that the team needs a repro project to continue the investigation on this issuePillar: Technical DebtPriority:3Work that is nice to havearea-blazorIncludes: Blazor, Razor Componentsfeature-blazor-wasmThis issue is related to and / or impacts Blazor WebAssemblyinvestigate

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions