assembly in GAC not referenced in scripted code



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.




Dmytro Lapshyn [MVP]

Hi Bob,

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


section and specifying all the references there:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question