microsoft / MSBuildSdks

MSBuild project SDKs
MIT License
460 stars 82 forks source link

RobocopyFiles target from Microsoft.Build.Artifacts not compatible with UseArtifactsOutput #566

Open timmydo opened 2 months ago

timmydo commented 2 months ago

I'm trying to migrate a 2k csproj solution to <UseArtifactsOutput>true</UseArtifactsOutput> with a <ArtifactsPath>$(MSBuildThisFileDirectory)target/artifacts</ArtifactsPath>.

One of the first things I ran into is that it seems the RobocopyFiles target doesn't run. It's using Condition="'$(EnableArtifacts)' != 'false'". Is there a way to keep RobocopyFiles enabled? We have about 600 instances of it being used. It's doing things like:

    <Robocopy Include="$(PkgMyNuget)\lib\$(MyNetVersion)\">
      <DestinationFolder>$(TestServicesPath)\Taef\blah</DestinationFolder>
      <FileMatch>Some.Thing*.dll</FileMatch>
    </Robocopy>

We also use some of the other MSBuildSdks like CopyOnWrite.