【问题标题】:Visual Studio and msbuild produces .net 4 resources dlls instead of 3.5Visual Studio 和 msbuild 生成 .net 4 资源 dll 而不是 3.5
【发布时间】:2021-09-11 17:43:03
【问题描述】:

如果您按照 Access resx resource files from another project 上的说明使用 resx 文件创建翻译,则当项目为 .net 3.5 时,它无法正常工作,并且似乎忽略了指定的文化。

问题似乎是我的构建链所特有的。 我已经安装了

  • .net 4.8
  • Windows SDK 10(我有这个 C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 工具)
  • Visual Studio 2019

当我使用 jetbrain 的 dotPeek 检查输出 DLL 时,我看到卫星 DLL 是 .net 4.0

一位同事没有 .net 4.8 或 Windows SDK 10,但他生成卫星 DLL .net 3.5 他有 Windows SDK 7。

AFAIK 的问题在于输出这些 DLL 的 al.exe。

【问题讨论】:

    标签: msbuild .net-3.5 resx al.exe


    【解决方案1】:

    问题确实出在al.exe 上。 al.exe.config 中的配置指定它应该支持dotnet 的v4.0

    <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v4.0.30319"/>
    </startup>
    

    然后将其更改为:

    <startup>
        <supportedRuntime version="v2.0.50727"/>
    </startup>
    

    解决了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-01-02
      • 1970-01-01
      • 2013-10-15
      相关资源
      最近更新 更多