Skip to content

Installation of Microsoft.Build.CopyOnWrite #593

@RaptorCZ

Description

@RaptorCZ

I would like to know how to install this nuget. I found somewhere I need to put it to Directory.Build.targets as SDK reference

<Project>
  <Sdk Name="Microsoft.Build.CopyOnWrite" Version="1.0.302" />
</Project>

But I found on other sites, that it should be part of csproj, or Directory.Build.props

<Project>
  <ItemGroup>
    <PackageReference Include="Microsoft.Build.CopyOnWrite" Version="1.0.302" />
  </ItemGroup>
</Project>

Now I switched solution to Central Package Management and I'm using Directory.Packages.props for version definitions and not sure if both Build definitions supports it.

<Project>
  <PropertyGroup>
    <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
  </PropertyGroup>
  <ItemGroup>
    <PackageVersion Include="Microsoft.Build.CopyOnWrite" Version="1.0.302" />
  </ItemGroup>
</Project>

So how to use it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions