Last post Dec 05, 2005 11:07 AM by asp11585
Dec 05, 2005 11:07 AM|asp11585|LINK
Here is a tip that I would like to share with you all… just in case anyone comes across with this situation like I did.
SITUATION: When your solution (.NET 1.1 with VB.NET) using assembly with a Strong Name (ex. using snk file), the web control dll file will not work.
An error message will display as follows…
Assembly generation failed -- Referenced assembly ‘Microsoft.Web.UI.Webcontrol' does not have a strong name
REASON: When you compile an assembly with a strong name, any referenced assemblies must also have strong name.
You first need to produce the Microsoft Intermediate Language (MSIL) for the webcontrol assembly, and then use an assembly key file to sign that MSIL into a new DLL using the ILASM.EXE utility.
(The .net utility files can be downloaded from Microsoft (.net SDK))
From a VS.NET command prompt, enter the following:
C:\>ildasm Microsoft.Web.UI.WebControls.dll /out:Microsoft.Web.UI.WebControls.il
I relocated the original assembly (Microsoft.Web.UI.WebControls.dll) to another location.
From a VS.NET command prompt, enter the following
C:\>ilasm Microsoft.Web.UI.WebControls.il /dll /key=keyfile001.snk
The new assembly Microsoft.Web.UI.WebControls.dll is what you need to reference in your project.
Hope this help.