locked
Vs.net 2008 - web setup project - PDF files not getting included... RRS feed

  • Question

  • User556810487 posted

    Hi,

     I created a web setup (not web deployment) project in VS.net 2008; I noticed that PDF files in a folder is not getting added part of the websetup output. In the same folder, I have images, text files, they are all included.

    Does any one know, how to include PDF Files and other files, part of the websetup project?

    Regards,

    Sreedhar

    Tuesday, August 26, 2008 5:00 PM

Answers

  • User372121194 posted

    Hi,

    What type of your ASP.NET project is? I guess it is ASP.NET web application. If so, the pdf file is not copy to output directory by default, because it is not treated as "Content" of Build Action.

    To work around this issue, we can set this file's Build Action to "Content" by right clicking this file in Solution Explorer -> selecting properties -> changing Build Action to "Content".

     

    I look forward to hearing from you.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, August 29, 2008 3:02 AM
  • User372121194 posted

    Hi,

    Thanks for your response.

    If these pdf files are in one folder, we can try to use MSBuild to copy this folder to OutPut directory in Web Deployment project.

    To do so, we need to enter Web Deployment project file by right clicking Web Deployment project in Solution Window and selecting "Open Project File", and then write following command below "Import" section:

      <Target Name="AfterBuild">
        <Copy DestinationFolder="YourDestinationfolder" SourceFiles="YourSourcefile"></Copy>
      </Target>

    We also can modify your web application's project file to set pdf files to "Content" by

     <ItemGroup>
        <Content Include="YourFolder\Reference1.pdf"/>
         <Content Include="YourFolder\Reference2.pdf"/>
     ......
      </ItemGroup>

     

    Thanks.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, August 31, 2008 10:16 PM
  • User372121194 posted

    Hi,

    We can use "<Copy DestinationFolder="$(OutputPath)\Guides\" SourceFiles="$(SourceWebPhysicalPath)\Guides\*.pdf"></Copy>".

     

    Thanks.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 2, 2008 10:09 PM

All replies

  • User372121194 posted

    Hi,

    What type of your ASP.NET project is? I guess it is ASP.NET web application. If so, the pdf file is not copy to output directory by default, because it is not treated as "Content" of Build Action.

    To work around this issue, we can set this file's Build Action to "Content" by right clicking this file in Solution Explorer -> selecting properties -> changing Build Action to "Content".

     

    I look forward to hearing from you.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, August 29, 2008 3:02 AM
  • User556810487 posted

    Thank you. Even though it is painful for me to setup for all PDFs (Around 80), atleast it is one time.

    Is there a way we can setup globally the same?

    Regards,

    Sreedhar Vankayala

    Friday, August 29, 2008 5:27 PM
  • User372121194 posted

    Hi,

    Thanks for your response.

    If these pdf files are in one folder, we can try to use MSBuild to copy this folder to OutPut directory in Web Deployment project.

    To do so, we need to enter Web Deployment project file by right clicking Web Deployment project in Solution Window and selecting "Open Project File", and then write following command below "Import" section:

      <Target Name="AfterBuild">
        <Copy DestinationFolder="YourDestinationfolder" SourceFiles="YourSourcefile"></Copy>
      </Target>

    We also can modify your web application's project file to set pdf files to "Content" by

     <ItemGroup>
        <Content Include="YourFolder\Reference1.pdf"/>
         <Content Include="YourFolder\Reference2.pdf"/>
     ......
      </ItemGroup>

     

    Thanks.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, August 31, 2008 10:16 PM
  • User556810487 posted

    Thanks for the reply. I am using websetup project not web deployment.

    I did it as second option by modifying the project file. (The first option can be done using the same project file, I believe in web project file).

    For the first option, is the following syntax correct?

      <Target Name="AfterBuild">
        <Copy DestinationFolder="Gudies" SourceFiles="*Guides\*.pdf"></Copy>
      </Target>

     Thanks

     

    Tuesday, September 2, 2008 3:25 PM
  • User372121194 posted

    Hi,

    We can use "<Copy DestinationFolder="$(OutputPath)\Guides\" SourceFiles="$(SourceWebPhysicalPath)\Guides\*.pdf"></Copy>".

     

    Thanks.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 2, 2008 10:09 PM
  • User-1746296830 posted

    Hi Thomas,

    I have a web application in VS studio 2008 and now I have added web deployment project in the web application. In the property pages of web deployment project, I choose the option "Create a separate assembly to each page". But I am not getting assembly for each individual pages when I publish the web application project.

     Please suggest how can I create assembly for each pages.

    Thursday, March 26, 2009 2:18 AM
  • User457574343 posted

    I was wondering if there is another global solution to handle this. I discover that my pdf files are not being deployed when I Publish my web application.

    Many thanks. 

    Wednesday, October 14, 2009 1:44 AM
  • User556810487 posted

    I used the above suggestion ...  "<Copy DestinationFolder="$(OutputPath)\Guides\" SourceFiles="$(SourceWebPhysicalPath)\Guides\*.pdf"></Copy>".


    First to avoid more work, see whether it is a setup type of project ... then it should be easy ...


    Hope this helps ...

    Monday, October 19, 2009 1:50 PM