Archive for August, 2012

How to add .snk file to Project from Common folder

In the current application, I have nearly 200 projects and needs to be strong named all of them to ensure the best to the project.

I have used the below steps to ensure that the team needs to use only one .snk file across the application projects. In general, if you strong name the appliation in a single project, the copy of the .snk file will be created in each project.

With the below, you don’t need to have multiple copies and multiple public key tokens for the same version of the project.

Assumption: You already have the .snk file created

  1. Create a project in Visual Studio.
  2. Right click on the project name and select existing item.
  3. Image
  4. Add an existing .snk file to the project as a link.
  5. Image
  6. Refer the added .snk file from the signing tab.
  7. Image
  8. Build the project.
  9. You need to repeat the same steps for all the projects in your application.

You are good to go..!!

Hope this helps. Happy coding.. 🙂

~ Gangadhar Kotu

Advertisements

How to clear Page file in Windows Server

I was running a dev server which has got 60 GB HDD and couple months later observed that there is no free space. I was looking at the space why it has occupied fully and after sometime understood that the PageFile.sys is having 6.5 GB and wondered how to clear this with simple steps as pagefile.sys is managed by Windows.
 
Finally found the way.
 
  1. Start Registry Editor (Regedt32.exe).
  2. Change the data value of the ClearPageFileAtShutdown value in the following registry key to a value of 1:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management

    If the value does not exist, add the following value:

    Value Name: ClearPageFileAtShutdown
    Value Type: REG_DWORD
    Value: 1

Note: This change does not take effect until you restart the computer. 

This has given me more space and had cleared other unwanted files to ensure the server runs without space issues.

~ Gangadhar Kotu