创建虚拟目录失败,错误:无法写入配置文件 applicationhost.config [英] Creation of the virtual directory failed with error: cannot write configuration file applicationhost.config

查看:105
本文介绍了创建虚拟目录失败,错误:无法写入配置文件 applicationhost.config的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是想打开一个 VS 2017 项目.当我打开解决方案时,我收到以下错误消息:

I'm just simply trying to open up a VS 2017 project. When I open the solution, I get the following error message:

创建虚拟目录 http://localhost:58051/failed 并出现错误:文件名:\?\C:\Users\Visual Studio 2017\Projects\Testing\Version 2.0.vs\config\applicationhost.config 错误:无法写入配置文件

Creation of the virtual directory http://localhost:58051/failed with the error: Filename: \?\C:\Users\Visual Studio 2017\Projects\Testing\Version 2.0.vs\config\applicationhost.config Error: Cannot write configuration file

我已经检查了文件路径上的文件夹,它们没有加密.文件路径上的所有文件夹都有一个用于只读属性的黑框.当我转到配置文件夹并清除只读属性的黑框并应用设置时,我发现如果退出并返回同一文件夹,只读属性的黑框会重新出现.我读过黑匣子并不意味着只读属性已打开.如果只读属性实际上已打开,我应该会看到一个复选标记.但是,这并不能解释为什么我无法打开解决方案.

I've checked the folders along the file path and they are not encrypted. All the folders along the file path have a black box for the Read Only attribute. When I go to the config folder and clear out the black box for the Read Only attribute and Apply the setting, I find if I exit and go back to the same folder, the black box reappears for the Read Only attribute. I've read that the black box doesn't really mean the Read Only attribute has been turned on. If the Read Only attribute was actually turned on, I should expect to see a check mark instead. However, this doesn't explain why I can't open the solution.

在我点击 VS 错误消息的确定按钮后,VS 只是在解决方案资源管理器中说解决方案是(不可用)".

After I click the OK Button to the VS Error message, VS just says the solution is "(unavailable)" in the Solution Explorer.

任何帮助将不胜感激.

推荐答案

我在 OneDrive 上的项目文件也遇到了这个问题.我解决它的方法是我重命名位于根项目目录的.vs\config"目录中的 applicationhost.config 文件,然后重新加载 web 项目.这将创建一个新的 applicationhost.config 文件.

I too had this problem with my project files located on OneDrive. The way I resolved it was I renamed the applicationhost.config file located in the ".vs\config" directory of your root project directory then reloaded the web project. This will create a new applicationhost.config file.

这篇关于创建虚拟目录失败,错误:无法写入配置文件 applicationhost.config的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆