473,411 Members | 2,030 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

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**********@hotmail.com
Nov 19 '05 #1
2 1408
<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**********@hotmail.com

On Tue, 01 Feb 2005 07:58:26 -0500, Jason Kendall
<Ja**********@hotmail.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**********@hotmail.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" ?>
<configuration>
<system.web>
<compilation defaultLanguage="vb" debug="false">
<assemblies>
<add assembly="MyCompany.Data,
Version=1.0.4.0, Culture=neutral, PublicKeyToken=af1d58a5db022a2c" />
</assemblies>
</compilation>
</system.web>
</configuration>
Cheers!

-Jason Kendall
Ja**********@hotmail.com


On Tue, 01 Feb 2005 07:58:26 -0500, Jason Kendall
<Ja**********@hotmail.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**********@hotmail.com


Nov 19 '05 #3

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

Similar topics

4
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...
2
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...
12
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...
16
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...
11
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...
3
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...
2
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...
4
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...
3
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.