加载Visual Studio 2012和2015项目时出错

bob*_*zzo 8 visual-studio-2012 visual-studio-2015

我已经在VS2012工作了几年了.我在VS2012下开发了我的第一个asp.net/angularjs项目.其次,我最近检查了一个VS2013项目(由第三方编写),该项目在2012年之后运行得很好.

然后有人建议我在笔记本电脑上安装VS2015.这是事情出错的时候.

问题:我试图在VS2015中加载新的VS2013项目,但它立即无法加载.

VS2015错误:

Creation of the virtual directory http://localhost:32999/ 
failed with the error: Filename: redirection.config
Error: Cannot read configuration file
Run Code Online (Sandbox Code Playgroud)

现在,当我回到VS2012并加载我原来的asp.net/angular项目时,我收到此错误:

加载vs2012项目时出错

所以最后,我根本无法加载任何项目!无论是2012年还是2015年.

顺便说一句,我的本地IIS网站仍然正常运行,但不是本地开发环境.

我该如何修复这些虚拟目录?

先谢谢你,鲍勃

bob*_*zzo 17

根据这篇文章的一些指导 - IISExpress 8无法读取配置文件redirection.config,这是我如何成功加载我的VS2015:

  • 关闭VS2015
  • 进入文件夹%userprofile%\ Documents\IISExpress\config
  • 重命名applicationhost.config
  • 重新启动VS并加载解决方案/项目
  • VS应该重新创建applicationhost.config,并且应该加载项目

当然,我现在有一个不同的错误,我将重新发布:

[BadImageFormatException: Could not load file or assembly 'MyWebApp.DAL' 
or one of its dependencies. An attempt was made 
to load a program with an incorrect format.]
Run Code Online (Sandbox Code Playgroud)