Why Web Deployment Project deploys *.csproj files?

Discussion in 'ASP .Net' started by Max2006, Oct 1, 2007.

  1. Max2006

    Max2006 Guest

    Hi,



    When I use Web Deployment Project to create a deployment image of my web
    site, It includes un-necessaty files such as *.csproj files.



    Can I disable the deployment of *.csproj files?



    Thank you,

    Max
    Max2006, Oct 1, 2007
    #1
    1. Advertising

  2. "Max2006" <> wrote in message
    news:...

    > When I use Web Deployment Project to create a deployment image of my web
    > site, It includes un-necessaty files such as *.csproj files.
    >
    > Can I disable the deployment of *.csproj files?



    1) Right-click on the WDP project in your solution and select "Open Project
    File"

    2) Scroll right down to the remmed out section at the bottom

    3) Un rem the <Target Name="AfterBuild" section

    4) Amend it so that it looks as follows:

    <Target Name="AfterBuild" Condition="'$(Configuration)|$(Platform)' ==
    'Release|AnyCPU'">
    <Delete Files="$(OutputPath)\MyProject.csproj" />
    <Delete Files="$(OutputPath)\MyProject.csproj.user" />
    </Target>

    Obviously, change MyProject.csproj to the actual name of your project... :)


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net
    Mark Rae [MVP], Oct 1, 2007
    #2
    1. Advertising

  3. Max2006

    Max2006 Guest

    Thank you Mark for help.

    Is there any reason that WDP actually deploys *.csproj files?

    Regards,
    Max


    "Mark Rae [MVP]" <> wrote in message
    news:%...
    > "Max2006" <> wrote in message
    > news:...
    >
    >> When I use Web Deployment Project to create a deployment image of my web
    >> site, It includes un-necessaty files such as *.csproj files.
    >>
    >> Can I disable the deployment of *.csproj files?

    >
    >
    > 1) Right-click on the WDP project in your solution and select "Open
    > Project File"
    >
    > 2) Scroll right down to the remmed out section at the bottom
    >
    > 3) Un rem the <Target Name="AfterBuild" section
    >
    > 4) Amend it so that it looks as follows:
    >
    > <Target Name="AfterBuild" Condition="'$(Configuration)|$(Platform)' ==
    > 'Release|AnyCPU'">
    > <Delete Files="$(OutputPath)\MyProject.csproj" />
    > <Delete Files="$(OutputPath)\MyProject.csproj.user" />
    > </Target>
    >
    > Obviously, change MyProject.csproj to the actual name of your project...
    > :)
    >
    >
    > --
    > Mark Rae
    > ASP.NET MVP
    > http://www.markrae.net
    Max2006, Oct 1, 2007
    #3
  4. "Max2006" <> wrote in message
    news:...

    > Is there any reason that WDP actually deploys *.csproj files?


    Don't know...

    WDP is a superb tool, but it's only about half-finished, IMO...

    E.g. if you exclude a file from the project, it still deploys it...

    If you exclude a code file from the project, the WDP no longer compiles...

    Etc...


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net
    Mark Rae [MVP], Oct 1, 2007
    #4
  5. Thanks for Mark's nice tips.

    Hi Max,

    I think the reason "web deployment project include the csproj" files is it
    is originally designed to target the ASP.NET 2.0 "web site" project model
    which is project less(doesn't have project files). And the "Web application
    Project" is started abit later after the "Web Deployment project", and
    surely the WDP may have some drawbacks when dealing with "Web application
    project"

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead

    This posting is provided "AS IS" with no warranties, and confers no rights.
    --------------------
    >From: "Mark Rae [MVP]" <>
    >In-Reply-To: <>
    >Subject: Re: Why Web Deployment Project deploys *.csproj files?
    >Date: Mon, 1 Oct 2007 18:07:59 +0100


    >
    >"Max2006" <> wrote in message
    >news:...
    >
    >> Is there any reason that WDP actually deploys *.csproj files?

    >
    >Don't know...
    >
    >WDP is a superb tool, but it's only about half-finished, IMO...
    >
    >E.g. if you exclude a file from the project, it still deploys it...
    >
    >If you exclude a code file from the project, the WDP no longer compiles...
    >
    >Etc...
    >
    >
    >--
    >Mark Rae
    >ASP.NET MVP
    >http://www.markrae.net
    >
    >
    Steven Cheng[MSFT], Oct 2, 2007
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt
    Replies:
    2
    Views:
    788
    Craig Deelsnyder
    Aug 16, 2004
  2. Terry Reedy

    SF deploys SA, lauds P & BC

    Terry Reedy, Aug 31, 2003, in forum: Python
    Replies:
    3
    Views:
    283
    mackstann
    Aug 31, 2003
  3. Mr. SweatyFinger
    Replies:
    2
    Views:
    1,661
    Smokey Grindel
    Dec 2, 2006
  4. Replies:
    5
    Views:
    1,191
  5. Joel

    Accessing .csproj file for web project

    Joel, Apr 5, 2005, in forum: ASP .Net Security
    Replies:
    3
    Views:
    240
    Joe Kaplan \(MVP - ADSI\)
    Apr 6, 2005
Loading...

Share This Page