Visual Studio 2010 需要以管理员身份运行才能构建网站

发布于 2024-09-26 04:13:40 字数 320 浏览 2 评论 0原文

我正在使用 Visual Studio 2010 Ultimate,并且有一个包含网站项目的解决方案。在 XP Pro 下,一切都构建得很好。我转移到一台运行 Windows 7 Ultimate 的新计算机,现在当我去构建网站时,我收到以下错误消息:

------ 构建已开始:项目:C:...\WebSite\,配置:调试任何CPU ------ 验证网站 :构建(网络):无法映射路径“/”

如果我选择“以管理员身份运行”选项来启动 Visual Studio,则网站会完美构建,并且完全没有错误。

我不想经常以管理员身份运行 Visual Studio。有什么建议吗?

I am using Visual Studio 2010 ultimate and have a solution that contains a website project. Under XP Pro evrything built fine. I moved over to a new machine running Windows 7 Ultimate, and now when I go to build the website I get the following error meesage:

------ Build started: Project: C:...\WebSite\, Configuration: Debug Any CPU ------
Validating Web Site
: Build (web): Failed to map the path '/'

If I pick the "Run As Administrator" option for launching Visual Studio then the website builds perfectly and I have no errors ata all.

I would prefer to not have to constantly run Visual Studio as administrator. Any suggestions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

迟月 2024-10-03 04:13:40

您可以以管理员身份永久运行Visual Studio

只需按照以下步骤操作:

   1) Find the Visual Studio Executable.

    Visual Studio 2010 C# Express:
    C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\VCSExpress.exe

    Visual Studio 2010 Professional:
    C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe

    2) Right-click on the Visual Studio Executable and left-click Properties

    3) On the new window, click the Compatibility tab

    4) Tick the option "Run this program as an administrator"

    5) Click OK to save the settings

即可享受 Visual Studio,而无需每次都“以管理员身份运行”。 ;)

You can right have Visual Studio permanently running as an Administrator.

Simply follow these steps:

   1) Find the Visual Studio Executable.

    Visual Studio 2010 C# Express:
    C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\VCSExpress.exe

    Visual Studio 2010 Professional:
    C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe

    2) Right-click on the Visual Studio Executable and left-click Properties

    3) On the new window, click the Compatibility tab

    4) Tick the option "Run this program as an administrator"

    5) Click OK to save the settings

Enjoy Visual Studio without having to "Run as Administrator" each time. ;)

_失温 2024-10-03 04:13:40

在这种情况下,您有两种选择。

  1. 您可以将 VS 设置为自动以管理员身份运行
  2. 您可以将 Web 项目修改为不托管在 IIS 中,而是托管在 Visual Studio 服务器中。这是通过“Web”选项卡下的项目属性(向下到底部)完成的。

就我个人而言,我一直以管理员身份运行。

You have two options in this case.

  1. You can setup VS to automatically run as administrator
  2. You can modify your web project to NOT be hosted in IIS, but rather to be hosted in the Visual Studio server. This is done via Project Properties under the "Web" tab, down towards the bottom.

Personally I run as Admin all the time.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文