我最近将我的 asp.net 3.5 Web 项目从 Visual Studio 2010 更新到 Visual Studio 2012。每次我尝试创建发布设置时,都会显示以下内容:
{There are errors in web.config. Please correct these errors and try again. The first error is: "Web.config appears to be in invalid state. Please correct it and try again."}
我一直无法确定这意味着什么。我的 web.config 中没有它告诉我的错误。我搜索了这个错误,但一无所获。
有人可以帮我吗?
我还应该提到整个项目驻留在映射驱动器上。我仍然可以在 Visual Studio 2010 中打开该项目并发布它,但甚至无法在 Visual Studio 2012 中创建发布设置。
最佳答案
我认为以下步骤会对您有所帮助。
- 在执行发布之前,请确保项目已更改为 Release模式。
- 请勿将其发布为网站。尝试将您的网站发布到文件系统。
- 创建一个虚拟目录并将该虚拟目录指向已发布的文件夹。
上述步骤对我有用。
关于asp.net 尝试在 vs 2012 中创建发布设置会出现奇怪的错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16599000/