I was trying to deploy a custom assembly using Windows 2008 and SQL Server 2008.

I could run as administrator from the command prompt icon and move the .dll file to the assembly folder.

But, the assembly was not installed and could not be listed.

Drag and drop to the folder gave “Access Denied” error.

Tried to look for GACUtil from C:\WINDOWS\Microsoft.NET\Framework\version to install the .dll but the file was missing.

Apparently, the GACUtil.exe utility has now moved first and foremost and is not installed by default until you install the .NET and Windows 2008 SDK.

After that, you’ll be able to find the GACUtil.exe utility in the SDK directory and can call it as shown below:

C:\Program Files\Microsoft SDKs\Windows\v6.1\bin\gacutil.exe /i “dllfilename.dll”

Then, you’ll need to copy your DLL file into the C:\windows\Microsoft.NET\Framework\v2.0.50727 (or whatever .NET version you wish to be on) directory and the custom assembly is ready to be used.

The issue that prompted this learning was that the custom web part deployed could not be added to my SharePoint site and it was throwing the following error.

“Unable to add selected web part(s). A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe.”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s