How To Get The Strong Name Of Your Assembly By Adding An External Tool

Introduction

  • For a client, we were developing SharePoint 2019 Web API. For that we were following this post.
  • In that we needed to set up strong assembly name. The link was dead. So I thought I should write this blog.

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.
How To Get The Strong Name Of Your Assembly By Adding An External Tool
  • 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 -
How To Get The Strong Name Of Your Assembly By Adding An External Tool
  • Right Click on your solution and clean your project solution.
How To Get The Strong Name Of Your Assembly By Adding An External Tool
  • Now, Right Click on your solution and build your project solution.
How To Get The Strong Name Of Your Assembly By Adding An External Tool
  • 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 –>
    1. ProjectName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e3d610b32dbba675    
 How To Get The Strong Name Of Your Assembly By Adding An External Tool
 
How To Get The Strong Name Of Your Assembly By Adding An External Tool 
 
Please let me know if you are facing issues.