VS2012:执行发布时拒绝访问路径 [英] VS2012: Access to path is denied when executing publish

查看:37
本文介绍了VS2012:执行发布时拒绝访问路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当尝试在 VS2012 中发布应用程序(特别是 WCF 服务)时,我收到一条错误消息:执行发布时出现异常:对路径 [path] 的访问被拒绝."引用的文件是我尝试执行的发布配置文件,类型为.pubxml"

我使用 SysInternals Process Explorer 检查另一个进程是否锁定了文件,我关闭了 VS2012 并以管理员权限重新打开它,并重新启动了我的电脑.

这与此处描述的问题相同:创建发布包时出现 VS2012 错误:对路径执行发布访问时出现异常被拒绝 我宁愿对这个问题发表评论,询问他是否找到了解决方案,但不幸的是我还没有评论权.>

编辑------

我使用的是带有更新 2 (11.0.60315.01 更新 2) 的 Visual Studio 2012 Ultimate

解决方案

我刚刚遇到了同样的问题.

原因是因为文件是只读的.只需浏览到保存配置文件的文件夹,将它们全部选中,然后单击该复选框:

这可能是因为您的个人资料在您不知情的情况下被签入源代码管理.

When trying to publish an application (a WCF Service specifically) in VS2012, I get an error stating: "Exception in executing publishing: Access to the path [path] is denied." The file referenced is the publish profile I'm trying to execute and is type ".pubxml"

I've used SysInternals Process Explorer to check if another process has the file locked, I've closed VS2012 and reopened it with administrator rights, and have rebooted my PC.

This is the same issue described here: VS2012 Error when creating publish package: Exception in Executing Publishing Access to path is denied and I'd rather comment on that question asking if he ever found a solution but unfortunately I don't have comment rights yet.

EDIT ------

I'm using Visual Studio 2012 Ultimate with Update 2 (11.0.60315.01 Update 2)

解决方案

I just had the same issue crop up.

The reason why is because the files are read only. Simply browse to the folder where the profiles are kept, select them all, and drop a click on that checkbox:

This is probably caused by your profiles being checked into source control without your knowledge.

这篇关于VS2012:执行发布时拒绝访问路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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