-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Enabling AOT on a project referencing Microsoft.Azure.Cosmos.Table fails compilation #62089
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsDescribe the bugWhen upgrading an existing .NET 5 Blazor WASM app (ASP.NET Core hosted) to .NET 6 proper (i.e. not a preview version), AOT compilation fails when To Reproduce
[Microsoft.Azure.DocumentDB.Core.dll] Exec (with response file contents expanded) in C:\ [omitted] \obj\Release\net6.0\linked: MONO_PATH=C:\ [omitted] \obj\Release\net6.0\linked;C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\6.0.0\runtimes\browser-wasm\native;C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\6.0.0\runtimes\browser-wasm\lib\net6.0 MONO_ENV_OPTIONS= C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm\6.0.0\Sdk..\tools\mono-aot-cross.exe --debug --llvm "--aot=no-opt,static,direct-icalls,deterministic,dwarfdebug,llvm-path=C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.Emscripten.2.0.23.Sdk.win-x64\6.0.0\tools\bin,static,llvmonly,interp,asmonly,llvm-outfile=C:\ [omitted] \obj\Release\net6.0\wasm\for-publish\Microsoft.Azure.DocumentDB.Core.dll.bc.tmp" "Microsoft.Azure.DocumentDB.Core.dll" C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\6.0.0\Sdk\WasmApp.Native.targets(506,5): error : Precompiling failed for C:\ [omitted] \obj\Release\net6.0\linked\Microsoft.Azure.DocumentDB.Core.dll [C:\ [omitted] .csproj] NoteIn case this helps anyone, I did find a soul-crushing workaround: revert to the old skool, long-since-deprecated Additional QuestionWhen Thanks so much! Further technical details
dotnet --info Output.NET SDK (reflecting any global.json): Version: 6.0.100 Commit: 9e8b04bbffRuntime Environment: Host (useful for support): .NET SDKs installed: .NET runtimes installed:
|
Log has: You can wait for the servicing release, or try the latest 7.0.0-alpha* from https://github.com/dotnet/installer#installers-and-binaries . Closing as a dupe of #61053 . |
Describe the bug
When upgrading an existing .NET 5 Blazor WASM app (ASP.NET Core hosted) to .NET 6 proper (i.e. not a preview version), AOT compilation fails when
Microsoft.Azure.Cosmos.Table
is referenced.To Reproduce
dotnet new blazorWasm
<RunAOTCompilation>true</RunAOTCompilation>
dotnet publish -c Release
, and note that it works fine.Microsoft.Azure.Cosmos.Table
(v1.0.8) Nuget package and save.dotnet publish -c Release
again.[Microsoft.Azure.DocumentDB.Core.dll] Exec (with response file contents expanded) in C:\ [omitted] \obj\Release\net6.0\linked: MONO_PATH=C:\ [omitted] \obj\Release\net6.0\linked;C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\6.0.0\runtimes\browser-wasm\native;C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\6.0.0\runtimes\browser-wasm\lib\net6.0 MONO_ENV_OPTIONS= C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm\6.0.0\Sdk..\tools\mono-aot-cross.exe --debug --llvm "--aot=no-opt,static,direct-icalls,deterministic,dwarfdebug,llvm-path=C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.Emscripten.2.0.23.Sdk.win-x64\6.0.0\tools\bin,static,llvmonly,interp,asmonly,llvm-outfile=C:\ [omitted] \obj\Release\net6.0\wasm\for-publish\Microsoft.Azure.DocumentDB.Core.dll.bc.tmp" "Microsoft.Azure.DocumentDB.Core.dll"
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\6.0.0\Sdk\WasmApp.Native.targets(506,5): error : Precompiling failed for C:\ [omitted] \obj\Release\net6.0\linked\Microsoft.Azure.DocumentDB.Core.dll [C:\ [omitted] .csproj]
Note
In case this helps anyone, I did find a soul-crushing workaround: revert to the old skool, long-since-deprecated
WindowsAzure.Storage
(v9.3.3) Nuget package...and it works with .NET 6 Blazor WASM AOT! I'm not actually calling into my Azure repositories from the client; however, I'm stuck with some entities in a shared library that inherit fromTableEntity
which are referenced both in Blazor and on the server.Additional Question
When
WindowsAzure.Storage
was deprecated, I found it a bit awkward that blobs, queues, and files all got their own Nuget packages (that actaully AOT just fine in my project), but it seems like the table storage API got itself mixed up with Cosmos DB. Is there a better package that plays nicely with AOT? I looked atAzure.Data.Tables
but that won't work for me because in hasTableEntity
sealed and therefore my entities can't inherit from it...and my CEO won't pay me to refactor this any further. 😉Thanks so much!
Further technical details
dotnet --info
:dotnet --info Output
.NET SDK (reflecting any global.json): Version: 6.0.100 Commit: 9e8b04bbffRuntime Environment:
OS Name: Windows
OS Version: 10.0.22000
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\6.0.100\
Host (useful for support):
Version: 6.0.0
Commit: 4822e3c
.NET SDKs installed:
3.1.401 [C:\Program Files\dotnet\sdk]
3.1.402 [C:\Program Files\dotnet\sdk]
3.1.415 [C:\Program Files\dotnet\sdk]
5.0.104 [C:\Program Files\dotnet\sdk]
5.0.202 [C:\Program Files\dotnet\sdk]
5.0.203 [C:\Program Files\dotnet\sdk]
5.0.209 [C:\Program Files\dotnet\sdk]
5.0.303 [C:\Program Files\dotnet\sdk]
5.0.402 [C:\Program Files\dotnet\sdk]
5.0.403 [C:\Program Files\dotnet\sdk]
6.0.100 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.All 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.18 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.19 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.21 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.18 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.19 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.21 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.18 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.19 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.21 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
The text was updated successfully, but these errors were encountered: