Am I the only one getting “Assembly Not Available in the Currently Targeted Framework”?

点点圈 提交于 2019-12-02 09:50:43

Go into project properties and change the Target Framework to .NET Framework 4. I'm guessing you're using a project type whose default is .NET Framework 4 Client Profile. (like console app, for example)

I'm having exactly the same problem with Visual Studio suddenly being unable to reference these assemblies: System.ServiceProcess System.Configuration.Install

The only way to fix it is to re-install Visual Studio 2010 and abandon all hope of using Moles until it's fixed.

Visual Studio 2010 generated the following reference elements, in the .csproj files:

<Reference Include="System.Configuration.Install" />
<Reference Include="System.ServiceProcess" />

To correct the problem, the XML must be modified, to:

<Reference Include="System.Configuration.Install">
    <SpecificVersion>True</SpecificVersion>
</Reference>
<Reference Include="System.ServiceProcess">
    <SpecificVersion>True</SpecificVersion>
</Reference>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!