This project has moved and is read-only. For the latest updates, please go here.

Sandcastle Help File Builder doesn't run on a mapped drive (Windows 7).

Mar 3, 2010 at 9:06 AM
Edited Mar 3, 2010 at 9:18 AM


Sandcastle Help File Builder doesn't run from a mapped drive on Windows 7 (even if it is mapped to a local path).  It runs fine on a Windows 7 local drive. 

Additional plugins cannot be located within the GUI and the build itself will not run outside the UI too.

The same files work works perfectly well on Windows XP from a mapped drive.

Error message is as follows:

X:\Build\Environment\Help\SandcastleHelpFileBuilder\SandcastleHelpFileBuilder.targets(23,5): error MSB4062: The "SandcastleBuilder.Utils.MSBuild.BuildHelp" task could not be loaded from the assembly X:\Build\Scripts\MsBuild\..\..\Environment\Help\SandcastleHelpFileBuilder\SandcastleBuilder.Utils.dll. Request failed. Confirm that the <UsingTask> declaration is correct, and that the assembly and all its dependencies are available.

Sandcastle Help File Builder is not installed and I am passing SHFBROOT as a parameter (in the example above).

I suspect it can be solved with a configuration or system setting rather than a code change seeing as the code works on XP.  Can anyone help?

Mar 4, 2010 at 3:22 AM

At a guess, I'd says it's probably security related as perhaps the mapped drive is considered to be in the intranet or internet zone so permissions prevent the task assembly from loading.  MSBuild is running from your local drive I would assume so the mix of local and intranet/internet assemblies isn't allowed.  Likewise for the GUI not finding custom plug-ins.  If they're on your local drive, SHFB running in the internet/intranet zone would be unable to access your local drive.



Mar 4, 2010 at 8:55 AM
Edited Mar 23, 2010 at 1:47 PM

Hi Eric,

Thanks for the quick reply.  SHFB all is running from the mapped drive (Plug-ins too).  Even with admin rights it doesn't work,.  I have many MsBuild tasks loading and running (both Microsoft and mine) so it is nothing to do with MsBuild or loading of assemblies.  Only SHFB doesn't work... :-(

Could you test it on your machine?  Just create a mapped drive (pointing to a locally shared folder) and a simple project and run it locally and from the mapped drive.

The plug-in problem happened using the "XSD Documenter" Plug-in it will fail.  I just debugged the SHFB code and SHFB catches an exception thrown in this method  PlugInManager.LoadPlugIns().  The "types = asm.GetTypes();" throws the Exception.  This Exception is due to UITypeEditor class types (I think!).




Mar 23, 2010 at 1:52 PM

Hi Eric,

This is a blocking issue for us.  Our build environment does not really allow us to run local (except in special cases).

Could you give me feedback as to why exactly it is not working?  I have many other build tasks (MS and our own) tasks that are working on a mapped drive and it is really only SHFB that doesn't seem to work.  I have tried since my last post to find a workaround but have not been successful.  The user has full access rights to the mapped drive.



Mar 23, 2010 at 8:25 PM

I did some testing and the GUI runs on a mapped drive and was able to load the plug-ins that come with SHFB without issue.  I didn't try it with the XML Documenter plug-in yet.  I did duplicate the failure of the build task but it's MSBuild that's failing to load it so the SHFB build task code doesn't even execute.  Given that, I still feel it is permission/security/trust related but I haven't had a chance to go back and create a dummy task to see if I can find out what would be different between one that does load and the SHFB build task that doesn't.  I'll try to take a look at it this weekend.



Mar 25, 2010 at 2:08 PM

Hi Eric,

Thanks a lot for that.  I don't want to come between a man and his weekend though. :-)



Apr 9, 2010 at 9:57 AM

Hi Eric,

Do you have any more feedback on this problem?



Apr 11, 2010 at 11:50 PM

I just created a small task that contained nothing but a couple of properties and an Execute method that logged a message and returned.  I'm using Windows 7 64-bit.  I mapped a drive to \\\C$\FolderPath and tried to use the task from it but it wouldn't load.  However, in this case it complained that the assembly wouldn't allow partially trusted callers.  I tried signing the assembly and adding the AllowPartiallyTrustedCallers attribute but that had no effect and the assembly still failed to load.  Running as administrator just changed the problem to a failure to load error from MSBuild.  At this point I still think it's security related due to the zone in which it's trying to load the assembly.  Since I can't get a test task running I doubt there's anything I can do to SHFB to get it to run from a mapped drive.  You say you've got tasks that do run so the best I can do is suggest you try creating a test case and use the tasks that do work to see if you can isolate what makes them work.



Oct 14, 2011 at 4:04 AM

I know this is an old thread, but I'm having this same problem on Windows XP 64-bit. I have modified the .NET security settings to fully trust the intranet zone, but that makes no difference. As far as I can tell it's not a binding issue, 'cause no binding errors are thrown.  And after googling quite a bit, I haven't found any other reference to the very unhelpful "Request failed" error message.  Anyone figured this one out?




Oct 14, 2011 at 6:37 PM

I was able to apply the solution described here to get this working.  e.g.:


C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\CasPol.exe -m -ag 1 -url file://T:\* FullTrust