1

I'm able to get my project to build just fine using TFS 2017 Visual Studio Build step. However in the output directory there are no .SVC files. Am i missing a step that produces these?

I have searched for this online and i still haven't found a solution that makes sense to me.

Kyle Fuller
  • 117
  • 2
  • 13

1 Answers1

1

Build a WCF in VS locally will also not copy the .svc file by default. Right click the file and select properties, the default value of Build Action is content and Copy to Output Directory is Do not Copy.

If you really want to copy this file, you could add a task in your .csproj file to achieve it. A sample for your reference:

<Target Name="AfterBuild">
    <PropertyGroup>
      <SolutionDir>$([System.IO.Path]::GetDirectoryName($(MSBuildProjectDirectory)))</SolutionDir>
    </PropertyGroup>



    <PropertyGroup>
      <CopyFileOutput>$(SolutionDir)\WebUI.UnitTest\bin\Debug\WebUI.UnitTest.dll;$(SolutionDir)\Core.UnitTest\bin\Debug\Core.UnitTest.dll</CopyFileOutput>
    </PropertyGroup>



    <Copy
      SourceFiles="$(CopyFileOutput)"
      DestinationFolder="$(SolutionDir)\WebUI\bin"
     />

  </Target>
PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62