I came across the error The type initializer for 'System.Management.Automation.Runspaces.InitialSessionState' threw an exception. when trying to compile the c# in ASP.NET code using Visual Studio.
Solved
Open Control Panel > Install / Uninstall Programs > .NET 3.5 SP1 > Repair
I note down things I come across each day, with my views on it. It can be anything that I feel I should write.
Showing posts with label Visual Studio. Show all posts
Showing posts with label Visual Studio. Show all posts
Thursday, 4 August 2011
Tuesday, 5 July 2011
Get assembly fully qualified name
While doing development it has occurred to me many times how to get the assembly name easily of a dll(that is strong named). The normal approach is to create it manually from the properties of the dll file.
I would like to share with you a very eazy way to get the fully qualified assembly name using Visual Studio. It uses the external tools feature of Visual Studio.
When this menu item is selected, the assembly name is given in the output window.
It should look like HelloWorld, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b2135059549c7590
I would like to share with you a very eazy way to get the fully qualified assembly name using Visual Studio. It uses the external tools feature of Visual Studio.
- Open Visual Studio
- Go to Tools –> External Tools
- Click on "Add" to add a tool, and put in the following values:
- Title: Get Qualified Assembly Name
- Command: Powershell.exe
- Arguments: -command "[System.Reflection.AssemblyName]::GetAssemblyName(\"$(TargetPath)\").FullName"
- Check "Use Output Window". All other checkboxes should be unchecked
When this menu item is selected, the assembly name is given in the output window.
It should look like HelloWorld, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b2135059549c7590
Labels:
Assembly,
Dll,
Fully Qualified,
Powershell,
Visual Studio
Subscribe to:
Posts (Atom)