The application requires that assembly to be installed in the Global Assembly Cache

Last week I wrote a small C# application in Microsoft Visual C#2010 Express. The application will help to script the indexes from any server and can filter on clustered or non-clustered indexes. I published the application and wanted my colleague to run it from his machine.

When he tried to run the application it gave the below error and the application didn’t even open up.

I searched for the error and tried a lot of stuffs as different posts suggested different things and nothing works. I then decided to play with Visual Studio and checked the properties. The properties of a solution will look like below.

I noticed that there is this option called Application files. I checked the application files and was able to see the dll which is mentioned in the error. There was an option “Publish Status” and it was set as exclude. I changed this to Include.

Once I changed this setting I published my application once more and this time It opened up the application rather than giving an error.

2 thoughts on “The application requires that assembly to be installed in the Global Assembly Cache

  1. Thanks, this solved my related problem with complaints of not having Microsoft.SqlServer.Types.dll in the GAC. 🙂

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s