473,326 Members | 2,061 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,326 software developers and data experts.

Referencing Assemblies

I installed WSE 1 and WSE 2 using the msi files.

I see both registered in the GAC.

However, when I try to reference the .dll using the command line
compiler ( /r:microsoft.web.services.dll ) it tells me that it cannot
find it.

Do I need to set my path as well ?

I thought the GAC would automatically tell the c# compiler where to find
the right dll based on the reference to the cache....

Jul 21 '05 #1
3 1445
The GAC is searched at *runtime* for assembly by the assembly resolver.

At *compile* time the C# compiler looks in the current directory, the system directory, along the LIB path and directories specified with the /LIB command line switch. So you'll need to make sure the assembly can be found in one of those.

This is necessary because if it purely went to the GAC when you reference an assembly by its file name, which version would it pick up?

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

I installed WSE 1 and WSE 2 using the msi files.

I see both registered in the GAC.

However, when I try to reference the .dll using the command line
compiler ( /r:microsoft.web.services.dll ) it tells me that it cannot
find it.

Do I need to set my path as well ?

I thought the GAC would automatically tell the c# compiler where to find
the right dll based on the reference to the cache....

Jul 21 '05 #2
well ... I don't have those assemblies installed, but I ran a quick
test from the visual studio .net command prompt.

C:\development\Common\EA.Tiburon.Data\Core>csc /t:library
friendlynameattribute.cs /r:system.web.dll

system.web.dll is in the GAC so it seems that this is the case. Make
sure you use the visual studio.net cli ... if that doesn't work, edit:
C:\Program Files\Microsoft Visual Studio .NET
2003\Common7\Tools\vsvars32.bat

to include the path for those assemblies

Hope that helps,
Joel Martinez
http://www.onetug.org - Orlando .NET User Group
http://www.codecube.net - Blog

john bailo <ja*****@earthlink.net> wrote in message news:<2v*************@uni-berlin.de>...
I installed WSE 1 and WSE 2 using the msi files.

I see both registered in the GAC.

However, when I try to reference the .dll using the command line
compiler ( /r:microsoft.web.services.dll ) it tells me that it cannot
find it.

Do I need to set my path as well ?

I thought the GAC would automatically tell the c# compiler where to find
the right dll based on the reference to the cache....

--

Jul 21 '05 #3
Joel Martinez wrote:
well ... I don't have those assemblies installed, but I ran a quick
test from the visual studio .net command prompt.

C:\development\Common\EA.Tiburon.Data\Core>csc /t:library
friendlynameattribute.cs /r:system.web.dll

system.web.dll is in the GAC so it seems that this is the case. Make
sure you use the visual studio.net cli ... if that doesn't work, edit:
C:\Program Files\Microsoft Visual Studio .NET
2003\Common7\Tools\vsvars32.bat
Ok, the source I am using ( something called WebServiceStudio, available
at GoToDotnet, used a build.bat command for the line compiler.

Sounds like I'm better off trasnferring the code to a studio project...

to include the path for those assemblies

Hope that helps,
Joel Martinez
http://www.onetug.org - Orlando .NET User Group
http://www.codecube.net - Blog

john bailo <ja*****@earthlink.net> wrote in message news:<2v*************@uni-berlin.de>...
I installed WSE 1 and WSE 2 using the msi files.

I see both registered in the GAC.

However, when I try to reference the .dll using the command line
compiler ( /r:microsoft.web.services.dll ) it tells me that it cannot
find it.

Do I need to set my path as well ?

I thought the GAC would automatically tell the c# compiler where to find
the right dll based on the reference to the cache....

--

Jul 21 '05 #4

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

Similar topics

1
by: loretta.stokes | last post by:
I manage our nightly builds for all of our products. Since we have added our .NET assemblies to our nightly build, it has been a learning process. I have come across a couple of situations that I...
12
by: Mark Broadbent | last post by:
Hi guys, just going through remoting at the moment and a couple of questions relating to .net in general has surfaced. Firstly I have seen in the designer that for the namespace and many of its...
16
by: PromisedOyster | last post by:
Hi I have a situation where I want to use circular referencing. I have cut down the example for demonstration purposes. Say we have one executable (main.exe) and two DLLS (A1.dll and A2.dll)....
9
by: Brett Romero | last post by:
Say I have a library (A.dll) with a method that accepts a collection of a specific type. The type is defined in B.dll. In A.dll, I need to loop through this collection and reference fields of...
0
by: Demetri | last post by:
I have a performance question with regards to packaging assemblies and referencing them. First lets say you have created the following assemblies: Company.Framework.dll...
11
by: Jan | last post by:
I'm using the CSharpCodeProvider to buils some assemblies @ runtime which are never saved as files (cp.GenerateInMemory = true;). The generated assemblies are hierachically dependent on each other...
2
by: Jan | last post by:
Regarding my post "CSharpCodeProvider: referencing other generated "InMemory" assembly" 4/27/2006 and the blog from Greg Young http://geekswithblogs.net/gyoung/archive/2006/04/27/76533.aspx I...
5
by: =?Utf-8?B?U3RlZmFuIEJhcmxvdw==?= | last post by:
I am experiencing a lot of speed issues on initial app loads where we are referencing 3rd party 1.1 assemblies from 2.0 code. Those 1.1 assemblies reference things like System.Windows.Forms...
1
by: Dave Anson | last post by:
What is the recommended practice for referencing assemblies in a project from other solutions? I am using Visual Studio 2005 Team System. I have several assemblies in another solution which will...
1
by: Tom | last post by:
My unsigned DLL works in my project that references it as long as I set Copy Local = true. Now I have signed the DLL with the sn.exe generated keys but have not yet moved the DLL into the GAC. ...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.