I created a console application using C# that references external DLLs. When I run it on my dev machine, everything works fine. On the production machine, I get a "type initiatization" error. Looking into this, it seems it may because the app can't find the referenced DLLs.

On my dev box, the referenced DLLs are in the GAC, but not on the production one. When removing the DLLs from the GAC on the dev box, the same error occurs (unless I run it from a local Visual Studio build in debug mode).

I'm more familiar with web site setups, and know there that the DLLs can be placed in the bin directory or the GAC so they can be found by the web application. But I'm not sure about how this works for console apps.

I'm reluctant to put the DLL into the GAC on the production box, as it's only needed for this one small application. Are there other ways for me to deploy the console app and have it find its required assemblies?

Here is the exception I'm getting:

> 
> Error 1 The type or namespace name 'Entry' could not be found (are you
>  missing a using directive or an assembly reference?) C:\Documents and
>  Settings\Hacker\My Documents\Visual Studio
>  2005\Projects\basic\basic\Program.cs 10 8 basic
> 
> 
>
['https://Stackoverflow.com/questions/1214269', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/-1/']
```

- Right click on the assembly name in your project reference.
- select Properties
- In the properties window set CopyLocal to true

```
When you examine the exception you get (and you may need to dive into the inner exception), you should see a log of all the locations searched (the "fusion log").

I'd recommend just placing the dependent DLLs in the same directory as your console app.