copy-local

MSBuild ProjectReference:private (“Copy Local”) - what are the allowed values and behaviour?

拈花ヽ惹草 提交于 2020-02-17 08:04:11
问题 TL;DR Is there any official documentation that describes in detail how the <private> / "Copy Local" option works with MSBuild ? And what values are supposed to go into it? When you add a project reference from one project in Visual Studio to another, it will add a <ProjectReference Include=".....csproj"> to the .csproj MSBuild file. When you add a file reference from one project in Visual Studio to an assembly file in the file system, it will add a <Reference Include="Foo"> <HintPath>....Foo

Copy local = false file not found exception issue

假装没事ソ 提交于 2020-02-15 12:33:01
问题 Hi I know this has been asked but it did not get an answer. I have a problem when I want to use a dll that is installed on C:\Program files (x86)\Dummu_API.dll When I run my app it throws exception: Could not load file or assembly 'Dummy_API, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. My project have the reference as Copy Local = false and specific version = false. My project also is a x86 platform target. I

Copy local = false file not found exception issue

穿精又带淫゛_ 提交于 2020-02-15 12:32:46
问题 Hi I know this has been asked but it did not get an answer. I have a problem when I want to use a dll that is installed on C:\Program files (x86)\Dummu_API.dll When I run my app it throws exception: Could not load file or assembly 'Dummy_API, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. My project have the reference as Copy Local = false and specific version = false. My project also is a x86 platform target. I

how to set all projects in solution to copy local false

北城以北 提交于 2019-12-24 11:30:24
问题 is there a quick way to mark all the solution projects references as Copy local false? is there some tool that does that? it's pretty messy to mark about 200 projects manually 回答1: You could use xsl to transform the project file to add False (this is what copy local false does) Here's an example xslt file <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:cs="http://schemas.microsoft.com/developer/msbuild/2003"

When should copy-local be set to true and when should it not?

≯℡__Kan透↙ 提交于 2019-12-17 22:11:57
问题 I am wondering if there are any heuristics for when to set copy-local=true for references? If referenced types are only used internally can I set copy-local to true but if referenced types are exposed as parameters or return values I set copy-local to false and indicate that a specific version of the dependency should be referenced when my library should be used? Can anyone clarify this for me? 回答1: Copy local is important for deployment scenarios and tools. As a general rule you should use

how to make a Visual Studio project file to copy indirect references?

旧巷老猫 提交于 2019-12-10 02:56:18
问题 As the screenshot shows, ClassLibrary1 relies on ClassLibrary2 and ClassLibrary2 relies on ClassLibrary3. And "Copy Local" is set to be "True". But when I compile ClassLibrary1, ClassLibrary3 won't be copied to the bin folder. So how can I config the Visual Studio project file to make it copy indirect references? 回答1: I don't think that this is possible. If you want the indirect references to be copied locally, you will have to add a direct reference to them to each project that you want them

VS 2015 copies to output GAC references of a project reference regardless of copy local setting

我的梦境 提交于 2019-12-06 19:21:24
问题 I've raised a connect issue for that behavior. VS 2015 copies to output GAC references of a project reference regardless of copy local setting. VS 2010 doesn't do that with the same solution & projects, respecting the copy local property. The only workaround I've found so far is to add a direct reference to Microsoft.Web.Services3.dll in Project A and set it to copy local = false. Steps to reproduce: Project A |__ Project B (Project Reference, copy local = true) |__Microsoft.Web.Services3.dll

Copy local = false file not found exception issue

允我心安 提交于 2019-12-02 02:06:36
Hi I know this has been asked but it did not get an answer. I have a problem when I want to use a dll that is installed on C:\Program files (x86)\Dummu_API.dll When I run my app it throws exception: Could not load file or assembly 'Dummy_API, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. My project have the reference as Copy Local = false and specific version = false. My project also is a x86 platform target. I don´t know why my app don't find the assembly. Any Idea what it is happening? Option 1 You can tell your

When should copy-local be set to true and when should it not?

可紊 提交于 2019-11-28 17:21:56
I am wondering if there are any heuristics for when to set copy-local=true for references? If referenced types are only used internally can I set copy-local to true but if referenced types are exposed as parameters or return values I set copy-local to false and indicate that a specific version of the dependency should be referenced when my library should be used? Can anyone clarify this for me? Copy local is important for deployment scenarios and tools. As a general rule you should use CopyLocal=True if the reference is not contained within the GAC. Copy Local essentially means I must manually

Set “Copy Local” to False by default?

你。 提交于 2019-11-27 19:00:00
Can I set the default-option of "Copy Local" in Visual Studio to False? In most times, when I add a dll as dependency of a project, I want the Copy Local property set to False. Per default, it is True. Is there a way to change the default behaviour of Visual Studio? (2008) Leom Burke No - Visual Studio uses an internal set of rules to determine what to set Copy Local to. From MSDN : If the reference is another project, called a project-to-project reference, then the value is true . If the assembly is found in the global assembly cache, the value is false . As a special case, the value for the