VS.NET 1.1 Command Line Compile Problems

G

Guest

Greetings all,

I have an assembly that, when compiled from within VS.NET, installs to the
GAC without any issues. However, when I use the command line compiler, I
receive an error when using gacutil to install it in the GAC. The message I
receive is: "Failure adding assembly to the cache: Unknown error".

Is there a special command line switch I need to be using to get this
assembly compiled correctly so it can be installed in the GAC?

Thank you in advance for all the help!
 
J

Jani Järvinen [MVP]

Hi Bob,
I have an assembly that, when compiled from within VS.NET, installs to the
GAC without any issues. However, when I use the command line compiler, I
receive an error when using gacutil to install it in the GAC.

Which version of gacutil.exe are you using, and which VS.NET version? I'm
under the impression that you cannot mix a gacutil from a different version
than the .NET version you used to compile your assembly with. That is,
gacutil for .NET 1.1 won't work with 2.0 assemblies and vice versa.

Could this be the case with you? Other than that, it should make any
difference whether you use Visual Studio or CSC to compile your assembly.

--
Regards,

Mr. Jani Järvinen
C# MVP
Helsinki, Finland
(e-mail address removed)
http://www.saunalahti.fi/janij/
 
G

Guest

Jani,

I appreciate the response; I am using v1.1 for both. I don't even have any
other versions installed in this VPC. Otherwise, there wouldn't be any
difference?

--
Bob Mixon
SPS MVP
http://www.BobMixon.com
 
J

Jani Järvinen [MVP]

Bob,
I appreciate the response; I am using v1.1 for both. I don't even have
any
other versions installed in this VPC. Otherwise, there wouldn't be any
difference?

If you have only .NET 1.1 installed, then the version mismatch should be
possible to rule out. Is there anything special in your assembly, i.e.
signatures or references to other assemblies, etc. that might make gacutil
to fail?

You could also try check the command-line that Visual Studio uses to build
your assembly. If you copy-paste that on the command line and your assembly
still won't work, then there must be something odd in your setup, like a
corrupted file or the like.

Hope this helps.

--
Regards,

Mr. Jani Järvinen
C# MVP
Helsinki, Finland
(e-mail address removed)
http://www.saunalahti.fi/janij/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top