473,378 Members | 1,456 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,378 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....

Nov 16 '05 #1
3 1366
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....

Nov 16 '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....

--

Nov 16 '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....

--

Nov 16 '05 #4

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

Similar topics

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...
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. ...
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.