Sunday 28 February 2021

How to get the strong name of your assembly by adding an External Tool?

Introduction

Solution

This tip will make it easy for you to get that assembly name right within Visual Studio.

  • In Visual Studio, Go to Tools –>  External Tools.


  • Click on “Add” to add a tool, and put in the following values:
    • Title: Strong Name
    • Command: Powershell.exe
    • Arguments: -command "[System.Reflection.AssemblyName]::GetAssemblyName(\"$(TargetPath)\").FullName"
    • Check “Use Output Window”
    • Uncheck everything else – here’s how it should look -

  


  • Right Click on your solution and Clean Your Project solution.

 


  • Now, Right Click on your solution and build Your Project solution.

 


  • That’s it, now in your project, Visit Tools –> Strong Name, and in the output window, it will give you the assembly name like this –>

 ProjectName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e3d610b32dbba675  

 




Please let me know if you face any issues.

No comments:

Post a Comment