Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VS2005 - Exclude Folder From Publish 5

Status
Not open for further replies.

ca8msm

Programmer
Joined
May 9, 2002
Messages
11,327
Location
GB
Is it just me or does the "Exclude From Project" option not exist for folders in a web application? I can use it on individual files (or even folders if it is a windows application) but not on folders.

The reason that I ask is that I have a test site with the following structure (an mocked up example of it anyway):

WebApplication1
WebApplication1\Images
WebApplication1\Data

What I want to do is to publish the site to the live server and overwrite the files in the root folder and the images folder but I don't want to overwrite the data folder as this is live data and needs to remain there (the folder exists on my development server but is full of test data).

With VS2003, I would have created a setup project, selected "Exclude From Project" on the Data folder and when I ran the setup file on the live server, the Data folder would remain intact. Now, if I use the "Publish Web Site" option in VS2005 it will delete the Data folder on the live site!

I guess I could just create a setup project like I did in VS2003, but, the "Publish Web Site" option would be much easier.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
ca8msm.... I have not found the "Publish Web Site" option.. but i did see the "copy web site" option, and in there you can exclude files/folders you want.
I do find it strange though that in VS2002/03 you could exclude folders from the project, but in 05 you can't. But then again, that is Microsoft for you..

Jim
 
Jim,

The "Publish Web Site" option is available if you right click the project (not the solution) from the Solution Explorer tab. I'll try the Copy Web Site method and see if I have any luck with that (I don't know what the differences are between tham at the moment).

Still, I (like you and many others I imagine) find it really strange that they have excluded that option to be able to exclude folders.

Thanks


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Ahh now I see it! I don't see many configurable options. I would also like to know the difference between "Publish" and "Copy"
Seems like too many options and not enough explination. Please let me know if you find out what the differenc is... Thanks...

Jim
 
I've just been reading a few posts on it Jim:


Also, MS have apparantly released an add-in for VS (guess they realised there was a bit of a flaw somewhere as well!) that can create a Web Deployment Project which seems to have a few nice touches (like replacing test folders/data etc) so I think this might come in handy:



____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.
 
Oh, and the difference between publish and copy seems to be that publish actually compliles the project and installs it whereas copy seems to just literally copy the whole project over to the server (which I don't think I like!).


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
This add in looks pretty cool. I have installed it. Going to play with a bit to see what it offers. But after looking quickly at the documentation, it looks pretty useful.

Jim
 
Yeah, it does. Hopefully it will help with the problem I have anyway. Thanks for the help.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Yeah, the new build process totally sucks. It's hosed me:

1. When I tried to create base-pages in the same project (because each page now becomes it's own assembly during dynamic compilation).
2. When trying to apply field-level attributes to controls (I like that they're separate, but I don't like that the definitions are completely inaccessible).
3. In my creation of an add-in model for web pages that relied on having a compiled assembly to drop into the "bin" directory (there's no single assembly anymore, or if there is [by configuration] it's randomly named and undeployable).
4. In the use of pre-processor directives for conditional compilation. You can only define the symbols in the compiler options in web.config now which is a pain when you want to switch from Debug to Release build.

That, and with no project file anymore, you can't take advantage of all the coolness of MSBuild.

The Web Deployment Projects add-in was a lifesaver, but it didn't cure all the problems, unfortunately (such as defining pre-processor symbols).
 
Has anyone found a good way to publish the projects? The publish doesn't work right, because it deletes everything from the destination directory. I have some custom configuration files that can't be deleted every time. Is there an option to make it like VS 2003 where it just replaces files?

I don't understand the point of compiling the pages into separate dlls. It sounds like a great idea, but it still publishes all of them. The best solution would be something between publish and copy web site, where you can copy of the new compiled code.
 
Has anyone found a good way to publish the projects? The publish doesn't work right, because it deletes everything from the destination directory. I have some custom configuration files that can't be deleted every time.
I don't think it's possible to use the publish option to do what you want. From my research it looks as though you have to use a Web Deployment Project and from there set certain folders to be excluded.

I haven't found it particularly easy to use though and have ended actually moving the folders (that I don't want deleting) before publishing the project. It's not a very good workaround at all but it's the quickest way for me at the moment.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top