How to avoid WDP copy all to Source Directory (also SVN!!)

Last post 11-10-2009 11:45 AM by orixdev. 9 replies.

Sort Posts:

  • How to avoid WDP copy all to Source Directory (also SVN!!)

    03-25-2009, 11:40 AM
    • Member
      point Member
    • theDog
    • Member since 12-13-2008, 4:11 PM
    • Posts 7

     Hi!

    i see that Build WDP is very slow because it copies the entire source folder to a folder called "Source" at the same level of "Release"  folder.

    i would like to avoid that it copies

    1) All SVN folders and files

    2) some unuseful folders as css and images.

     

    the tag known Excludefrombuild don't resolve the problem!

     

    Any ideas or solutions?

     

    thanks!

    Filed under: , ,
  • Re: How to avoid WDP copy all to Source Directory (also SVN!!)

    03-30-2009, 3:33 AM

    Hi,

    Web Deployment Project only copies the Output to destination you specified.

    What type of your ASP.NET project is? I guess it is ASP.NET web application.

    You can try to set this file's Copy to Output Directory to "Do not copy" by right clicking this file in Solution Explorer -> selecting properties -> changing Copy to Output Directory to "Do not copy".

     

    I look forward to receiving your test results.

     

    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: How to avoid WDP copy all to Source Directory (also SVN!!)

    03-30-2009, 1:01 PM
    • Member
      point Member
    • theDog
    • Member since 12-13-2008, 4:11 PM
    • Posts 7

     Hi! thank you for the help!

     

    the project type is ASP.NET Web Site .

    when i right-click on the folders containing css (but also on any kind of file/folder) i cant see any "Properties" menù item and any "Output directory" option in the properties panel.

    for each file, in the properties pane, i can see only

    "File Name" and "Full Path"  properties.

     

    byes!

  • Re: How to avoid WDP copy all to Source Directory (also SVN!!)

    03-30-2009, 10:34 PM

    Hi,

    Thanks for your response.

    Please follow this article: http://stuffigoogled.com/2008/06/11/exclude-folders-from-an-aspnet-web-deployment-project/ to exclude files.

    If this doesn't help you, please post the Web Deployment project file here.

     

    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: How to avoid WDP copy all to Source Directory (also SVN!!)

    03-31-2009, 5:12 AM
    • Member
      point Member
    • theDog
    • Member since 12-13-2008, 4:11 PM
    • Posts 7

     ExcludeFromBuild don't resolve my problem! i already use it.

    when i build a WDP i see this operations.

    *my sources (.aspx .vb .css .jpg etc. files) are in c:\project\aspx and wdp is in c:\project\wdp

    1. WDP copies the ENTIRE content of c:\project\aspx folder in c:\project\wdp\sources
      and this take several minutes as c:\project\aspx folder have 500mb of images, css, js, SVN files and compilation-unuseful files
    2. wdp compile project (it takes about 1 minute)
    3. wdp create and fill the c:\project\wdp\release folder with compiled file (except the files exluded by ExcludeFromBuild tags)
    4. wdp execute my custom tag command (like <copy> and <delete>)  to copy my custom external file and delete .svn folders
      (this take several minutes as i have to clone about 500mb of images and css)
    i wold like to avoid WDP copy 500mb of unuseful file in the step 1.

     many thanks for interesting in my problem!

  • Re: How to avoid WDP copy all to Source Directory (also SVN!!)

    07-29-2009, 5:13 AM
    • Member
      269 point Member
    • jstranger
    • Member since 10-12-2002, 5:03 AM
    • Guildford, Surrey, UK
    • Posts 126

    I have the same issue - does no one have an answer to this?

    If I do not have any ExcludeFromBuild statements then the Source folder is not created. But I also need to exclude a very large images folder and if I do this then the Sources folder is created. It appears that ExcludeFromBuild overrides the default behaviour but I can find no switch or option to avoid the source being copied.

    Jon

  • Re: How to avoid WDP copy all to Source Directory (also SVN!!)

    10-11-2009, 4:05 AM
    • Member
      4 point Member
    • demon_tdr
    • Member since 10-11-2009, 8:03 AM
    • Posts 2

    Hi, I just found the solution here: http://www.meadow.se/wordpress/?p=137

    It worked for me!

  • Re: How to avoid WDP copy all to Source Directory (also SVN!!)

    10-12-2009, 8:49 AM
    • Member
      269 point Member
    • jstranger
    • Member since 10-12-2002, 5:03 AM
    • Guildford, Surrey, UK
    • Posts 126

    Did you really use this method to prevent VS2008 copying all of your source files to a folder called Source? Or are you just talking about excluding other files such as images? AFAIK ExcludeFromBuild does not help here. As I said earlier, if I do not have any ExcludeFromBuild statements then the Source folder is not created - but if I do (and I have to) then it is.

  • Re: How to avoid WDP copy all to Source Directory (also SVN!!)

    10-28-2009, 5:17 AM
    • Member
      4 point Member
    • demon_tdr
    • Member since 10-11-2009, 8:03 AM
    • Posts 2

    I used this method to exclude entire directories in my project. In my case (and by default), WDP was copying the all the files including .SVN files and directories to the Source folder... which are useless for production deploy.

    This the part of my .wdproj file which I added manually (the rest was auto-generated):

         ...

        <ItemGroup>
            <ExcludeFromBuild Include="$(SourceWebPhysicalPath)\**\.svn\**\*.*"/>
            <ExcludeFromBuild Include="$(SourceWebPhysicalPath)\obj\**\*.*"/>
              ...
            <ExcludeFromBuild Include="$(SourceWebPhysicalPath)\*.csproj.*"/>
        </ItemGroup>

        ...


  • Re: How to avoid WDP copy all to Source Directory (also SVN!!)

    11-10-2009, 11:45 AM
    • Member
      2 point Member
    • orixdev
    • Member since 11-10-2009, 11:40 AM
    • Posts 1

    Hey all,


    Though couldn't find a way to prevent the source folder from being created, you could still DELETE it after building your project. Voila:


    <Target Name="AfterBuild">
    <RemoveDir Directories="Source" />
    </Target>

     <Target Name="AfterBuild">

    <RemoveDir Directories="Source" />

    </Target>

Page 1 of 1 (10 items)