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

Last post 10-19-2009 1:50 PM by v_sreedhar@hotmail.com. 8 replies.

Sort Posts:

  • Vs.net 2008 - web setup project - PDF files not getting included...

    08-26-2008, 5:00 PM

    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

  • Re: Vs.net 2008 - web setup project - PDF files not getting included...

    08-29-2008, 3:02 AM
    Answer

    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.

    Thomas Sun
    Microsoft Online Community Support

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.
  • Re: Vs.net 2008 - web setup project - PDF files not getting included...

    08-29-2008, 5:27 PM

    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

  • Re: Vs.net 2008 - web setup project - PDF files not getting included...

    08-31-2008, 10:16 PM
    Answer

    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.

    Thomas Sun
    Microsoft Online Community Support

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.
  • Re: Vs.net 2008 - web setup project - PDF files not getting included...

    09-02-2008, 3:25 PM

    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

     

  • Re: Vs.net 2008 - web setup project - PDF files not getting included...

    09-02-2008, 10:09 PM
    Answer

    Hi,

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

     

    Thanks.

    Thomas Sun
    Microsoft Online Community Support

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.
  • Re: Vs.net 2008 - web setup project - PDF files not getting included...

    03-26-2009, 2:18 AM

    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.

  • Re: Vs.net 2008 - web setup project - PDF files not getting included...

    10-14-2009, 1:44 AM
    • Member
      36 point Member
    • Delavegaz
    • Member since 09-02-2008, 12:18 AM
    • Posts 207

    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. 

  • Re: Vs.net 2008 - web setup project - PDF files not getting included...

    10-19-2009, 1:50 PM

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

Page 1 of 1 (9 items)