assembly in GAC not referenced in scripted code

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
 
D

Dmytro Lapshyn [MVP]

Hi Bob,

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

<configuration>
<runtime>
<assemblyBinding>

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top