1

I have this structure:

- Content
    - Scripts
    - Styles
- Static
    - default.css
    - default.js

The folder Content must be in the source control, because that is where we change the scripts and styles of the website. So I can include it in the project.

The files in the folder Static must not be in the source control, it is generated and makes no sense to enable checkout and checkin.

The problem

If I include the folder Content in the project it will take it when I publish the website. If I exclude it from project it will not work with the Source Control.

If I exclude default.css and default.js from the project it will not be in the source control, but it will not go in the publish (I do not wish to publish all files in project folder).

Question

Is there a way I can choose which files I want to ignore and which I want to include in the publish?

Community
  • 1
  • 1
BrunoLM
  • 97,872
  • 84
  • 296
  • 452
  • My "publish process" consists of one VS-integrated publish to a local folder and a second, CS-Script-based (i.e. some external batch file) publish process that takes data from the local folder being published to, as well as from several other locations. Maybe you can use such a way, too, to include your additional files? – Uwe Keim Mar 27 '11 at 20:17
  • Does this help you out: http://stackoverflow.com/questions/1360579/post-publish-events. After a successful publish, have an automated script remove the content folder – davidsleeps Mar 27 '11 at 21:12
  • @david yes, that answers my question as a "The only way is to create a program to modify the published website" and gives me a hint of the best way to achieve the expected behavior. – BrunoLM Mar 27 '11 at 21:29

1 Answers1

0

(posting answer from comment...fwiw)...

This question on SO details how to run a script or command after a successful publish in Visual Studio. You could create a script that deletes the Content folder after each publish...Or copies the rest of the site somewhere, leaving the Content folder behind and this would achieve what you are after.

Community
  • 1
  • 1
davidsleeps
  • 9,393
  • 11
  • 59
  • 73