Dave Stokes

Community Server 2.0

CS 2.0 SDK: The project location is not fully trusted by the .NET runtime

I saw a post last week on the Community Server forums which the author was asking for assistance with problems compiling the SDK.  In this post it was stated that a warning about the .NET runtime not trusting the project location was displayed upon loading the solution in Visual Studio.

A couple of weeks ago I started a series of articles about extending Community Server, and at the same time the last of the parts I needed arrived so that I could build a new computer.  I was retracing the steps already covered to continue the article, the first of which would be to install the SDK on the new system.  Having a rather fast broadband connection I often just download what I need rather than search for the copy I already have, so a quick visit to Community Server and i had a new copy of the SDK.

Having gone through this many times, I suppose I would have been on auto pilot when I double clicked the Community Server solution file, however a loud beep from the computer and the following error message changed all that.

I was certainly not using a networked drive, however it is the first time I am using an SATA drive, which appears as a removable drive, so my train of thought was that this was the problem.  I ran the following command line at the Visual Studio command prompt:

caspol -q -machine -addgroup 1 -url file://C:/* FullTrust -name "C Drive"

Double click the project solution file again and this time no error reports.  I then added the first components, I really wanted to get this done as yet again more posts were appearing on Community Server forums relating to problems with sites running out of database space. 

When I started adding references to the Community Server libraries in the project I then ran into the problem where a component is being reported as in use and therefore cannot be updated.  This is really not good news when the SDK starts this when being compiled and from my previous encounters of when this has happened it is difficult to resolve. 

I went through all the steps I have used before to try to resolve this, changing the copying of references locally to false, stopping the web site, stopping services and could not clear this error.

OK, at this point I am resigned to the fact I have done something seriously wrong.  So I start again, install Windows XP, Visual Studio, run caspol etc etc and run into the same error.  After a week or so of spending every spare minute I have doing this and hitting the same brick wall, I took the decision to completely change the method of implementing the add-on.  Essentially this would be implemented as a stand alone Visual Studio solution and copied to the Community Server folder.  This is a method recommended by some of the Community Server developers, the only real difference  is that you have to use the attach to process method to debug your source code.

I completed the build of the project and posted both the compiled version and the source code on Saturday the 1st of July. Today I started making another post for the now very delayed Extending Community Server 2.0 series.  At this point the light bulb came on and I remembered a while ago many people complaining the zip files were corrupt on Community Server.  This had been remedied but had something changed in the fixed SDK download ? 

Time to search my data disk for copies of the SDK.  I found one I downloaded when the source first became available.  I extracted it, double clicked the solution file and no errors, I must be on to something now.  Time to spend some time in Windiff as something must be different between the two.  I checked all the project files and no differences were reported, not good.  I then right clicked both the downloaded zip files and had the properties visible at the same time to compare them. 

At this point I saw something I have not seen before, a security warning on the bottom of the properties dialog for the newly downloaded zip file.  This was not showing on the other downloaded zip properties.

I clicked the Unblock button, extracted the files double clicked the solution file, and no more errors about the project location not being trusted.  Before doing this I deleted the permission I had added by running caspol.

To recap, if you get the error at the start of this article in the Community Server SDK, check the properties of the zip file.  If you have the security warning, click Unblock and extract the files again.  If you do not the permission is inherited during extraction to every file in the source code.

Dont you just love those misleading error messages !

Regards

Dave

Comments

 

Community Server Daily News said:

news of the daya grab bag for what's happening in Community ServerNew White Paper "Building
July 6, 2006 2:02 PM
 

Mark Garner said:

Exactly what I needed.  Had the exact same problem with something I downloaded today.  Thanks for the post.
July 28, 2006 12:29 PM
 

jportnoy said:

Hey there Dave,

What operating system are you running? I re-downloaded the SDK zip file, and the 'unblock' button/security warning were not there. Also, what are your permissions that you're logged in under/downloaded the file under? I'm using the machine remotely, and thus using the Administrator account with full permissions. Just a thought...
August 31, 2006 6:47 AM
 

jportnoy said:

As a side note, I'm trying to install the updates to Visual Studio 2005 on another computer, and I'm receiving the following error:

"The upgrade patch cannot be installed by the Windows Installer service because the program to be upgraded may be missing, or the upgrade patch may update a different version of the program. Verify that the program to be upgraded exists on your computer and that you have the correct upgrade path"

Version of the file: "VS80-KB915364-X86-ENU.exe"

The only notable difference on this machine is that the Visual Web Developer is not installed on this computer. Would this affect this upgrade? Visual Studio 2005 is installed.
August 31, 2006 7:06 AM
 

Daily News Faq List said:

Dave Stokes describes working through a misleading "project location not fully trusted" issue

November 22, 2006 9:49 AM
 

Community Server Bits said:

Dave Stokes describes working through a misleading "project location not fully trusted" issue

March 12, 2007 9:58 AM
© Dave Stokes 2006-2008
Powered by Community Server (Commercial Edition), by Telligent Systems