Creating a strong assembly using ILMerge

April 26, 2008

Hello ,

Sometimes , you may use an assembly that is not strong-named and also the source code is not available. How do you make an strong assembly out of that? ILMerge Tool allows you to sign/resign an assembly with a specified .snk file. Consider having a weak assembly called “Weak.dll” , you can create a strong-named assembly out of that as shown below :

ilmerge Weak.dll /keyfile:key.snk /out:Strong.dll

Note: You can create a random .snk file using Sn.exe(Strong Name Tool) from Visual Studio Command Prompt , For Example :

sn -k key.snk

ILMerge Download Page

Advertisements

BUG : Unable to update the dependencies of the project.

January 28, 2008

Hello ,

Yesterday , When building the setup project , I received the following error :

“Unable to update the dependencies of the project. The dependencies for the object ‘ name.dll ‘ cannot be determined..”

Also trying to Refresh Dependencies was not successful :

“The operation can not be completed.”

This problem occurs when .VDPROJ file is corrupted , to resolve this bug , you may follow these steps :

1) Open .VDPROJ file with a text editor :

2)Find “Hierarchy” & “File” Sections and Delete everything in them ,

3)Delete “Project Primary Output” And Add it again.

4)Reload the project .

5)Rebuild the project.

If the above solution did not work , you may need to DELETE the setup project and create it from the scratch.

Note : This BUG occured on a machine having Visual Studio 2005 Team Suite Edition with SP1 Installed .

This BUG is reported here :

http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=119625

Microsoft has also published a hotfix that can be found here :

FIX: The Visual Studio 2005 IDE may corrupt the deployment files for a Web Setup Project and for a Setup Project

In this article , the author mentined that :

“This problem may occur when you have a Database Project and a Setup Project in the same solution”

But Keep in mind that this problem may occur even if the solution does not contain any Database Project , So the above quotation is not the accurate cause of the issue.


.Net Framework Source Code is Now in Your Hands!

January 17, 2008

Hello ,

Last October , ScottGu announced that Microsoft is going to release Source Code for .Net Framework Class Libraries , Now It’s Available!

Right Now , you can browse and debug following .Net Framework Libraries with Visual Studio 2008 :

  • .NET Base Class Libraries (including System, System.CodeDom, System.Collections, System.ComponentModel, System.Diagnostics, System.Drawing, System.Globalization, System.IO, System.Net, System.Reflection, System.Runtime, System.Security, System.Text, System.Threading, etc).
  • ASP.NET (System.Web, System.Web.Extensions)
  • Windows Forms (System.Windows.Forms)
  • Windows Presentation Foundation (System.Windows)
  • ADO.NET and XML (System.Data and System.Xml)

And they are going to provide source code for Windows Communication Foundation , Windows Workflow Foundation and LINQ in near future .


This helps programmers having a deeper perception of .Net Framework Class Libraries and understanding how thease libraries are implemented in order to build stronger Windows & Web Applications.

 Visit the following links for further information :

ScottGu’s Blog

Configuring Visual Studio to Debug .NET Framework Source Code