Asp.net 无法通过VS2013在IIS Express上运行.net 3.5网页
我最近升级到VS2013。我在Windows8企业版计算机上运行。我能够创建一个简单的网站,并将其编译为.NET4.0,它可以很好地与IIS Express配合使用。但是,在测试了.net 4.0网页之后,我立即创建了一个新网页作为.net 3.5,并在尝试编译解决方案时收到以下错误:Asp.net 无法通过VS2013在IIS Express上运行.net 3.5网页,asp.net,visual-studio-2013,Asp.net,Visual Studio 2013,我最近升级到VS2013。我在Windows8企业版计算机上运行。我能够创建一个简单的网站,并将其编译为.NET4.0,它可以很好地与IIS Express配合使用。但是,在测试了.net 4.0网页之后,我立即创建了一个新网页作为.net 3.5,并在尝试编译解决方案时收到以下错误: Error 1 An assembly with the same identity 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken
Error 1 An assembly with the same identity 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' has already been imported. Try removing one of the duplicate references.
当我查看c:\users{userName}\Documents\IISExpress\config\applicationhost.config时,它会显示
<site name="WebSite2" id="9">
<application path="/" applicationPool="Clr2IntegratedAppPool">
<virtualDirectory path="/" physicalPath="C:\Users\{userName}\Documents\Visual Studio 2013\WebSites\WebSite2" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:63681:localhost" />
</bindings>
</site>
非常感谢您的帮助。有两个要点需要说明: 默认情况下,Windows 8不附带.NET Framework 3.5。您需要在“控制面板>程序和功能”下添加它 IIS工作进程应用程序池,w3wp.exe一次只能使用一个CLR版本有两种选择:2.0和4.0,2.0 CLR包括.NET Framework的3.5版本 我没有使用IIS Express的经验,但您可以将应用程序池配置为使用特定版本的框架,并在IIS配置文件中查找元素