logo
down
shadow

How do I set some project references to CopyLocal = false based on metadata?


How do I set some project references to CopyLocal = false based on metadata?

Content Index :

How do I set some project references to CopyLocal = false based on metadata?
Tag : visual-studio , By : amorican
Date : December 02 2020, 10:46 PM

fixed the issue. Will look into that further You can add a target which executes after ResolveAssemblyReferences target into AddOn.csproj like this:
  <Target Name="ClearReferenceCopyLocalPaths" AfterTargets="ResolveAssemblyReferences">
    <ItemGroup>
      <FilesToExclude Include="@(ReferenceCopyLocalPaths)" Condition="$([System.String]::new('%(ReferenceCopyLocalPaths.FullPath)').Contains('bin\Debug'))"/>
      <ReferenceCopyLocalPaths Remove="@(FilesToExclude)" />
    </ItemGroup>
  </Target>

Comments
No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

How do I override CopyLocal (Private) setting for references in .NET from MSBUILD


Tag : .net , By : fayoh
Date : March 29 2020, 07:55 AM
will help you Try this:
Set the CustomAfterMicrosoftCommonTargets to C:\foo\filter.targets (or whatever you name the file) and have filter.targets to be:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <ItemDefinitionGroup>
      <Reference>
        <Private>False</Private>
      </Reference>
    </ItemDefinitionGroup>
</Project>

Managing VS2010 References With CopyLocal=False


Tag : visual-studio-2010 , By : user183289
Date : March 29 2020, 07:55 AM
it helps some times You can override the $(OutDir) property globally and keep CopyLocal enabled. Since every project is copying to the same $(OutDir), you won't end up with too much duplication. This is pretty straight forward.
Much more involved, you can also create a shared import file that wires into the standard build and performs a custom post-build deployment. For example,
<Target Name="Deploy"
   DependsOnTargets="Deploy)"
   AfterTargets="Build">

   ... copy all output files ...
   e.g. use wildcards $(OutDir)\*.dll
   e.g. $(OutDir)\$(TargetName)$(TargetExt)
   e.g. copy referenced assemblies and copy, see below
</Target>

Check CopyLocal property of all references post/during build in multi project solution (Multi Xap)


Tag : silverlight , By : Frank Bradley
Date : March 29 2020, 07:55 AM
Hope that helps I am using a different path now to do this. I have a base class that I can use to write unit tests that have access to the DTE2 object. This way I dont need an addin. This also works for Silverlight projects since the test class does not actually need access to the Silverlight projects, just being in the solution is enough to be able to iterate through the projects and check the references.

How to getType from a reference dll when copylocal property is false


Tag : chash , By : Anna
Date : March 29 2020, 07:55 AM
like below fixes the issue I need to make something like: , If the assembly is already loaded you could try this:
Type customType = Type.GetType("namespace.typename, assembly");

CopyLocal=false filenotfound


Tag : chash , By : Chris Tattum
Date : March 29 2020, 07:55 AM
To fix the issue you can do Typically, a bin folder is intended as the main component of your deployment package. In a very simple application deployment, everything a program needs exists in the bin folder. You could copy paste that folder anywhere and it would work. Of course, that won't happen if your external assembly isn't there.
You find that those assemblies shouldn't exist in 2 places on your development machine, and I understand why you don't like that. The reason CopyLocal is set to true by default is because the typical scenario I described above is worth the cost of having assemblies existing twice in a development machine. Typically, an application will exist on many times more client machines than development machines, so the simplicity of a single deployment folder is worth the cost of disk space on dev machines.
Related Posts Related QUESTIONS :
  • 'Could not load file or assembly 'FSharp.Core, Version=4.6.2.0
  • How to install the VS2019 CodeAnalyis tools using vs_BuildTools.exe
  • How can I debug ASP.NET Core 3.0 application with Visual Studio 2019 on Raspberry PI 3
  • How to fix "The access control list (ACL) structure is invalid"
  • How to see the value of a parameter inside a With-Block while debugging?
  • Visual Studio 2019: Start Page instead of Start Window
  • How do you use printf in x86 assembly in Visual Studio 2017?
  • I can get any emulators running in vs code
  • Angular Project not run on docker with visual studio 2019
  • Xamarin - This release is not compliant with the Google Play 64-bit requirement
  • Visual Studio 2019: Peek definition with combination of mouse and keyboard click
  • Visual Haskell 2008/2010
  • Indenting c++ in visual studio
  • VS2010 Upgrade Edition - is 'upgrading' from express ligitimate?
  • VS2005 and VSS. Should .exes, .dlls, pdbs, .resource and generated .xml files go in VSS?
  • Renaming files: Visual Studio vs Version control
  • Configure the visual studio debugger for try-catch statements
  • Link failure with either abnormal memory consumption or LNK1106 in Visual Studio 2005
  • Can I have a macro run whenever I save a file in Visual Studio 2005?
  • Can I use the newer versions of Visual Studio to do "old" things?
  • How to add datasource to a report in VS2010?
  • Getting up and running with code contracts
  • VS2010 RC: Add new domain service class wizard entities list is empty
  • Visual Studio 64 bit?
  • Visual Studio - "attach to particular instance of the process" macro
  • How do I make Visual Studio automatically stop compiling after 1 (or n) errors?
  • Microsoft Redistributable package
  • Visual Studio - how to find source of heap corruption errors
  • Show <returns> xml tag into visual studio intellisense
  • Visual Studio Team Suite
  • Visual studio 2008/2010 dilemma
  • Source files not located in Microsoft Visual Studio
  • Accessing Microsoft visual source safe over the internet
  • How do I make NUnit respect my bindingRedirect in my testassembly.dll.config?
  • I need to place VS SSDT and VS in a single place, I have them separated
  • UpToDateCheckBuilt does not work and the build always works
  • Why are build and rebuild of my VSIX solution not generting the same output
  • Can't open Resharper's "bookmarks menu" (Ctrl + `)
  • Cannot modify NuGet packages
  • There is no menu to create "new team project" on visual studio 2019
  • What causes the error: The "NgenLocalized" parameter is not supported
  • F# Breakpoints only work after a an exception is thrown
  • Unable to build a Dockerfile created by Visual Studio 2019 - Docker and Azure
  • I want to blur my parent grid with black shade at the time of popup in uwp. Is there any way to implement this in uwp
  • Nuget Restore in a Docker Container
  • How to mark files of a folder as embedded resource with wildcards with the new project format?
  • How do you deploy different logins based on environment in SQL Server Database Project 2017?
  • After PostBuild event Visual Studio/MS Build
  • Visual Studio 17 - example colors visibility
  • MSBuild how to pass parameters to be used in CPP source file?
  • How to enable .gitignore file in private repository in GitHub with GUI
  • How to create an exe for .NetCore service
  • Show tooltip on hover over text
  • Confusion about CUDA installation instructions (What exactly is microsoft visual studio?)
  • How should I include Package References in a VSIX project
  • Group by multiple columns, then order results
  • Visual Studio 2019 not entering break point in Azure Functions local debuging mode
  • How can you create a view as a post deployment script in a SQL Server Database Project?
  • Import error data source of Oracle to Visual Studio (Azure analysys Server)
  • Why the script does not work / the button is not pressed in the web browser (control/component)?
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com