Saturday, June 28, 2008

Howto: Strong naming a prebuilt assembly

If you need to apply a strong name to an assembly that was provided, already compiled, to you and you don't have the source, What you will do?

You first will need to produce the Microsoft intermediate language (MSIL) for the assembly using the ILDASM.EXE utility, then use an assembly key file to sign that MSIL into a new DLL using the ILASM.EXE utility.
Obtain the MSIL for the provided assembly From a VS.NET command prompt, enter the following: c:\>ildasm providedAssembly.dll /out:providedAssembly.il
Rename/Backup the original assembly or save it with a .bak extension. Once this is done.
Create a new assembly from the MSIL output and your assembly keyfile Assuming you already have an assembly key pair file ,do the following from a VS.NET command prompt:

c:\>ilasm providedAssembly.il /dll /key=keypair001.snk

Alas, you have an assembly strong named.
(Source:
http://www.andrewconnell.com/blog/archive/2004/12/15/772.aspx)

Tuesday, June 10, 2008

Reporting services 2005 - Could not load file or Assembly 'Microsoft.ReportingServices.Designer

"Could not load file or Assembly 'Microsoft.ReportingServices.Designer, version=9.0.242.0, CUlture=neutral, publickeyToken='' or one of its dependencies. The system cannot fidn the file specified" . If you have encountered this error while creating Report server project in visual studio 2005, here is the solution.

  1. Make sure the business intelligence addin (as part of SQL server 2005 express edition(SQLEXPR_TOOLKIT.EXE) is installed in the same directory as you have installed the visual studio 2005.
  2. By default the addin is installed in C:\
  3. Copy the contents of C:\Program Files\Microsoft Visual Studio 8\Common7\IDE to the same directory as visual studio 2005 installtion folder ( for ex. D:\Program Files\Microsoft Visual Studio 8\Common7\IDE if the visual studio installation is in D: drive)
  4. After copying the content to specific folders, we have to re register the reports package.
  5. For registering the package, Click on start button and then click Run.In the Open text box, type the following, and then press ENTER:
    "\Common7\IDE\devenv.exe" /setup /resetskippkgs ( is visual studio installationg path for ex. D:\Program Files\Microsoft Visual Studio 8\)
  6. Click OK.
  7. Click Start, and then click Run.
    In the Open text box, type the following, and then press ENTER:
    "Folder Path\Common7\IDE\devenv.exe" /resetskippkgs
    Click OK. If there are no errors, Visual Studio .NET or Visual Studio 2005 starts with no warnings and the problem is resolved