Skip to content
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

[browser] Publish wasmbrowser app from Visual Studio doesn't respect "include RID in output path" #99159

Open
maraf opened this issue Mar 1, 2024 · 5 comments
Assignees
Labels
arch-wasm WebAssembly architecture area-Build-mono os-browser Browser variant of arch-wasm
Milestone

Comments

@maraf
Copy link
Member

maraf commented Mar 1, 2024

  1. Install WebAssembly Browser App template via command: dotnet workload install wasm-experimental
  2. Create a new WebAssembly Browser App via Visual studio.
  3. Publish the project to folder.

image

Output is located in bin/Release/net8.0/publish instead of bin/Release/net8.0/browser-wasm/publish

The same setup works for blazorwasm template

@maraf maraf added arch-wasm WebAssembly architecture area-Build-mono os-browser Browser variant of arch-wasm labels Mar 1, 2024
@maraf maraf added this to the 9.0.0 milestone Mar 1, 2024
@maraf maraf self-assigned this Mar 1, 2024
@ghost
Copy link

ghost commented Mar 1, 2024

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details
  1. Install WebAssembly Browser App template via command: dotnet workload install wasm-experimental
  2. Create a new WebAssembly Browser App via Visual studio.
  3. Publish the project to folder.

image

Output is located in bin/Release/net8.0/publish instead of bin/Release/net8.0/browser-wasm/publish

Author: maraf
Assignees: maraf
Labels:

arch-wasm, area-Build-mono, os-browser

Milestone: 9.0.0

@JakeYallop
Copy link
Contributor

This might also be related to #94319

@maraf
Copy link
Member Author

maraf commented Mar 1, 2024

This might also be related to #94319

It is a different issue, because it uses completely different SDK under the hood (the plan is to migrate to the SDK used by wasmbrowser)

@maraf
Copy link
Member Author

maraf commented Mar 20, 2024

The issue is this workaround

<!-- Workaround for https://github.com/dotnet/sdk/issues/12114-->
<PublishDir Condition="'$(AppendRuntimeIdentifierToOutputPath)' != 'true' AND '$(PublishDir)' == '$(OutputPath)$(RuntimeIdentifier)\$(PublishDirName)\'">$(OutputPath)$(PublishDirName)\</PublishDir>

I'm not sure yet why I see it working for Blazor SDK correctly (maybe I oversaw it doesn't?)

The FolderPublish.pubxml is different

WasmBrowser

<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
  <PropertyGroup>
    <Configuration>Release</Configuration>
    <Platform>Any CPU</Platform>
    <PublishDir>bin\Release\net9.0\browser-wasm\publish\</PublishDir>
    <PublishProtocol>FileSystem</PublishProtocol>
    <_TargetId>Folder</_TargetId>
  </PropertyGroup>
</Project>

Blazor

<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
  <PropertyGroup>
    <DeleteExistingFiles>false</DeleteExistingFiles>
    <ExcludeApp_Data>false</ExcludeApp_Data>
    <LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
    <LastUsedPlatform>Any CPU</LastUsedPlatform>
    <PublishProvider>FileSystem</PublishProvider>
    <PublishUrl>bin\Release\net9.0\browser-wasm\publish\</PublishUrl>
    <WebPublishMethod>FileSystem</WebPublishMethod>
    <_TargetId>Folder</_TargetId>
  </PropertyGroup>
</Project>

Which might be related to project capabilities

@maraf
Copy link
Member Author

maraf commented Apr 4, 2024

In recent testing it seems that publish from VS dialog doesn't do publish at all. I'm seeing running a Build target.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-wasm WebAssembly architecture area-Build-mono os-browser Browser variant of arch-wasm
Projects
None yet
Development

No branches or pull requests

2 participants