1

I have a VS2017 solution and I'm trying to copy an external DLL into the same folder as the final .exe executable (whether it will be Debug, Release or Publish)

tried with:

xcopy "$(ProjectDir)..\..\myDllFolder\myDll.dll" $(ProjectDir)$(OutDir)

I get:

Severity Code Description Project File Line Suppression State Error MSB3073 The command "xcopy "C:\Projects\Reviewer\Eurotherm.Reviewer\Eurotherm.Reviewer.ServiceHost\....\LMBrick\LMBrick.dll" C:\Projects\Reviewer\Eurotherm.Reviewer\Eurotherm.Reviewer.ServiceHost\bin\Release\net461\ /i xcopy "C:\Projects\Reviewer\Eurotherm.Reviewer\Eurotherm.Reviewer.ServiceHost\....\LMBrick\LMBrickX.dll" C:\Projects\Reviewer\Eurotherm.Reviewer\Eurotherm.Reviewer.ServiceHost\bin\Release\net461\ /i" exited with code 2. Eurotherm.Reviewer.ServiceHost C:\Projects\Reviewer\Eurotherm.Reviewer\Eurotherm.Reviewer.ServiceHost\Eurotherm.Reviewer.ServiceHost.csproj 48

xcopy exited with code 2

The directories are present, the input file is present. why it doesn't work? Code 2 means xcopy doesn't know if the second parameter is a folder or a file, I tried forcing the answer using /i but I get the same error

Gianluca Ghettini
  • 11,129
  • 19
  • 93
  • 159

0 Answers0