1

Right now I'm working with an ASP.NET website that automatically generates images and stores them in a temporary folder. When working on my local system these go going into a temporary folder that gets picked up by Visual Source Safe which then wants to check them in. As such, I am wondering if there is a way to just exclude that particular folder from source control?

I've done a bit of reading and found that there are ways to do this for individual files, but I haven't found anything yet about an entire folder.

4

6 回答 6

3

I think you've found one of the main reasons MS went back to projects in VS2008 and in MVC.

It's been a long time since I've used VSS (mainly because it's really out of date now), but most source providers let you exclude files and folders as a setting of the provider, rather than the project under control.

If you can switch to a Web Project rather than a WebSite then do so, otherwise I'd look at updating your source control provider, as this sort of exclusion is easy with Vault, CSV, SVN, Git, VSTS and so on (to name but a few).

于 2008-10-10T10:30:50.920 回答
1

Are you using ASP.NET Website or ASP.NET Web Project? The difference is significant enough to solve or promote this problem.

Websites, love to scan the file system and auto checkin. Projects, checkin only what you tell them to.

Also Visual Source Safe is pretty out dated, most recent source control systems allow you to do what you are asking. SVN and TFS 2008 SP1 do from my experience.

You can also try to right click and pick "Exclude" on the folder, but in the case of a Website I believe this renames the folder.

于 2008-09-03T14:03:06.190 回答
0

I'm not sure if this is an option for you, but if you exclude your temporary folder from VSS (delete the folder inside VSS using the VSS UI), the files that go into it should not get "picked up" again.

于 2008-09-03T14:01:43.633 回答
0

I would suggest emptying/deleting your folder from your website. Have your website on startup create/verify the folder, and on shutdown to clean it up and remove anything in it. This can be DEBUG code only (wrap in #if DEBUG) if so needed. Also add a build script to your project that does this every time it is built also.

于 2008-10-10T10:39:29.593 回答
0

Could you just make your application write to a temporary folder that is outside of your website?

e.g. in C:\tempfiles

VSS shouldn't be able to pick it up then.

于 2009-04-22T20:11:26.577 回答
0

If you perform operations on a parent project of the temporary folder, you may try cloaking the folder. http://msdn.microsoft.com/en-us/library/x2398bf5(VS.80).aspx

于 2010-09-07T07:16:01.390 回答