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

[mono][workloads] Support building net-6.0 wasm workload apps in a net-7.0 sdk #65211

Closed
8 tasks
lewing opened this issue Feb 11, 2022 · 6 comments
Closed
8 tasks

Comments

@lewing
Copy link
Member

lewing commented Feb 11, 2022

The workload tooling doesn't currently have a way to package packs produced outside of the current build as part of a workload. This makes it impossible for a 700 series wasm-tools workload to pull in the right workload packs to build a net-6.0 blowser-wasm app that requires the wasm-tools tooling (wrong cross-compiler and runtime packs).

The same issue will apply to maui workloads once they have an official release.

@dotnet-issue-labeler dotnet-issue-labeler bot added area-Build-mono untriaged New issue has not been triaged by the area owner labels Feb 11, 2022
@lewing lewing added this to the 7.0.0 milestone Feb 11, 2022
@lewing lewing removed the untriaged New issue has not been triaged by the area owner label Feb 11, 2022
@lewing lewing changed the title [wasm][workloads] Support building net-6.0 wasm workload apps in a net-7.0 sdk [mono][workloads] Support building net-6.0 wasm workload apps in a net-7.0 sdk Feb 11, 2022
@steveisok
Copy link
Member

/cc @jonathanpeppers so that you understand MAUI implications.

@jonathanpeppers
Copy link
Member

It does seems like MAUI might hit an issue here, when MAUI is GA at some point a .NET 7 SDK will want to build a .NET 6 MAUI application?

It seems like the way things are setup right now, you'd get build errors and have to use a global.json to point at a .NET 6 version.

@lewing
Copy link
Member Author

lewing commented Mar 11, 2022

sdk design is here dotnet/sdk#24070

@ahmed-salem-me
Copy link

@lewing @radical #69731

@thaystg
Copy link
Member

thaystg commented May 24, 2022

This is the error that I got when I tried to build a net6 app using net7.

1>C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0-preview.4.22229.4\Sdk\WasmApp.Native.targets(275,5): error MSB4018: The "PInvokeTableGenerator" task failed unexpectedly.
1>C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0-preview.4.22229.4\Sdk\WasmApp.Native.targets(275,5): error MSB4018: System.BadImageFormatException: Expected signature header for 'Property' or 'Method', but found '9' (0x09).
1>C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0-preview.4.22229.4\Sdk\WasmApp.Native.targets(275,5): error MSB4018:    at System.Reflection.Metadata.Ecma335.SignatureDecoder`2.CheckMethodOrPropertyHeader(SignatureHeader header)
1>C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0-preview.4.22229.4\Sdk\WasmApp.Native.targets(275,5): error MSB4018:    at System.Reflection.Metadata.Ecma335.SignatureDecoder`2.DecodeMethodSignature(BlobReader& blobReader)
1>C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0-preview.4.22229.4\Sdk\WasmApp.Native.targets(275,5): error MSB4018:    at System.Reflection.Metadata.Ecma335.SignatureDecoder`2.DecodeType(BlobReader& blobReader, Boolean allowTypeSpecifications, Int32 typeCode)
1>C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0-preview.4.22229.4\Sdk\WasmApp.Native.targets(275,5): error MSB4018:    at System.Reflection.Metadata.Ecma335.SignatureDecoder`2.DecodeMethodSignature(BlobReader& blobReader)
1>C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0-preview.4.22229.4\Sdk\WasmApp.Native.targets(275,5): error MSB4018:    at System.Reflection.Metadata.MethodDefinition.DecodeSignature[TType,TGenericContext](ISignatureTypeProvider`2 provider, TGenericContext genericContext)
1>C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0-preview.4.22229.4\Sdk\WasmApp.Native.targets(275,5): error MSB4018:    at System.Reflection.TypeLoading.Ecma.EcmaMethodDecoder.SpecializeMethodSigStrings(TypeContext& typeContext)
1>C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0-preview.4.22229.4\Sdk\WasmApp.Native.targets(275,5): error MSB4018:    at System.Reflection.TypeLoading.RoDefinitionMethod`1.ComputeMethodSigStrings()
1>C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0-preview.4.22229.4\Sdk\WasmApp.Native.targets(275,5): error MSB4018:    at System.Reflection.TypeLoading.RoMethod.ToString()
1>C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0-preview.4.22229.4\Sdk\WasmApp.Native.targets(275,5): error MSB4018:    at System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args)
1>C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0-preview.4.22229.4\Sdk\WasmApp.Native.targets(275,5): error MSB4018:    at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
1>C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0-preview.4.22229.4\Sdk\WasmApp.Native.targets(275,5): error MSB4018:    at PInvokeComparer.GetHashCode(PInvoke pinvoke)
1>C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0-preview.4.22229.4\Sdk\WasmApp.Native.targets(275,5): error MSB4018:    at System.Linq.Set`1.InternalGetHashCode(TElement value)
1>C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0-preview.4.22229.4\Sdk\WasmApp.Native.targets(275,5): error MSB4018:    at System.Linq.Set`1.Find(TElement value, Boolean add)
1>C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0-preview.4.22229.4\Sdk\WasmApp.Native.targets(275,5): error MSB4018:    at System.Linq.Enumerable.<DistinctIterator>d__64`1.MoveNext()
1>C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0-preview.4.22229.4\Sdk\WasmApp.Native.targets(275,5): error MSB4018:    at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
1>C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0-preview.4.22229.4\Sdk\WasmApp.Native.targets(275,5): error MSB4018:    at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
1>C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0-preview.4.22229.4\Sdk\WasmApp.Native.targets(275,5): error MSB4018:    at PInvokeTableGenerator.EmitPInvokeTable(StreamWriter w, Dictionary`2 modules, List`1 pinvokes)
1>C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0-preview.4.22229.4\Sdk\WasmApp.Native.targets(275,5): error MSB4018:    at PInvokeTableGenerator.GenPInvokeTable(String[] pinvokeModules, String[] assemblies)
1>C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0-preview.4.22229.4\Sdk\WasmApp.Native.targets(275,5): error MSB4018:    at PInvokeTableGenerator.Execute()
1>C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0-preview.4.22229.4\Sdk\WasmApp.Native.targets(275,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
1>C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.0-preview.4.22229.4\Sdk\WasmApp.Native.targets(275,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()

@lewing
Copy link
Member Author

lewing commented Sep 6, 2022

fixed in rc1

@lewing lewing closed this as completed Sep 6, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Oct 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants