Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The Project Location is Not Trusted error in Visual Studio

Quite a simple error, and the reason is obvious - I mapped a network drive, and I am opening the solution from it. Visual Studio gives me this error.

I tried googling, and to my surprise, couldn't find a fix. I am running Visual Studio 2008.

The solutions I found on google say I should run Mscorcfg.msc, but unfortunately, I don't seem to have that file anywhere on my computer. Nor do I seem to have anything in my control panel relating to .NET Framework. I can of course, run .NET applications fine, so the framework exists.

Another solution suggested running caspol.exe, although this is .NET 2, which I also tried to no avail.

Any ideas?

I should add that I am trying to add the path to whatever trusted list there is.

like image 425
NibblyPig Avatar asked Apr 08 '10 20:04

NibblyPig


2 Answers

caspol is the right tool to use to suppress these warnings. Here is the command I use:

C:\Windows\Microsoft.NET\Framework\v2.0.50727\caspol -m -pp off -cg 1.2 FullTrust

This will grant full trust to local intranet code group. In order for this to have the desired effect, the computer must be configured to recognize the share as being in the intranet zone.

Note that this command is for .NET 2.0, 3.0, and 3.5. (Security settings for 3.0 and 3.5 are controlled by the caspol utility for 2.0).

like image 135
Stephen Schaub Avatar answered Oct 14 '22 03:10

Stephen Schaub


If the server is in the "Internet" zone, try adding it to the "Trusted sites" in your Internet Options. (You can see the zone in the status bar in Windows Explorer.)

like image 33
Fozi Avatar answered Oct 14 '22 04:10

Fozi