Click to See Complete Forum and Search --> : Assembly generation failed -- Referenced assembly 'Microsoft.Web.UI.WebControls' does
repalley
August 27th, 2004, 03:03 PM
hello,
iam using (IE webcontrol)treeview control in custom web part, when i compile it compalining that web control is not storong name.
does any one know how to strong name third party control or IE web control
Thanks
MRutledge
August 27th, 2004, 06:10 PM
did you install the ie web controls on your development environment and local machine?
jfort
October 11th, 2004, 07:03 AM
Hi,
You need to do a few things to recompile and deploy your IE Web Controls with a strong name.
1). Install the IE Web Controls
2). Navigate to the [Install Drive]:\IE Web Controls directory
3). Open up a Visual Studio Command Prompt window < please do this exaclty>
3). Edit the build.bat file
4). Change the third line that read as follows:
csc.exe /out/buld\Microsoft.Web.UI.WebControls.dll @IEWebControls xcopy src\Runtime buld\Runtime /E /Y /I /Q
5). Change to the following:
csc.exe /define:STRONG /out/buld\Microsoft.Web.UI.WebControls.dll @IEWebControls xcopy src\Runtime buld\Runtime /E /Y /I /Q
Note: the "/define:STRONG" addition
6). Now, Save the edited file ( you might need to use the windows explorer to remove the read-only attribute from the file first)
7). Go to the command prompt and type the following:
sn -k Microsoft.Web.UI.WebControls.snk
This generates a strong key file you can utilize to strongly name the new assembly we are going to generate.
7). Next, move into the \src directory and edit the "version.cs" and add the following line at the bottom of the file
[assembly:AssemblyKeyFile(@"c:\Microsoft.Web.UI.WebControls.snk")]
This line includes our strong name key file into the project
8). Now, save the "version.cs" files , changing the read only bit as needed
9). Changed directories back up to the IE Web Controls root directory and execute "build.bat" to recompile the IE Web Controls as a strongly named assembly.
Note: You can use the ildasm.exe program to check for the existence of the .public key attribute in the assembly manifest.
10) Execute the original "xcopy" statement included in the original readme.txt to redistribute the appropriate files to the web server virtual directory
Good Luck,
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.