The GAC is not a place to look for. Inside .NET assemblies there is no path to an assembly, just its name (possibly strong name). The CLR looks in several places attempting to locate an assembly, and among these there is the GAC. BTW you can even intercept a type loading failure and do something before the cannot-find-assembly exception is thrown.

You can use the -r option of the compiler to reference an assembly without copying it locally. During compilation the assembly must be available (fsc does not look into the GAC), but if you refer the same assembly (signed with the same keyfile) as in the GAC then the executable will not need the referenced assembly after compilation.

The search paths for fsc are

  • .
  • .NET framework dir
  • The bin directory of fsc

Antonio

By on 11/2/2007 2:20 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper