473,503 Members | 1,818 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why Web Deployment Project deploys *.csproj files?



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


Oct 1 '07 #1
4 4165
"Max2006" <al*******@newsgroup.nospamwrote in message
news:Oj**************@TK2MSFTNGP06.phx.gbl...
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

Oct 1 '07 #2
Thank you Mark for help.

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

Regards,
Max
"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
"Max2006" <al*******@newsgroup.nospamwrote in message
news:Oj**************@TK2MSFTNGP06.phx.gbl...
>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

Oct 1 '07 #3
"Max2006" <al*******@newsgroup.nospamwrote in message
news:ez**************@TK2MSFTNGP03.phx.gbl...
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

Oct 1 '07 #4
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]" <ma**@markNOSPAMrae.net>
In-Reply-To: <ez**************@TK2MSFTNGP03.phx.gbl>
Subject: Re: Why Web Deployment Project deploys *.csproj files?
Date: Mon, 1 Oct 2007 18:07:59 +0100
>
"Max2006" <al*******@newsgroup.nospamwrote in message
news:ez**************@TK2MSFTNGP03.phx.gbl...
>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

Oct 2 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
2363
by: SpookyET | last post by:
/FooProject /bin (release) /doc /src (only *.cs) /temp (obj files) /test (debug) /build /Visual Studio 2003 /Visual Studio 2005
3
2237
by: alan_coffman2004 | last post by:
Opening an ASP.NET VS2002 project in VS2003, am getting this error: "Unable to open Web project 'MyProject'. The file path 'c:\inetpub\wwwroot\MyProject' does not correspond to the URL...
0
1307
by: dhnriverside | last post by:
Hi peeps I'm trying to access my project/solution files from Visual C#. The solution has been moved from my development server to the client's server, and I'm taking my machine in with me to the...
4
2881
by: Brad | last post by:
I'm not one to rant or flame....so please excuse me while I do so for this once. I've now spent a bit of time working with VS2005 beta 2 to see how it functions for web development, especially how...
0
1031
by: Brad Wood | last post by:
I've reinstalled my operating system and now want to reopen a web service project. Here is the URLPath in my project's .webinfo file: "http://localhost/DriverService/DriverWebService.csproj" ...
1
2026
by: mndang | last post by:
Hi All, This may have been posted before and such, but I tried a few solutions on the web but to no avail. Problem: I have a web projects (not Web Application Project) with many project...
2
2153
by: John Dalberg | last post by:
I have a few user controls in ascx files. I copied these files to the deployment server. However the server gives error message that the code behind (cs) are missing. I thought all cs files are...
0
1272
by: ping235 | last post by:
Recently, i am busying myself on a project that support both the Full ..NET Framework 2.0 and .NET Compact Framework 2.0, with the same set of c# code, but have different project properties and...
0
1078
by: Andy B | last post by:
I am using web deployment projects combined with web application projects in Visual Studio 2005. I have some projects in the solution called Main and InHim. I noticed some wierd compiled output in...
0
7086
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7280
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7330
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6991
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
4672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3167
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1512
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.