-1

I have a dot-net project build with VISUAL STUDIO 2015 4.6.1 framework and I have two independent program folders in the source code which has some build errors. There are no references to these programs from the main program.

When I push the whole source code onto VSTS I get build errors. So now I need a way to exclude those two folders from the manual build for now but may need them later after they are debugged so I don't want to delete them from VSTS too.

Can someone suggest?

Salman
  • 1,573
  • 3
  • 13
  • 24
  • What is the project type ? are you using msbuild ? – Jayendran Oct 16 '18 at 02:53
  • its a dotnet visual studio 2015 4.6.1 framework project.Not using msbuild, i am using visual studio build agent in VSTS. – Salman Oct 16 '18 at 03:38
  • could you try [this](https://stackoverflow.com/a/22921277/7073340) sol. Basically `SkipExtraFilesOnServer` will be set true in order to skip the folder which you need. Just pass those as a parameter/argument to your visual studio build task – Jayendran Oct 16 '18 at 05:31

1 Answers1

0

Use an MS Build project file. Create an MSBuild project file from scratch

And the at the build solution step in VSTS, select or type the project file path instead of the solution file. You will have to remove it down the road though. The maintenance tasks tend to be hard and counter-intuitive whenever the code base grows quickly. Visual Studio will not warn you if you have build errors (like obsolete path) in the MS Build project file.

Ami
  • 65
  • 7
  • You mean i have to edit the source code to create a MS Build project file, but i just need to exclude those two folders from build in VSTS after i baselined the project. I do not want to modify the source code structure/type. I can understand this will cause difficulty at later stage so i have two options either to skip those two folders and not check-in to VSTS or somehow exclude them from build pipeline. I hope u get the issue. – Salman Oct 16 '18 at 02:58
  • It really all depends about where those folders are located. If there are on the project level, it should suffice to exclude them from the project compilable items. That should still keep them in the source control. – Ami Oct 16 '18 at 18:28