ASP.NET 4.5 基于 v2.0.50727 构建的 Web App 混合模式程序集
ASP.NET 4.5 Web App mixed mode assembly built against v2.0.50727
在我添加对第三方工具的 Web 引用后,我在 SGEN 文件中的 Web 应用程序中遇到此错误。
Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.
我找到了这个解决方案,但我认为 app.config 不能添加到 Web 应用程序。 Mixed mode assembly is built against version 'v1.1.4322'
我将其添加到 web.config,但没有用。
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0.30319" sku=".NETFramework,Version=v4.0,Profile=Client" />
</startup>
我也将其添加到 sn.exe.config 文件中,但这也没有帮助:
<startup useLegacyV2RuntimeActivationPolicy="true">
有人有什么想法吗?
这对我有用:项目-> 右键单击-> 属性-> 构建-> 生成序列化程序集。将此处的值从 "Auto" 更改为关闭并重新构建。
我不确定为什么会这样,但您可以在 this Whosebug 答案中阅读更多关于生成序列化程序集的信息。
在我添加对第三方工具的 Web 引用后,我在 SGEN 文件中的 Web 应用程序中遇到此错误。
Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.
我找到了这个解决方案,但我认为 app.config 不能添加到 Web 应用程序。 Mixed mode assembly is built against version 'v1.1.4322'
我将其添加到 web.config,但没有用。
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0.30319" sku=".NETFramework,Version=v4.0,Profile=Client" />
</startup>
我也将其添加到 sn.exe.config 文件中,但这也没有帮助:
<startup useLegacyV2RuntimeActivationPolicy="true">
有人有什么想法吗?
这对我有用:项目-> 右键单击-> 属性-> 构建-> 生成序列化程序集。将此处的值从 "Auto" 更改为关闭并重新构建。
我不确定为什么会这样,但您可以在 this Whosebug 答案中阅读更多关于生成序列化程序集的信息。