首先,我发现了StackOverflow here上的其他帖子,但它没有解决我的错误。混合模式程序集是针对'v2.0.50727'错误而构建的
我有3个不同的环境/域与每个位置的生成服务器。我的Dev和UAT环境构建得很好,但生产版本不起作用。
,我发现了错误
混合模式组件建立对 运行时的版本“V2.0.50727,且不能在4.0运行时无需额外 配置信息被加载
我已将此标记添加到我的app.config文件(这是我在上面的链接中建议的修复)
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
</startup>
我的构建服务器/环境/域可能会导致此问题有什么不同?
针对艾伦的问题,我相信这是你问:
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{D3D87C05-2811-489B-9F0D-7676B6485AA0}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MVST.Batch.CorrespondenceConversion</RootNamespace>
<AssemblyName>MVST.Batch.CorrespondenceConversion</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
我有超过100的设置完全相同的方式和那些建立确定的其他项目。
是否在生产环境中安装了.Net 4.0? – TheKingDave 2013-02-11 15:23:42
是的,我在C:\ Windows \ Microsoft.NET \ Framework文件夹中显示以及Framework64文件夹都有v4.0。30319 – ganders 2013-02-11 15:27:14
平台工具集的哪个版本可以满足您的混合模式程序集要求,并且存在于prod服务器上? – allen 2013-02-11 15:38:41