Closed qinhuaihe closed 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.
@lewing FYI
@qinhuaihe Could you please run: dotnet clean; dotnet publish -bl
, and then share the generated msbuild.binlog
? Also, could you share your project file?
Tagging subscribers to 'arch-wasm': @lewing See info in area-owners.md if you want to be subscribed.
Author: | qinhuaihe |
---|---|
Assignees: | radical |
Labels: | `arch-wasm`, `area-Build-mono` |
Milestone: | 6.0.0 |
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>
It's failing to cross compile Excubo.Generators.Blazor.dll
, which is a source generator from Excubo.Generators.Blazor
nuget.
analyzers/dotnet/cs
, which is needed to enable it's use as a source generatorlib/netstandard2.0
, which causes it to be used as an assembly reference tooThe upstream package (https://github.com/excubo-ag/Generators.Blazor) should be fixed to avoid placing the assembly in lib
, unless that's intentional.
~/.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 packageIt should still, probably, not fail, and I'm investigating that.
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.
I opened an issue upstream - https://github.com/excubo-ag/Generators.Blazor/issues/2 . Closing this one.
Hi @qinhuaihe,
please try upgrading Excubo.Blazor.TreeViews to version 2.2.12, which references Excubo.Generators.Blazor version 1.14.0.
Thanks Stefan
@radical @stefanloerwald Thank you both for your help. You did me a great favor.
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)
Further technical details
.net 6
dotnet --info
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