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

Registering .Net 2.0 assembly in GAC

I have created a simple .net class library

AdapterLibrary.dll, which contains a single class definition
AdapterLibrary.Service (code at end of posting). I have signed the assembly
and I attempt to install in the GAC.

Using Visual Studio 2005 (.net 2.0) to build the dll results in me not being
able to install the assembly in the GAC.

*********************************************
gacutil /i AdapterLibrary.dll

Microsoft (R) .NET Global Assembly Cache Utility. Version 1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.

Failure adding assembly to the cache: Unknown Error

*********************************************

However, if I take the code from this project and compile using VS 2003 I
have absolutely no problems installing the assembly in the GAC.

Can anyone advise on this please?
*********************************************
* Service.cs
*********************************************
using System;
using System.Xml;

namespace AdapterLibrary
{
public class Service
{
public Service() { }

public void Initialise(XmlDocument config) { }

public XmlDocument Execute()
{
XmlDocument doc = new XmlDocument();
doc.LoadXml("<hello><world2/></hello>");
return (doc);
}
}
}
*********************************************

--
Of all words of tongue and pen, the saddest are: "It might have been"

Bill.Richards @ greyskin .co .uk
http://greyskin.co.uk
Jul 12 '06 #1
3 18824
Hi Billr,

My version of 2.0 gacutil is 2.0.50727.42. Make sure that the gacutil.exe
that you are executing lives in the 2.0.* folder.

HTH

"billr" <bi***@discussions.microsoft.comwrote in message
news:58**********************************@microsof t.com...
>I have created a simple .net class library

AdapterLibrary.dll, which contains a single class definition
AdapterLibrary.Service (code at end of posting). I have signed the
assembly
and I attempt to install in the GAC.

Using Visual Studio 2005 (.net 2.0) to build the dll results in me not
being
able to install the assembly in the GAC.

*********************************************
gacutil /i AdapterLibrary.dll

Microsoft (R) .NET Global Assembly Cache Utility. Version 1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.

Failure adding assembly to the cache: Unknown Error

*********************************************

However, if I take the code from this project and compile using VS 2003 I
have absolutely no problems installing the assembly in the GAC.

Can anyone advise on this please?
*********************************************
* Service.cs
*********************************************
using System;
using System.Xml;

namespace AdapterLibrary
{
public class Service
{
public Service() { }

public void Initialise(XmlDocument config) { }

public XmlDocument Execute()
{
XmlDocument doc = new XmlDocument();
doc.LoadXml("<hello><world2/></hello>");
return (doc);
}
}
}
*********************************************

--
Of all words of tongue and pen, the saddest are: "It might have been"

Bill.Richards @ greyskin .co .uk
http://greyskin.co.uk

Jul 12 '06 #2
Dave,

of course, now that you have pointed it out, I can see that I am using
gacutil that ships with vs2003.

Having multiple versions of VStudio on my machine really doesn't help
matters much!

So, of course, once I have made sure that I have run the relevent
vsvars32.bat everything works as intended.

Thanks for pointing that out to me :o)

--
Of all words of tongue and pen, the saddest are: "It might have been"

Bill.Richards @ greyskin .co .uk
http://greyskin.co.uk
"Dave Sexton" wrote:
Hi Billr,

My version of 2.0 gacutil is 2.0.50727.42. Make sure that the gacutil.exe
that you are executing lives in the 2.0.* folder.

HTH

"billr" <bi***@discussions.microsoft.comwrote in message
news:58**********************************@microsof t.com...
I have created a simple .net class library

AdapterLibrary.dll, which contains a single class definition
AdapterLibrary.Service (code at end of posting). I have signed the
assembly
and I attempt to install in the GAC.

Using Visual Studio 2005 (.net 2.0) to build the dll results in me not
being
able to install the assembly in the GAC.

*********************************************
gacutil /i AdapterLibrary.dll

Microsoft (R) .NET Global Assembly Cache Utility. Version 1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.

Failure adding assembly to the cache: Unknown Error

*********************************************

However, if I take the code from this project and compile using VS 2003 I
have absolutely no problems installing the assembly in the GAC.

Can anyone advise on this please?
*********************************************
* Service.cs
*********************************************
using System;
using System.Xml;

namespace AdapterLibrary
{
public class Service
{
public Service() { }

public void Initialise(XmlDocument config) { }

public XmlDocument Execute()
{
XmlDocument doc = new XmlDocument();
doc.LoadXml("<hello><world2/></hello>");
return (doc);
}
}
}
*********************************************

--
Of all words of tongue and pen, the saddest are: "It might have been"

Bill.Richards @ greyskin .co .uk
http://greyskin.co.uk


Jul 12 '06 #3
billr <bi***@discussions.microsoft.comwrote:
Using Visual Studio 2005 (.net 2.0) to build the dll results in me not being
able to install the assembly in the GAC.
gacutil /i AdapterLibrary.dll

Microsoft (R) .NET Global Assembly Cache Utility. Version 1.1.4322.573
^^^^^^^^^^^^
Perhaps the version number on gacutil may give you a clue. You have the
wrong gacutil on your path.

-- Barry

--
http://barrkel.blogspot.com/
Jul 12 '06 #4

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

Similar topics

2
by: Carlson Quick | last post by:
Hi, I am attempting to register an Assembly with the GAC programmatically from within a C# test system I am writing. Unfortunatly the test user that the test system is runs under does not have...
0
by: Dan Bass | last post by:
One day, out of the blue, anything COM interop related stopped building. When building any project (VB / C#) that has a COM interop interface (my own home grown projects, or a Visual Studio .Net...
2
by: glenn | last post by:
I have written a COM Server in C# and its working perfectly. I am not ready to deploy to client computers to begin the real testing and am now wondering how to perform. The part that confuses me...
3
by: Arvind P Rangan | last post by:
hi, I have compiled a .dll. steps followed is try to upload the dll to global assembly method 1: al /i:temp.dll but this gives an error method 2: gacutil /i temp.dll - this uploads dll to global...
1
by: Anthony Yott | last post by:
Folks, I have a C# .NET Assembly that is called from an MFC C++ application. The assembly is marked as COM visible so I'm accessing the assembly from MFC C++ via COM. Everything works great but...
0
by: fcaico | last post by:
I have a .NET 1.1 C# application that needs to connect to a custom web service for authentication and system access. This web service uses a custom SOAP header for security purposes. In the...
1
by: shivkumar2004 | last post by:
Hi!, I am developing a chat system using vb.net in vs 2005. I am getting the following error while registering the events. error details: System.InvalidOperationException was unhandled...
3
by: Phil | last post by:
VB2005 I have created a class library project. I have created a class using the COM class template. In the Application tab under My projects if I click on Assembly Information, the 'Make assembly...
2
by: PGP | last post by:
I have an assembly i need to register for COM interop. This assembly has other assembly dependencies that need not be visible to COM. Although, when i turn on "Register for COM Interop" in the...
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?
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.