0

I have a project with multiples folders in it, and I'm trying to exclude one of these folders with a pre-build event from the final build.

My architecture:

Project.Client
|General
| | classes to build
|Entities
| | classes to exclude from the build
| Helpers
| | classes to build

For now I found this command, but it's not really working...

cd $(ProjectDir)
rmdir Entities

Could you please point me to the right direction?

greyxit
  • 693
  • 3
  • 13

1 Answers1

0

You'll probably have to select the classes in that folder in the Solution Explorer in Visual Studio and set their build action to "None" in the Properties window.

Melvin
  • 344
  • 1
  • 8
  • This solution is "working", but it's not the ideal one... Classes in the folder are automatically generated by my model (CodeFluent) – greyxit Jun 08 '15 at 12:54
  • It would be great if one would be able to set the build action for an entire folder, sadly, I don't see that option. [There has been a similar question which might help you though](http://stackoverflow.com/questions/6104818/ms-visual-studio-how-to-exclude-certain-project-folders-from-publishing) – Melvin Jun 08 '15 at 12:58