unoplatform / uno

Open-source platform for building cross-platform native Mobile, Web, Desktop and Embedded apps quickly. Create rich, C#/XAML, single-codebase apps from any IDE. Hot Reload included! 90m+ NuGet Downloads!!
https://platform.uno
Apache License 2.0
9.03k stars 733 forks source link

`net9.0-browserwasm` build raising a WasmAssembliesToBundle error with Uno Library #18860

Closed SongOfYouth closed 2 days ago

SongOfYouth commented 2 days ago

Current behavior

when build for browserwasm, it raises WasmAssembliesToBundle item is empty. No assemblies to process error.

Expected behavior

No response

How to reproduce it (as minimally and precisely as possible)

Add a net9.0 Uno Library and build it.

Workaround

No response

Works on UWP/WinUI

None

Environment

Other

NuGet package version(s)

No response

Affected platforms

WebAssembly

IDE

Visual Studio 2022

IDE version

17.12.0

Relevant plugins

No response

Anything else we need to know?

No response

SongOfYouth commented 2 days ago

with my attempt, net9.0-browserwasm only works for <OutputType>exe</OutputType> but not <OutputType>Library</OutputType>

jeromelaban commented 2 days ago

Thanks for the report, this is fixed in https://github.com/unoplatform/uno/pull/18806, a service release will be available soon.

As a workaround you can add this your project:

<PropertyGroup>
  <IsBrowserWasmProject>false</IsBrowserWasmProject>
</PropertyGroup>
SongOfYouth commented 2 days ago
<IsBrowserWasmProject>false</IsBrowserWasmProject>

Thanks fort the timly reply, and it works!