RB Davidson
RB Davidson

Reputation: 628

Visual studio 2010 Requires Run as Admin to build website

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?

Upvotes: 5

Views: 5311

Answers (2)

eandersson
eandersson

Reputation: 26342

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. ;)

Upvotes: 3

Mitchel Sellers
Mitchel Sellers

Reputation: 63126

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.

Upvotes: 3

Related Questions