views:

374

answers:

3

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.

A: 

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.

BenV
Unfortunately there is nothing relating to .NET Framework in the administrative tools.
SLC
@SLC: Thought I'd ask the obvious question first :) On my machine this shortcut points to C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\mscorcfg.msc - do you have a similar path on your machine?
BenV
I have folders for 1.0xxx 1.1xxx (same as yours) 2.0xxx 3.0 and 3.5 , so presumably that's one for each release of the .net framework. The 1.0xxx and 1.1xxx contain just a couple of config/dll files, while 2.0xxx contains a ton of stuff but no file by that name, although there are loads of mscorxxx.dll files. 3.5 also contains a load of stuff but again, nothing by that name.
SLC
Do you have the full SDK installed? Per this article MS now only included the config tool in the SDK: http://blogs.msdn.com/astebner/archive/2006/01/23/516671.aspx. This article also has a link to a standalone installer to the config tool.
BenV
I didn't, so I installed the full 2.0 sdk, which added the .net framework configuration stuff in the control panel. I followed the instructions I found via google to add the network location to my intranet sites, with full access. I also notice the entries I made with caspol.exe were there too. After adding it, I tried to open my solution, but received the same error.
SLC
Did you add the network location to the LocalIntranet_Zone or Trusted_Zone? I think it needs to be in the Trusted_Zone.
BenV
Yup, I did... it's weird how it still doesn't work.
SLC
A: 

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

Fozi
I have added it to my Trusted Sites in internet options, but the message still appears.
SLC
+1  A: 

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

Stephen Schaub
This sorted it for me - combined with adding my UNC path to the local intranet zone in IE.
Frans