473,382 Members | 1,375 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

VS 2005 "Web Deployment Projects" wdproj lacks macros?

I'm trying to create the equivalent of a post build event for a
website. I have the "Web Deployment Projects" add-in installed and am
attempting to follow the instructions in the "Using Web Deployment
Projects with Visual Studio 2005" document. In the "Customizing Web
Deployment Projects" section, it gives an example of an "AfterBuild"
target where a directory is created using the $(TargetDir) macro. When
I attempt to use $(TargetDir), it doesn't seem to exist. The only
macros I can find that work within the .wdproj file are solution level
(SolutionPath, SolutionDir, etc). What I really need are TargetDir,
ProjectDir, and ConfigurationName (to determine if we're compiling in
Debug or Release mode).

I have attempted using several of the macros available in standard
project post build events like this:

<Target Name="AfterBuild">
<Message Importance="high" Text="SolutionDir: $(SolutionDir)" />
<Message Importance="high" Text="ProjectDir: $(ProjectDir)" />
<Message Importance="high" Text="TargetDir: $(TargetDir)" />
<Message Importance="high" Text="OutDir: $(OutDir)" />
<Message Importance="high" Text="ConfigurationName:
$(ConfigurationName)" />
</Target>

The only one of these that works is $(SolutionDir). Does anybody know
why these aren't available in my .wdproj file and how I can get this
information? Most important is the Configuration being compiled.

Thanks,
Dan

Nov 20 '05 #1
6 2441
Hi, DBxGlock.

I'm not sure if many people here are using the tool yet.

Scott Guthrie asked that, if you run into problems with the tool,
you should post your questions to :

http://forums.asp.net/138/ShowForum.aspx

He also said the Dev Team who created the tool would answer questions there.


Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
ASPNETFAQ.COM : http://www.aspnetfaq.com/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"DBxGlock" <db******@yahoo.com> wrote in message
news:11*********************@g43g2000cwa.googlegro ups.com...
I'm trying to create the equivalent of a post build event for a
website. I have the "Web Deployment Projects" add-in installed and am
attempting to follow the instructions in the "Using Web Deployment
Projects with Visual Studio 2005" document. In the "Customizing Web
Deployment Projects" section, it gives an example of an "AfterBuild"
target where a directory is created using the $(TargetDir) macro. When
I attempt to use $(TargetDir), it doesn't seem to exist. The only
macros I can find that work within the .wdproj file are solution level
(SolutionPath, SolutionDir, etc). What I really need are TargetDir,
ProjectDir, and ConfigurationName (to determine if we're compiling in
Debug or Release mode).

I have attempted using several of the macros available in standard
project post build events like this:

<Target Name="AfterBuild">
<Message Importance="high" Text="SolutionDir: $(SolutionDir)" />
<Message Importance="high" Text="ProjectDir: $(ProjectDir)" />
<Message Importance="high" Text="TargetDir: $(TargetDir)" />
<Message Importance="high" Text="OutDir: $(OutDir)" />
<Message Importance="high" Text="ConfigurationName:
$(ConfigurationName)" />
</Target>

The only one of these that works is $(SolutionDir). Does anybody know
why these aren't available in my .wdproj file and how I can get this
information? Most important is the Configuration being compiled.

Thanks,
Dan

Nov 20 '05 #2
On 17 Nov 2005 05:46:19 -0800, "DBxGlock" <db******@yahoo.com> wrote:

The only one of these that works is $(SolutionDir). Does anybody know
why these aren't available in my .wdproj file and how I can get this
information? Most important is the Configuration being compiled.


The configuration is selected in the <PropertyGroup> sections in your
WDP file. Try the following:

<Target Name="AfterBuild">
<Message Importance="high" Text="SolutionDir: $(SolutionDir)" />
<Message Importance="high" Text="OutputPath: $(OutputPath)" />
<Message Importance="high" Text="Configuration: $(Configuration)" />
</Target>

The common macros that are now working for you are defined in
Microsoft.common.targets, which the WDP doesn't include.

--
Scott
http://www.OdeToCode.com/blogs/scott/

Nov 20 '05 #3
Scott,

Thank you! That is exactly what I needed. Those macros work great.
Is there a list of the macros available in WDP?

Thanks,
Dan

Nov 20 '05 #4
On 17 Nov 2005 09:02:39 -0800, "DBxGlock" <db******@yahoo.com> wrote:
Scott,

Thank you! That is exactly what I needed. Those macros work great.
Is there a list of the macros available in WDP?


I was trying to figure out all the properties just yesterday (the
MSBuild term is a "property"). I haven't found a way to dump all the
available properties as yet. Some of the properties come from the
..wdproj file, some come from the included targets file. I get the
feeling MSBuild also picks up some from the .sln file, too, but I have
not been able to verify it :/

--
Scott
http://www.OdeToCode.com/blogs/scott/
Nov 20 '05 #5
Scott,

I just noticed a few hours ago that it picks up some of those
"properties" from the wdproj file. That was the final piece of the
puzzle because allows me to now copy only the files I want to deploy to
the website to a separate folder.

We have a single website running in IIS and each page has its own
solution (and in VS 2003 its own project). This means that there is a
1-to-1 correlation between aspx and dll files. This made it very hard
to convert to VS 2005. After a lot of prayer and your help, I was able
to put the following 2 lines in the "AfterBuild" target in the wdproj
file:

<Target Name="AfterBuild">
<Copy
SourceFiles="$(MSBuildProjectDirectory)\$(OutputPa th)$(SingleAssemblyName).aspx"
DestinationFolder="$(SolutionDir)ForDistribution\W ebsite\$(OutputPath)"
/>
<Copy
SourceFiles="$(MSBuildProjectDirectory)\$(OutputPa th)bin\$(SingleAssemblyName).dll"
DestinationFolder="$(SolutionDir)ForDistribution\W ebsite\$(OutputPath)bin"
/>
</Target>

Now when a developer edits the webpage, the App_Web<mangled>.dll and
App_Code.dll files are compiled into a single dll named the same as the
aspx file (assembly name per WDP). Just those 2 files now are copied
to a special directory under the solution so they know exactly what
needs to be deployed (and so they don't accidentally grab a a similarly
named dll instead of the one they mean to deploy).

Dan

Nov 20 '05 #6
On 17 Nov 2005 13:05:54 -0800, "DBxGlock" <db******@yahoo.com> wrote:
After a lot of prayer and your help, I was able
to put the following 2 lines in the "AfterBuild" target in the wdproj
file:


Very cool.

P.S. I did find a way to dump all the properties. Run MSBuild from the
command line against the project and specify /v:diag - this sets the
verbosity level to "diagnostic".

--
Scott
http://www.OdeToCode.com/blogs/scott/
Nov 20 '05 #7

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

Similar topics

7
by: Brad | last post by:
When debugging my current web project, in VS2003, I found I had lost the ability to drill down on watch objects in the Watch Window; I could only view the single value specific watch objects. ...
5
by: Kamil Tezduyar | last post by:
I want to create a team to develop a web portal framework. The main purpose of this framework is reusing this in many projects. The major idea in my mind it, building it as much as flexible. We...
1
by: Eric | last post by:
I created a simple web site in VS 2005 and then copied it underneath the IIS tree and created a virtual directory for it. When I try to access the default.aspx page I get the below error text: ...
1
by: James | last post by:
I was told they are included in VB2005 Professional Ed. and not in free Express Ed. I wondered if Standard Ed. has it. Is anyone here using Standard Ed.? Based on Microsoft's Product Feature...
2
by: MarkusJNZ | last post by:
Hi, we have an existing solution which contains a bunch of C# projects and one weployment project. Initially I did not have the web deployment project installed on my computer so I downloaded...
1
by: craigkenisston | last post by:
I can't believe what is happening on my computer right now. I have a web project, file-system based on something like c:\Projects\ProjectX\www\. I had to make some changes and testing in a...
5
by: =?Utf-8?B?UmljaA==?= | last post by:
Greetings, I have been using the Click Once deployment feature of VS2005 - very nice. I had IE6 at the time when I started using Click Once Deployment, and everything worked fine. But then my...
2
by: =?Utf-8?B?UmF5IE1pdGNoZWxs?= | last post by:
Hi, In VS2003 I am able to clear the recent projects and recent files lists by editing the registry (although it seems that there should be a better way). However, when I look in the registry...
2
by: GB | last post by:
I the Start page of the VS 2005 IDE, I would like to be able to delete obsolete entries in "Recents projects" list, but I dont find any way todo it. Any suggestion?
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.