Visual studio 2010 将VS 2008项目转换为VS 2010后获取aspnet_合并错误

Visual studio 2010 将VS 2008项目转换为VS 2010后获取aspnet_合并错误,visual-studio-2010,visual-studio-2008,dll,.net-assembly,aspnet-merge,Visual Studio 2010,Visual Studio 2008,Dll,.net Assembly,Aspnet Merge,我犯了一个错误 "aspnet_merge: error 1023: The assemblies cannot be merged because some assemblies have inconsistent attributes: System.Runtime.CompilerServices.ExtensionAttribute. Use -a option to force merge. Use -allowattrs to specify the attributes to sk

我犯了一个错误

"aspnet_merge: error 1023: The assemblies cannot be merged because some assemblies have inconsistent attributes: System.Runtime.CompilerServices.ExtensionAttribute. Use -a option to force merge. Use -allowattrs to specify the attributes to skip when checking for consistency."
合并程序集时

我之前所做的,只需在我的VS 2010中打开VS 2008解决方案而不更改.Net Framework(当VS 2010提示我将.Net Framework更改为4.0时选择“否”),并解决此错误
**缺少编译器必需的成员System.Runtime。编译器服务。ExtensionAttribute..ctor**
将NewtonSoft dll版本从2.0更改为3.5

现在,在成功发布我的项目后,我必须合并dll,但我遇到了上述错误。我已经签入了不同版本的aspnet_merge(3.5/4.0),但得到了相同的错误


请告诉我需要做什么。

这是因为项目没有引用Microsoft.CSharp。一旦我添加了对该程序集的引用,它就可以正常编译了

如果问题仍然存在,请尝试重新安装
JSON.Net

PM> Install-Package Newtonsoft.Json -Version x.x.x.x