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 t开发者_C百科he bin/release (and not on their GAC).
Thanks,
Neal Walters
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.
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.
精彩评论