NealWalters
NealWalters

Reputation: 18207

Rules for when .NET referenced assembly is put in bin\debug

How does .NET (or Visual Studio) build decide whether or not to copy a referenced assembly to your bin/debug or bin/release directory? (This is an .exe console program.)

On my machine, I had the referenced assembly in the GAC. A co-worker copied my bin/release to their machine, and it wouldn't run because the referenced asssembly was not in the bin/release (and not on their GAC).

Thanks,

Neal Walters

Upvotes: 1

Views: 1790

Answers (2)

Tomas Vana
Tomas Vana

Reputation: 18775

When you have added a reference to a project (Project->Add Reference... or in Solution Explorer right click References and select Add Reference...) you can right click the added references and select Properties. You will then see the CopyLocal property in the properties window. This can be set to True or False to indicate weather the reference needs to be copied to the output directory of the project.

Upvotes: 2

morpheus
morpheus

Reputation: 20360

If the assembly is not in GAC, then its copied. The CopyLocal attribute in properties window, tells if the assembly will be copied or not.

Upvotes: 5

Related Questions