473,387 Members | 1,863 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,387 software developers and data experts.

Command-line compiler can't find assembly in GAC

I have a batch script that is supposed to compile this script:

vbc.exe /main:Form1 /target:winexe
/imports:Microsoft.VisualBasic,System,System.Collec tions,System.Data,System.Diagnostics,System.Drawin g,System.IO,System.Net,System.Text,System.Windows. Forms
/r:System.dll,System.Data.dll,System.Drawing.dll,Sy stem.Windows.Forms.dll,Sybase.Data.AseClient.dll
/out:Advanced.exe Form1.vb

When I ran this command, I get an error:

vbc : Command line error BC2017 : could not find library
'Sybase.Data.AseClient.dll'

I know that this library in the GAC, because I can see it in
c:\windows\assembly and the physical folder location of the
Sybase.Data.AseClient.dll is in the Path environment variable.

What am I missing here?

Thanks.
Nov 15 '05 #1
4 6596
Frank,
What am I missing here?


The compiler doesn't look in the GAC, and it probably doesn't look in
all PATH directories either. It does look in the framework directory
and any directories you specify with /lib.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 15 '05 #2
Frank Rizzo wrote:
I have a batch script that is supposed to compile this script:

vbc.exe /main:Form1 /target:winexe
/imports:Microsoft.VisualBasic,System,System.Collec tions,System.Data,System.Diagnostics,System.Drawin g,System.IO,System.Net,System.Text,System.Windows. Forms
/r:System.dll,System.Data.dll,System.Drawing.dll,Sy stem.Windows.Forms.dll,Sybase.Data.AseClient.dll
/out:Advanced.exe Form1.vb

When I ran this command, I get an error:

vbc : Command line error BC2017 : could not find library
'Sybase.Data.AseClient.dll'

I know that this library in the GAC, because I can see it in
c:\windows\assembly and the physical folder location of the
Sybase.Data.AseClient.dll is in the Path environment variable.

What am I missing here?

Thanks.


vbc.exe (and csc.exe) do not search the GAC for compile-time references.

vbc searches:

1) the current working directory
2) the CLR system directory (ie.,
c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322, not the GAC)
3) directories specified by /libpath option
4) directories specified by the LIB env. variable

csc.exe has a similar search strategy, except that /lib is used instead
of /libpath.

You'll need to have a copy of the Sybase.Data.AseClient.dll in one of
the above locations (or specify the full file-system directory name for
the GAC located instance)

--
mikeb
Nov 15 '05 #3
mikeb wrote:
Frank Rizzo wrote:
I have a batch script that is supposed to compile this script:

vbc.exe /main:Form1 /target:winexe
/imports:Microsoft.VisualBasic,System,System.Collec tions,System.Data,System.Diagnostics,System.Drawin g,System.IO,System.Net,System.Text,System.Windows. Forms
/r:System.dll,System.Data.dll,System.Drawing.dll,Sy stem.Windows.Forms.dll,Sybase.Data.AseClient.dll
/out:Advanced.exe Form1.vb

When I ran this command, I get an error:

vbc : Command line error BC2017 : could not find library
'Sybase.Data.AseClient.dll'

I know that this library in the GAC, because I can see it in
c:\windows\assembly and the physical folder location of the
Sybase.Data.AseClient.dll is in the Path environment variable.

What am I missing here?

Thanks.

vbc.exe (and csc.exe) do not search the GAC for compile-time references.

vbc searches:

1) the current working directory
2) the CLR system directory (ie.,
c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322, not the GAC)
3) directories specified by /libpath option
4) directories specified by the LIB env. variable


Thanks. Step 4 worked for me. BTW, where did you get this info?
Nov 15 '05 #4
Frank Rizzo wrote:
mikeb wrote:
Frank Rizzo wrote:
I have a batch script that is supposed to compile this script:

vbc.exe /main:Form1 /target:winexe
/imports:Microsoft.VisualBasic,System,System.Collec tions,System.Data,System.Diagnostics,System.Drawin g,System.IO,System.Net,System.Text,System.Windows. Forms
/r:System.dll,System.Data.dll,System.Drawing.dll,Sy stem.Windows.Forms.dll,Sybase.Data.AseClient.dll
/out:Advanced.exe Form1.vb

When I ran this command, I get an error:

vbc : Command line error BC2017 : could not find library
'Sybase.Data.AseClient.dll'

I know that this library in the GAC, because I can see it in
c:\windows\assembly and the physical folder location of the
Sybase.Data.AseClient.dll is in the Path environment variable.

What am I missing here?

Thanks.


vbc.exe (and csc.exe) do not search the GAC for compile-time references.

vbc searches:

1) the current working directory
2) the CLR system directory (ie.,
c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322, not the GAC)
3) directories specified by /libpath option
4) directories specified by the LIB env. variable

Thanks. Step 4 worked for me. BTW, where did you get this info?


It was in the compiler's online docs for the /libpath (or /lib) command
line compiler options.

--
mikeb
Nov 15 '05 #5

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

Similar topics

2
by: Martin Danielson | last post by:
Hello. I've been testing the WScript.Shell object and the Run command now for a server query. The file I am running generates a file with the server querys which i later on parse in my page. But...
8
by: Siemel Naran | last post by:
Hi. I'm writing a command shell that reads commands from standard input. At this point I have the command in a std::string. Now I want to execute this command in the shell. From the Borland...
4
by: FluffyCat | last post by:
New on November 29, 2005 for www.FluffyCat.com PHP 5 Design Pattern Examples - the Command Pattern. Since you all enjoyed the Visitor Pattern so much yesterday, today I have the Command Pattern...
3
by: Michael Roebuck | last post by:
Hi all I'm very new to VB - I am trying to run a DOS command from within a VB2005 asp.net web site using a command button? The DOS command will take the form of the command followed by several...
5
by: Odd Bjørn Andersen | last post by:
I have installed DB2 9 Enterprise Edition on my laptop and created the sample database. Now I'm having truble connecting to the database from Command Editor. If I connect from Command Window it's...
2
by: Gil_H | last post by:
Hi, I'm trying to run a script over unix on a remote machine. In order to automate it, the procedure requests the following: 1. Using SSH connection. 2. Operating a command on the remote...
10
by: lalnamar | last post by:
I want to execute a unix time command using perl, and capture the output (specifically, the time it takes the command to execute). i tried using the system command: system("time command ");...
13
by: Chris Carlen | last post by:
Hi: Having completed enough serial driver code for a TMS320F2812 microcontroller to talk to a terminal, I am now trying different approaches to command interpretation. I have a very simple...
4
by: boriq | last post by:
Hi, I'm using in my script command os.system('command') on Windows XP. Each time the os.system command is used, python opens an empty ms-dos command window (the black one) and then closes it. So...
4
hsn
by: hsn | last post by:
hello everyone. i am trying to run the sudo -i command in my mac. here is the code String s = null; try {
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
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
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...

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.