开发者

How to choose files that will go in deploy?

开发者 https://www.devze.com 2023-02-19 22:28 出处:网络
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

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?


(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.

0

精彩评论

暂无评论...
验证码 换一张
取 消