dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.18k stars 4.72k forks source link

dotnet publish with aot enabled failed #56556

Closed qinhuaihe closed 3 years ago

qinhuaihe commented 3 years ago

Describe the bug

I was publishing my blazor wasm with aot enabled. And I met some exceptions. I don't know how to figure out this problem. Please help me, Thank you.

To Reproduce

Exceptions (if any)

lucky@elitebook MINGW64 /d/0000_00_TSJW/VC_2021/Telossoft.K12VC.Web
$ dotnet publish
Microsoft (R) Build Engine version 17.0.0-preview-21329-01+1b7661f36 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
  All projects are up-to-date for restore.
  You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview
  You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview
  You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview
  You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview
  You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview
  You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview
  Telossoft.K12VC.ScheduleModel -> D:\0000_00_TSJW\VC_2021\Model\Telossoft.K12VC.ScheduleModel\bin\Debug\net5.0\Telossoft.K12VC.ScheduleModel.dll
  Telossoft.K12JW.Model -> D:\0000_00_TSJW\VC_2021\Model\Telossoft.K12JW.Model\bin\Debug\net5.0\Telossoft.K12JW.Model.dll
  Telossoft.K12VC.Library -> D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Library\bin\Debug\netcoreapp5\Telossoft.K12VC.Library.dll
  Telossoft.K12VC.Library.HzPy -> D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Library.HzPy\bin\Debug\netcoreapp5\Telossoft.K12VC.Library.HzPy.dll
  Telossoft.K12VC.Model -> D:\0000_00_TSJW\VC_2021\Model\Telossoft.K12VC.Model\bin\Debug\net5.0\Telossoft.K12VC.Model.dll
  Telossoft.K12VC.ClientBizLogic -> D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.ClientBizLogic\bin\Debug\net5.0\Telossoft.K12VC.ClientBizLogic.dll
  Telossoft.K12VC.Web -> D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Web\bin\Debug\net6.0\Telossoft.K12VC.Web.dll
  Telossoft.K12VC.Web (Blazor output) -> D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Web\bin\Debug\net6.0\wwwroot
  Optimizing assemblies for size, which may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
  AOT'ing 110 assemblies
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\6.0.0-preview.6.21352.12\Sdk\WasmApp.Native.targets(399,5): warning : Failed to load method 0x600000b from 'D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Web\obj\Debug\net6.0\linked\Excubo.Generators.Blazor.dll' due to Could not load file or assembly 'Microsoft.CodeAnalysis, Version=3.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.. [D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Web\Telossoft.K12VC.Web.csproj]
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\6.0.0-preview.6.21352.12\Sdk\WasmApp.Native.targets(399,5): warning : Run with MONO_LOG_LEVEL=debug for more information. [D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Web\Telossoft.K12VC.Web.csproj]
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\6.0.0-preview.6.21352.12\Sdk\WasmApp.Native.targets(399,5): warning : AOT of image Excubo.Generators.Blazor.dll failed. [D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Web\Telossoft.K12VC.Web.csproj]
  Exit code: 1
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\6.0.0-preview.6.21352.12\Sdk\WasmApp.Native.targets(399,5): error : Precompiling failed for D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Web\obj\Debug\net6.0\linked\Excubo.Generators.Blazor.dll: Error: Process returned non-zero exit code: Failed to load method 0x600000b from 'D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Web\obj\Debug\net6.0\linked\Excubo.Generators.Blazor.dll' due to Could not load file or assembly 'Microsoft.CodeAnalysis, Version=3.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.. [D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Web\Telossoft.K12VC.Web.csproj]
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\6.0.0-preview.6.21352.12\Sdk\WasmApp.Native.targets(399,5): error : Mono Ahead of Time compiler - compiling assembly D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Web\obj\Debug\net6.0\linked\Excubo.Generators.Blazor.dll [D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Web\Telossoft.K12VC.Web.csproj]
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\6.0.0-preview.6.21352.12\Sdk\WasmApp.Native.targets(399,5): error : Run with MONO_LOG_LEVEL=debug for more information. [D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Web\Telossoft.K12VC.Web.csproj]
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\6.0.0-preview.6.21352.12\Sdk\WasmApp.Native.targets(399,5): error : AOT of image Excubo.Generators.Blazor.dll failed. [D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Web\Telossoft.K12VC.Web.csproj]
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\6.0.0-preview.6.21352.12\Sdk\WasmApp.Native.targets(399,5): error :  [D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Web\Telossoft.K12VC.Web.csproj]
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\6.0.0-preview.6.21352.12\Sdk\WasmApp.Native.targets(399,5): error :  [D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Web\Telossoft.K12VC.Web.csproj]
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\6.0.0-preview.6.21352.12\Sdk\WasmApp.Native.targets(399,5): error :  [D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Web\Telossoft.K12VC.Web.csproj]

Further technical details

Runtime Environment: OS Name: Windows OS Version: 10.0.19042 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\6.0.100-preview.6.21355.2\

Host (useful for support): Version: 6.0.0-preview.6.21352.12 Commit: 770d630b28

.NET SDKs installed: 5.0.102 [C:\Program Files\dotnet\sdk] 5.0.200 [C:\Program Files\dotnet\sdk] 5.0.302 [C:\Program Files\dotnet\sdk] 5.0.400-preview.21328.4 [C:\Program Files\dotnet\sdk] 6.0.100-preview.6.21355.2 [C:\Program Files\dotnet\sdk]

.NET runtimes installed: Microsoft.AspNetCore.All 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.0-preview.6.21355.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-preview.6.21352.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.15 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.1.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.0-preview.6.21353.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET runtimes or SDKs: https://aka.ms/dotnet-download


- The IDE (VS / VS Code/ VS4Mac) you're running on, and its version
dotnet-issue-labeler[bot] commented 3 years ago

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.

mkArtakMSFT commented 3 years ago

@lewing FYI

radical commented 3 years ago

@qinhuaihe Could you please run: dotnet clean; dotnet publish -bl, and then share the generated msbuild.binlog? Also, could you share your project file?

ghost commented 3 years ago

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

Issue Details
### Describe the bug I was publishing my blazor wasm with aot enabled. And I met some exceptions. I don't know how to figure out this problem. Please help me, Thank you. ### To Reproduce ### Exceptions (if any) ``` lucky@elitebook MINGW64 /d/0000_00_TSJW/VC_2021/Telossoft.K12VC.Web $ dotnet publish Microsoft (R) Build Engine version 17.0.0-preview-21329-01+1b7661f36 for .NET Copyright (C) Microsoft Corporation. All rights reserved. Determining projects to restore... All projects are up-to-date for restore. You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview Telossoft.K12VC.ScheduleModel -> D:\0000_00_TSJW\VC_2021\Model\Telossoft.K12VC.ScheduleModel\bin\Debug\net5.0\Telossoft.K12VC.ScheduleModel.dll Telossoft.K12JW.Model -> D:\0000_00_TSJW\VC_2021\Model\Telossoft.K12JW.Model\bin\Debug\net5.0\Telossoft.K12JW.Model.dll Telossoft.K12VC.Library -> D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Library\bin\Debug\netcoreapp5\Telossoft.K12VC.Library.dll Telossoft.K12VC.Library.HzPy -> D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Library.HzPy\bin\Debug\netcoreapp5\Telossoft.K12VC.Library.HzPy.dll Telossoft.K12VC.Model -> D:\0000_00_TSJW\VC_2021\Model\Telossoft.K12VC.Model\bin\Debug\net5.0\Telossoft.K12VC.Model.dll Telossoft.K12VC.ClientBizLogic -> D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.ClientBizLogic\bin\Debug\net5.0\Telossoft.K12VC.ClientBizLogic.dll Telossoft.K12VC.Web -> D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Web\bin\Debug\net6.0\Telossoft.K12VC.Web.dll Telossoft.K12VC.Web (Blazor output) -> D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Web\bin\Debug\net6.0\wwwroot Optimizing assemblies for size, which may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink AOT'ing 110 assemblies C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\6.0.0-preview.6.21352.12\Sdk\WasmApp.Native.targets(399,5): warning : Failed to load method 0x600000b from 'D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Web\obj\Debug\net6.0\linked\Excubo.Generators.Blazor.dll' due to Could not load file or assembly 'Microsoft.CodeAnalysis, Version=3.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.. [D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Web\Telossoft.K12VC.Web.csproj] C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\6.0.0-preview.6.21352.12\Sdk\WasmApp.Native.targets(399,5): warning : Run with MONO_LOG_LEVEL=debug for more information. [D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Web\Telossoft.K12VC.Web.csproj] C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\6.0.0-preview.6.21352.12\Sdk\WasmApp.Native.targets(399,5): warning : AOT of image Excubo.Generators.Blazor.dll failed. [D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Web\Telossoft.K12VC.Web.csproj] Exit code: 1 C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\6.0.0-preview.6.21352.12\Sdk\WasmApp.Native.targets(399,5): error : Precompiling failed for D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Web\obj\Debug\net6.0\linked\Excubo.Generators.Blazor.dll: Error: Process returned non-zero exit code: Failed to load method 0x600000b from 'D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Web\obj\Debug\net6.0\linked\Excubo.Generators.Blazor.dll' due to Could not load file or assembly 'Microsoft.CodeAnalysis, Version=3.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.. [D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Web\Telossoft.K12VC.Web.csproj] C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\6.0.0-preview.6.21352.12\Sdk\WasmApp.Native.targets(399,5): error : Mono Ahead of Time compiler - compiling assembly D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Web\obj\Debug\net6.0\linked\Excubo.Generators.Blazor.dll [D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Web\Telossoft.K12VC.Web.csproj] C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\6.0.0-preview.6.21352.12\Sdk\WasmApp.Native.targets(399,5): error : Run with MONO_LOG_LEVEL=debug for more information. [D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Web\Telossoft.K12VC.Web.csproj] C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\6.0.0-preview.6.21352.12\Sdk\WasmApp.Native.targets(399,5): error : AOT of image Excubo.Generators.Blazor.dll failed. [D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Web\Telossoft.K12VC.Web.csproj] C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\6.0.0-preview.6.21352.12\Sdk\WasmApp.Native.targets(399,5): error : [D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Web\Telossoft.K12VC.Web.csproj] C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\6.0.0-preview.6.21352.12\Sdk\WasmApp.Native.targets(399,5): error : [D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Web\Telossoft.K12VC.Web.csproj] C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\6.0.0-preview.6.21352.12\Sdk\WasmApp.Native.targets(399,5): error : [D:\0000_00_TSJW\VC_2021\Telossoft.K12VC.Web\Telossoft.K12VC.Web.csproj] ``` ### Further technical details - ASP.NET Core version `.net 6` - Include the output of `dotnet --info` ``` lucky@elitebook MINGW64 /d/0000_00_TSJW/VC_2021/Telossoft.K12VC.Web $ dotnet --info .NET SDK (reflecting any global.json): Version: 6.0.100-preview.6.21355.2 Commit: 7f8e0d76c0 Runtime Environment: OS Name: Windows OS Version: 10.0.19042 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\6.0.100-preview.6.21355.2\ Host (useful for support): Version: 6.0.0-preview.6.21352.12 Commit: 770d630b28 .NET SDKs installed: 5.0.102 [C:\Program Files\dotnet\sdk] 5.0.200 [C:\Program Files\dotnet\sdk] 5.0.302 [C:\Program Files\dotnet\sdk] 5.0.400-preview.21328.4 [C:\Program Files\dotnet\sdk] 6.0.100-preview.6.21355.2 [C:\Program Files\dotnet\sdk] .NET runtimes installed: Microsoft.AspNetCore.All 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.0-preview.6.21355.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-preview.6.21352.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.15 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.1.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.0-preview.6.21353.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] To install additional .NET runtimes or SDKs: https://aka.ms/dotnet-download ``` - The IDE (VS / VS Code/ VS4Mac) you're running on, and its version
Author: qinhuaihe
Assignees: radical
Labels: `arch-wasm`, `area-Build-mono`
Milestone: 6.0.0
qinhuaihe commented 3 years ago

msbuild.binlog.zip

qinhuaihe commented 3 years ago

This is my project file:

<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

  <PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>
    <RunAOTCompilation>true</RunAOTCompilation>
    <TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
    <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
  </PropertyGroup>

  <ItemGroup>
    <EmscriptenEnvVars Include="PYTHONUTF8=1" />
  </ItemGroup>

  <!--<Target Name="AAA" BeforeTargets="PreBuildEvent" Condition="'$(Configuration)' == 'Debug'">
    <Message Importance="high" Text="Build Project For Debug=================================================================="></Message>
    <Exec Command="npm install" WorkingDirectory="./" />
    <Exec Command="npm run build:debug" WorkingDirectory="./" />
  </Target>-->
  <!--<Target Name="BBB" BeforeTargets="PreBuildEvent" Condition="'$(Configuration)' == 'Release'">
    <Message Importance="high" Text="Build Project For Release=================================================================="></Message>
    <Exec Command="npm install" WorkingDirectory="./" />
    <Exec Command="npm run build:release" WorkingDirectory="./" />
  </Target>-->

  <ItemGroup>
    <Compile Remove="BizLogic\DataProvider\AbsRuleProviderImpl.cs" />
    <Compile Remove="BizLogic\DataProvider\AbsRuleProviderImpl_Get.cs" />
    <Compile Remove="BizLogic\DataProvider\AbsRuleProviderImpl_InitEntity.cs" />
    <Compile Remove="BizLogic\DataProvider\AbsRuleProviderImpl_InitLsn.cs" />
    <Compile Remove="BizLogic\ScheduleMng\ScheduleAnalysis_GetOPV1.cs" />
    <Compile Remove="Components\BaseDataSelect\BaseSelectModal.razor.cs" />
    <Compile Remove="Components\BaseDataSelect\SelectModal.razor.cs" />
    <Compile Remove="Components\EntityTree.razor.build.cs" />
    <Compile Remove="View\ViewGradeLessonDetail.cs" />
    <Compile Remove="View\ViewLockedEntityAndAct.cs" />
    <Compile Remove="View\ViewMeeting.cs" />
    <Compile Remove="View\VmOperationEvent.cs" />
  </ItemGroup>

  <ItemGroup>
    <Content Remove="Components\BaseDataSelect\BaseSelectModal.razor" />
    <Content Remove="Components\BaseDataSelect\SelectModal.razor" />
  </ItemGroup>

  <ItemGroup>
    <None Remove="Components\BaseDataSelect\SelectModal.razor.cs.text" />
    <None Remove="src\DataGridHandler.ts" />
    <None Remove="src\global.d.ts" />
    <None Remove="src\ScheduleHandler.ts" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="AntDesign" Version="0.9.0" />
    <PackageReference Include="Blazor.ContextMenu" Version="1.10.0" />
    <PackageReference Include="Blazored.LocalStorage" Version="4.1.2" />
    <PackageReference Include="Blazored.SessionStorage" Version="2.1.0" />
    <PackageReference Include="Excubo.Blazor.TreeViews" Version="2.2.11" />
    <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.0-preview.6.21355.2" />
    <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.0-preview.6.21355.2" PrivateAssets="all" />
    <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
    <PackageReference Include="System.Net.Http.Json" Version="6.0.0-preview.6.21352.12" />
    <PackageReference Include="System.Reactive" Version="5.0.0" />
    <PackageReference Include="Toolbelt.Blazor.HttpClientInterceptor" Version="9.2.1" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\Telossoft.K12VC.Library.HzPy\Telossoft.K12VC.Library.HzPy.csproj" />
    <ProjectReference Include="..\Model\Telossoft.K12JW.Model\Telossoft.K12JW.Model.csproj" />
    <ProjectReference Include="..\Model\Telossoft.K12VC.Model\Telossoft.K12VC.Model.csproj" />
    <ProjectReference Include="..\Model\Telossoft.K12VC.ScheduleModel\Telossoft.K12VC.ScheduleModel.csproj" />
    <ProjectReference Include="..\Telossoft.K12VC.ClientBizLogic\Telossoft.K12VC.ClientBizLogic.csproj" />
    <ProjectReference Include="..\Telossoft.K12VC.Library\Telossoft.K12VC.Library.csproj" />
  </ItemGroup>

  <ItemGroup>
    <Folder Include="Pages\Index\" />
  </ItemGroup>

  <ItemGroup>
    <None Include="wwwroot\index.d25eade0f685d62d3855.js" />
  </ItemGroup>

  <ItemGroup>
    <TypeScriptCompile Include="src\DataGridHandler.ts" />
    <TypeScriptCompile Include="src\global.d.ts" />
    <TypeScriptCompile Include="src\ScheduleHandler.ts" />
  </ItemGroup>
</Project>
radical commented 3 years ago

It's failing to cross compile Excubo.Generators.Blazor.dll, which is a source generator from Excubo.Generators.Blazor nuget.

  1. The upstream package (https://github.com/excubo-ag/Generators.Blazor) should be fixed to avoid placing the assembly in lib, unless that's intentional.

    • I tried removing the file from ~/.nuget/packages/excubo.generators.blazor/1.13.1/lib/netstandard2.0, and then I was able to build a simple blazor project which referenced the package
  2. It should still, probably, not fail, and I'm investigating that.

radical commented 3 years ago

The Excubo.Generators.Blazor package doesn't specify the relevant dependencies, like for Microsoft.CodeAnalysis*. That causes the publish step, and thus AOT, to not have some dependencies, and mono-aot-cross fails with that.

Solution would be to not have the assembly in lib folder, but if that's needed then the dependencies need to be correctly set in the nuget package.

radical commented 3 years ago

I opened an issue upstream - https://github.com/excubo-ag/Generators.Blazor/issues/2 . Closing this one.

stefanloerwald commented 3 years ago

Hi @qinhuaihe,

please try upgrading Excubo.Blazor.TreeViews to version 2.2.12, which references Excubo.Generators.Blazor version 1.14.0.

Thanks Stefan

qinhuaihe commented 3 years ago

@radical @stefanloerwald Thank you both for your help. You did me a great favor.