Skip to content

[wasm] Windows build fails when with -os browser #54926

@radekdoulik

Description

@radekdoulik

The windows build fails when the build.cmds -os parameter is not capitalized.

With these errors:

C:\r\src\libraries\shims\manual\System.forwards.cs(8,88): error CS0234: The type or namespace name 'ZLibException' does not exist in the namespace 'System.IO.Compression' (are you missing an assembly reference?) [C:\r\src\libraries\shims\manual\System.csproj]
C:\r\src\libraries\shims\manual\System.forwards.cs(9,77): error CS0234: The type or namespace name 'CookieVariant' does not exist in the namespace 'System.Net' (are you missing an assembly reference?) [C:\r\src\libraries\shims\manual\System.csproj]
C:\r\src\libraries\shims\manual\System.forwards.cs(10,77): error CS0234: The type or namespace name 'PathList' does not exist in the namespace 'System.Net' (are you missing an assembly reference?) [C:\r\src\libraries\shims\manual\System.csproj]

The issue here is that the parameter value is passed to msbuild as /p:TargetOS=browser and later used in target framework. Some projects, like System.IO.Compression.csproj contain:

<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-Browser</TargetFrameworks>

The target frameworks are case sensitive and the project is not build with $(NetCoreAppCurrent)-Browser, which leads later to missing references, when building System.csproj.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions