This is something I stumbled upon recently and most of you already have this option already in their tools menu in VS. this post is especially to those that just like me did not know it.
While developping a custom layouts page, you need to specify the assembly name where the asp page his code behind class can be found.
something like: Namespace, Version=18.104.22.168,Culture=neutral, PublicKeyToken=****************
To retrieve this token you could drag and drop your assembly in the gac and copy the token from there. Sn.exe combined with external tool in visual studio offers you a simple menu that displays the public key token of the current signed assembly in no time.
In Visual Studio 2005, click Tools -> External Tools…
Click Add and enter the following into the different fields as displayed in the following screenshot:
Title: Get Public Key
Command: C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\sn.exe
Arguments: -Tp “$(TargetPath)”
Uncheck all options, except Use Output window\