473,804 Members | 3,686 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Trying to reference a DLL (located in the GAC) from a JIT compiled page using codebehind.

I've got a simple report that I'm building. This is just a single web
page. It uses a custom DLL that I've built as an interface to my
database. When I use th page within an ASP.Net project, in Visual
Studio, I can set a reference to my DLL, Import the namespace, and
everything works perfectly.

However, when I convert the page to a JIT scenario so that I can
publish both the .ASPX page and the associated .VB file and not have
to deploy a compiled DLL for this one simple report, I get the error:

BC30466: Namespace or type 'Data' for the Imports 'MyCompany.Data '
cannot be found.

This looks like the compiler has no reference to the DLL to link in.
I would prefer to do this at the page level, but I'll do it in the
web.config too, if necessary. I've been all over Google and MSDN and
just can't seem to find anything that tells me how to add the
reference outside of Visual Studio.

Thanks!

-Jason Kendall
Ja**********@ho tmail.com
Nov 19 '05 #1
2 1425
<bump>

Someone's got to have done this before. Surely I don't need to
compile my on lonely report into a DLL just to be able to reference an
external DLL in the GAC.

-Jason Kendall
Ja**********@ho tmail.com

On Tue, 01 Feb 2005 07:58:26 -0500, Jason Kendall
<Ja**********@h otmail.com> wrote:
I've got a simple report that I'm building. This is just a single web
page. It uses a custom DLL that I've built as an interface to my
database. When I use th page within an ASP.Net project, in Visual
Studio, I can set a reference to my DLL, Import the namespace, and
everything works perfectly.

However, when I convert the page to a JIT scenario so that I can
publish both the .ASPX page and the associated .VB file and not have
to deploy a compiled DLL for this one simple report, I get the error:

BC30466: Namespace or type 'Data' for the Imports 'MyCompany.Data '
cannot be found.

This looks like the compiler has no reference to the DLL to link in.
I would prefer to do this at the page level, but I'll do it in the
web.config too, if necessary. I've been all over Google and MSDN and
just can't seem to find anything that tells me how to add the
reference outside of Visual Studio.

Thanks!

-Jason Kendall
Ja**********@h otmail.com


Nov 19 '05 #2
I finally found the answer for myself, which I will provide below:

All I needed to do was to add a web.config in the folder containing my
JIT compiled report and add an "assemblies " section specifying to
"add" my assembly using the information described in the GAC.

Nothing could be easier and I have all the benefits I had hoped to
have. It's so easy that I'm surprised that none of the local experts
could solve this one.

<?xml version="1.0" encoding="utf-8" ?>
<configuratio n>
<system.web>
<compilation defaultLanguage ="vb" debug="false">
<assemblies>
<add assembly="MyCom pany.Data,
Version=1.0.4.0 , Culture=neutral , PublicKeyToken= af1d58a5db022a2 c" />
</assemblies>
</compilation>
</system.web>
</configuration>
Cheers!

-Jason Kendall
Ja**********@ho tmail.com


On Tue, 01 Feb 2005 07:58:26 -0500, Jason Kendall
<Ja**********@h otmail.com> wrote:
I've got a simple report that I'm building. This is just a single web
page. It uses a custom DLL that I've built as an interface to my
database. When I use th page within an ASP.Net project, in Visual
Studio, I can set a reference to my DLL, Import the namespace, and
everything works perfectly.

However, when I convert the page to a JIT scenario so that I can
publish both the .ASPX page and the associated .VB file and not have
to deploy a compiled DLL for this one simple report, I get the error:

BC30466: Namespace or type 'Data' for the Imports 'MyCompany.Data '
cannot be found.

This looks like the compiler has no reference to the DLL to link in.
I would prefer to do this at the page level, but I'll do it in the
web.config too, if necessary. I've been all over Google and MSDN and
just can't seem to find anything that tells me how to add the
reference outside of Visual Studio.

Thanks!

-Jason Kendall
Ja**********@h otmail.com


Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1580
by: Wayne Wengert | last post by:
I am trying to work through an ASP.NET book and in one example you build a Class and then call a method from that class in an ASPX page. I put the class file ("quote.dll") in the bin directory and then added the aspx page that uses it to the project. When I re-open the project and right click on the aspx file and select the "Add to Project" option I get an error stating: "There is no class file associated with the WebForm 'ShowQuote.aspx'....
2
1118
by: Donald Sorenson | last post by:
Hey all, I'm trying to share a DLL that sits in the bin directory of a web application. from responses I got here I tried to change the output path (doesn't work) and I also tried to put it in the GAC. although I was successive with the procedure of putting that into the GAC, the DLL wasn't working even there. I have to mention, that this DLL is not an extra component, but the actual code behind for this page. So I have a page named...
12
2263
by: Wardeaux | last post by:
All, Wanting to find a way to create web pages to add to my website without having to recompile the codebehind everytime I want to add a new one... Here's the deal: I have a web app that takes work orders for 7 different items, each item gets 1 page for input specs. All works well. I want to add a new item. I do not want to recompile and redistribute my app everytime just to add a new input page. Can ASPX resources be compiled into a...
16
2096
by: Kent | last post by:
We have created several Assemblies that we add to the GAC on our web servers. In an ASP.NET app in VS2003, Adding a reference to strong named GAC'd Assembly meant that the web app would use whatever version was in the GAC. Now in an ASP.NET app in VS 2005, adding a reference to a GAC'd assembly actually adds a version specific reference to the web.config. That means that we would have to change the assembly reference in every single...
11
1927
by: Just Me | last post by:
I have a solution containing many usercontrol projects. When I wish to reference a usercontrol in another project I can select either the project or the assembly. Does it make a difference which one I select? Thanks
3
4416
by: Richard Lewis Haggard | last post by:
We are having a lot of trouble with problems relating to failures relating to 'The located assembly's manifest definition with name 'xxx' does not match the assembly reference" but none of us here really understand how this could be an issue. The assemblies that the system is complaining about are ones that we build here and we're not changing version numbers on anything. The errors come and go with no apparent rhyme or reason. We do not...
2
1015
by: rsine | last post by:
I created my first shared assembly and installed it to the GAC using gacutil. Now, I have another assembly I want to reference the shared assembly. Adding the reference has me a bit stumped since I cannot select it from the assembly folder. How do I go about adding a reference to the assembly located in the GAC? -Thanks
4
6048
by: Mythran | last post by:
We have more than one version of an assembly that contains web controls installed in the GAC. In our application, we want to always reference the most recent version of the assembly WITHOUT manually changing the version numbers in the .aspx files (<% Register TagPrefix... lines). I can manually remove the version information from the aspx files and all is well. It seems to be using the most recent version just fine. One problem is, if...
3
2356
by: D2 | last post by:
Hi, I am working on an application which have web as well as windows portions. We have some common dlls that are shared by both windows and web. To make it more maintainable, we want to place the common dlls in one folder from where both win/web can reference. I have noticed that any reference to web projects automatically copies the dlls in the bin folder and we don;t have an option to say "do not copy". What are the options to...
0
9582
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10335
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10323
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9157
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5652
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4301
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3821
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2993
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.