assembly in GAC not referenced in scripted code

  • Thread starter Thread starter Bob
  • Start date Start date
B

Bob

I have a common assembly installed into the GAC and is referenced by most of
my ASP.NET projects. This is fine for compiled web applications as the
reference to the assembly is added in the Visual Studio projects. I had a
need recently to create a couple of scripted ASPX pages (that is, there's no
code behind file), and unless I put the assembly in the application's bin
folder, it results in a namespace cannot be found error where the code uses
the classes in this assembly. What do I need to do in order for the
scripted pages to recognize my assembly in the GAC without putting it in the
local bin folder? It apparently recognizes all the .NET Framework
namespaces with those assemblies in the local bin folder.

Thanks
Bob
 
Hi Bob,

In the web.config file, you can try putting the

<configuration>
<runtime>
<assemblyBinding>

section and specifying all the references there:
 
Back
Top