The Project Location is Not Trusted error in Visua

2019-03-27 14:16发布

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.

3条回答
Animai°情兽
2楼-- · 2019-03-27 14:53

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

查看更多
倾城 Initia
3楼-- · 2019-03-27 14:56

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.

查看更多
疯言疯语
4楼-- · 2019-03-27 15:05

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

查看更多
登录 后发表回答