I added a folder to the project and then I added some PDFs. These PDFs are referenced on one of the .aspx pages with links so the user can view them. On the Package/Publish Web tab of the Project Properties page I have 'All files in this project' selected.
I publish with FTP and have 'Delete all exsisting files prior to publish' selected. I don't publish that often and I like to make sure everything is current.
The publish wizard deletes every thing, but does not recreate the 'Documents' folder and does not publish te PDF files in that folder. I must FTP in manually and publish them. Do I need to do something to inlcude that folder and those files in the project
so it will publish all files in this project?
See the ASP.NET Deployment FAQ, "Why don't all of my files in my project folder get deployed." If you selected "All files in this project," the files in the folder need to be included in
the project (right-click the files in solution explorer and select include in project).
Thank you. I will review the FAQ. However, a quick look at the Solution Explorer tells me that I don't have the option to include the files in the project. There is the option to exclude them from the project, which I think means I have already included
them.
Thank you. It seems I got 2 of the 3 properties needed to get the files to copy to the site. I needed to set the Build Action property for each file (Right-click, Properties, Build Action). There is also a Copy to Output Directory property. All of the documentation
about these properties refers to native VS file types and I can find no mention of things like PDFs, DOC files etc. I'll set them to Build Action = Content and Copy to Output Directory = Copy Always and hope for the best.
If anyone knows definitively what the settings would be that would be helpful. I don't plan to deploy this project for a while and I would rather not have to deploy multiple times today just to see what works.
If anyone knows definitively what the settings would be that would be helpful. I don't plan to deploy this project for a while and I would rather not have to deploy multiple times today just to see what works.
It would be faster to try rather than waiting for reply from forum members :)
GrexP
Member
122 Points
65 Posts
Documents Folder & Documents Don't Publish
Dec 06, 2011 09:32 PM|LINK
Asp.net application in VS2010
I added a folder to the project and then I added some PDFs. These PDFs are referenced on one of the .aspx pages with links so the user can view them. On the Package/Publish Web tab of the Project Properties page I have 'All files in this project' selected. I publish with FTP and have 'Delete all exsisting files prior to publish' selected. I don't publish that often and I like to make sure everything is current.
The publish wizard deletes every thing, but does not recreate the 'Documents' folder and does not publish te PDF files in that folder. I must FTP in manually and publish them. Do I need to do something to inlcude that folder and those files in the project so it will publish all files in this project?
Thank you,
Greg
tdykstra
Contributor
4432 Points
620 Posts
Microsoft
Moderator
Re: Documents Folder & Documents Don't Publish
Dec 07, 2011 12:09 AM|LINK
See the ASP.NET Deployment FAQ, "Why don't all of my files in my project folder get deployed." If you selected "All files in this project," the files in the folder need to be included in the project (right-click the files in solution explorer and select include in project).
GrexP
Member
122 Points
65 Posts
Re: Documents Folder & Documents Don't Publish
Dec 07, 2011 03:05 PM|LINK
Thank you. I will review the FAQ. However, a quick look at the Solution Explorer tells me that I don't have the option to include the files in the project. There is the option to exclude them from the project, which I think means I have already included them.
Greg
GrexP
Member
122 Points
65 Posts
Re: Documents Folder & Documents Don't Publish
Dec 07, 2011 03:08 PM|LINK
PS: The link to the FAQ points me back to this thread.
Greg
tdykstra
Contributor
4432 Points
620 Posts
Microsoft
Moderator
Re: Documents Folder & Documents Don't Publish
Dec 07, 2011 03:11 PM|LINK
Sorry, I've edited the link to correct it;
http://msdn.microsoft.com/en-us/library/ee942158.aspx
GrexP
Member
122 Points
65 Posts
Re: Documents Folder & Documents Don't Publish
Dec 07, 2011 03:39 PM|LINK
Thank you. It seems I got 2 of the 3 properties needed to get the files to copy to the site. I needed to set the Build Action property for each file (Right-click, Properties, Build Action). There is also a Copy to Output Directory property. All of the documentation about these properties refers to native VS file types and I can find no mention of things like PDFs, DOC files etc. I'll set them to Build Action = Content and Copy to Output Directory = Copy Always and hope for the best.
If anyone knows definitively what the settings would be that would be helpful. I don't plan to deploy this project for a while and I would rather not have to deploy multiple times today just to see what works.
Greg
kctt
Contributor
5004 Points
948 Posts
Re: Documents Folder & Documents Don't Publish
Dec 07, 2011 11:43 PM|LINK
It would be faster to try rather than waiting for reply from forum members :)