The Project Location Is Not Trusted

I opened Michael Schwarz's AjaxPro solution in Visual Studio 2005 and I was greeted with this:

The Project Location Is Not Trusted Dialog

As you can see, this is running from the C: drive on my local development machine. Guessing that this problem might be related to the fact that I added my local machine to IE's list of trusted sites, I removed that setting. Unfortunately, the dialog persisted.

Next I added a new code group to my LocalIntranet_Zone and gave full trust to the URL "file://C:\*". Even that didn't resolve the issue. My next step was to open all the csproj files and the sln file for the solution and look for anything that might trigger this dialog. I deleted all the TFS source code control settings (I don't use CodePlex), but that didn't help.

At this point, I don't have an answer. Has anyone else seen "The project location is not trusted" for projects on the C: drive?!

Did you come to this page because you are also getting the message, "The project location is not trusted"? If so, and if you are trying to run a Visual Studio project from a UNC path (or mapped drive), here are the steps I use to solve that particular situation. These steps work fine - I regularly work on Visual Studio projects that are located on a UNC path using the setup described below.

All it takes is to give the file share where my projects are located FullTrust permission. Here are the steps:

  1. Start Mscorcfg.msc. In the default installation of VS 2005, it is located at "C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\mscorcfg.msc".
  2. Expand the Runtime Security Policy node, the Machine node, the Code Groups node, and the All_Code node, and then highlight the LocalIntranet_Zone node.
  3. In the right pane, click Add a Child Code Group.
  4. Choose Create a new code group, enter a name for the code group, and then click Next. I usually name it after my server and path.
  5. Choose a condition type of URL, and enter the UNC path to the share location of your project, using the format:
    file://\\servername\sharename\*
    where \\servername\sharename is the name of the share. Click Next. 
    Make sure to add the asterisk at the end of the path -- and note that the weird looking combination of slashes (//\\)isn't a typo.
  6. Choose Use existing permission set and select FullTrust, and then click Next.
  7. Click Finish.
  8. Restart Visual Studio.

     

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Your a lifesaver, hanks..

if this doesn't work for you check out UNBLOCKing your project.. http://www.cjcraft.com/blog/2007/09/02/TheProjectLocationIsNotTrusted.aspxbasically check the properties of each file in the project folder. you'll probably see a UNBLOCK button in the attributes section. Unblock all the files. Note I had to change the read write properties of the folder too.Good luck

Thanks, works perfectly. Thanks for posting such detailed instructions.

In my case, my VS projects are in the My Documents folder on a workstation, and that folder is also the My Documents folder on a notebook PC via redirection. The folders are synchronized via Offline Files in XP.To VS, my projects are J:\Documents and Settings\..., which it sees as a UNC file \\Jaystation\c$\...The above procedure did not work in this situation, but I found (through an aggravating series of trials-and-errors) that it works if the code group is created under the Internet_Zone node instead of the LocalIntranet_Zone.I'm not sure why this is the case, but that's how I finally got it to cooperate for me.

Worked like a charm.Thanks homes...

I have the same problem with a project I have downloaded from CodePlex. Did you find a solution?

When the untrusted project location is on a local file path this usually means the files and folders were extracted from an untrusted ZIP file. Right-click on the ZIP file and choose Properties to obtain the Properties dialog. If you see an Unblock button enabled then this is the cause of your troubles. Click the Unblock button. Delete the files and folders you previously extracted and any copies you made (which will also exhibit the problem) and repeat the extraction and copying process. You should find the problem is resolved.

Gave it a try since I was seeing the issue on local projects. Didn't work for me, I'm still getting the same messages. As with your report it is found with a project downloaded from the net and I'd bet that causes the issue.

if this doesn't work for you check out UNBLOCKing your project.. http://www.cjcraft.com/blog/2007/09/02/TheProjectLocationIsNotTrusted.aspxbasically check the properties of each file in the project folder. you'll probably see a UNBLOCK button in the attributes section. Unblock all the files. Note I had to change the read write properties of the folder too.<a href=http://endxsoftware.com>Good luck</a>

Jay:
"it works if the code group is created under the Internet_Zone node instead of the LocalIntranet_Zone"

Mine is shared via VMware Shared Folders and this did it for me, finally. Thanks!