NibblyPig
NibblyPig

Reputation: 52952

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.

Upvotes: 8

Views: 12104

Answers (3)

Stephen Schaub
Stephen Schaub

Reputation: 496

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

Upvotes: 9

BenV
BenV

Reputation: 12452

Try looking under Control Panel -> Administrative Tools for the .NET Framework Configuration utilities. From here you should be able to follow the instructions from the plethora of google results on this topic.

Upvotes: -1

Fozi
Fozi

Reputation: 5135

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

Upvotes: 3

Related Questions