Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GACUTIL error when running an install.bat file

Status
Not open for further replies.

DatabaseDude

Programmer
Nov 7, 2005
112
US
I've downloaded some VB code that creates a wrapper for the FileSystemWatcher class in .NET.


Included was an install.bat file to register everything.

It worked great on one machine. However, on another, I got the following error:

Code:
gacutil is not recognized as an internal or external command

Any ideas of something that maybe should be installed additionally?

The machine yielding the error does have .NET 2.0 framework installed, and is running Win XP Pro with all service packs.

Contents of install.bat:

Code:
path=%path%;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin

regasm "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\system.windows.forms.dll"

gacutil -u IOLib
regasm /u "IOLib\IOLib\bin\Release\IOLib.dll"

regasm /tlb "IOLib\IOLib\bin\Release\IOLib.dll"
gacutil -i "IOLib\IOLib\bin\Release\IOLib.dll"

pause

Thanks in advance!
 
The .NET framework doesn't include gacutil.exe, this is part of the SDK which is installed with visual studio. I imagine on the first machine you probably had VS installed.
 
You are correct, I do have VS on the original machine.

The reason this came about in the first place is an error when I run an application referencing the IOLib wrapper.

Code:
-2147024894
The system cannot find the file specified

The goal of install.bat is to register the .NET framework DLLs, and the IOLib wrapper class so that it can be used from Visual Basic 6.0 and VBA.

Is there a way to register the DLL without GACUTIL? I'm not sure how to make this work properly on other machines.
 
You can just drop the dll in the GAC.

.NET doesn't use the registry for dll's... first it will look it the application folder if it can't find it there it will look in the GAC.

Kevin Davie
Consultant
Sogeti USA
 
I did a drag and drop into C:\windows\assembly ... and it seems to work just fine now! Thanks!

When deploying on other machines, will a simple copy command accomplish the same result? Or are there other steps that should be taken?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top