打开 关闭

Blazor - 'System.Runtime.CompilerServices.SuppressIldasmAttribute.SuppressIldasmAttribute()' in assembly #662


User avatar
1
alper 创建
支持团队 Director

I got the following error while publishing the Blazor project:

System.Runtime.CompilerServices.SuppressIldasmAttribute.SuppressIldasmAttribute()


4 答案
  • User Avatar
    0
    alper 创建
    支持团队 Director

    Add the following line to your Blazor.csproj

    <PublishTrimmed>false</PublishTrimmed>
    

  • User Avatar
    0
    alper 创建
    支持团队 Director

    @david.hurtado gets error when publishing his Blazor app. Reported here https://support.abp.io/QA/Questions/626/Bugs--Issues-v4X#answer-483f87d2-bff9-c59b-c696-39f95f90af2e

    @david can you create a new empty Blazor app and add <PublishTrimmed>false</PublishTrimmed> then publish it to your server? we will understand if the issue is in your code or in the app-template, then we'll solve the problem.

  • User Avatar
    0
    david.hurtado 创建

    @alper Thanks for your help and suggets. I gonna probe that option.

    I wan to make aditional comment We had been make a publish with ABP 3.3.1 on comunity version. And we don't get this errors. For Commercial ABP 4.0.0 with dot net 5, the numbers of files has incremented sifnificative, and is on this version when staring this errors.

  • User Avatar
    0
    alper 创建
    支持团队 Director

    I guess you'll also get this in the community version. The reason is probably "Tree Shaking" is not workng as expected in Blazor. And there are reflection usages in the ABP framework. Due to the use of reflection, it just cannot make a stable tree shaking. https://github.com/dotnet/aspnetcore/issues/28546

    Until Microsoft fixes this, we can disable tree-shaking temporarily.

Made with ❤️ on ABP v8.2.0-preview Updated on 三月 25, 2024, 15:11