如何解决Runtime.OpenSilver.csproj中CS0579重复属性编译错误?
解决CS0579重复AssemblyVersionAttribute属性错误
在部分配置环境下,编译器会报出以下错误:
error CS0579: Duplicate 'System.Reflection.AssemblyVersionAttribute' attribute [path\OpenSilverFramework\src\Runtime\Runtime\Runtime.OpenSilver.csproj]
这类重复属性问题的出现可能因系统环境差异而不同,针对.NET与.NET Core混合的方案,可通过修改Runtime.OpenSilver.csproj文件解决:在项目文件中添加如下配置节点,禁用自动生成的程序集信息和目标框架属性:
<PropertyGroup> <GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute> <GenerateAssemblyInfo>false</GenerateAssemblyInfo> </PropertyGroup>
内容的提问来源于stack exchange,提问作者ugiacobbi
相关产品推荐
相关产品推荐

