2010 WebDeployment after build don't execute

C

Chuck

I converted a solution from 08 to 10.

All my after build tasks don't run. This is the first one.
<Target Name="AfterBuild">
<RemoveDir Directories="$(OutputPath)/ConfigFiles" />
</Target>

I don't get errors or anything

This is what the Output screen shows:
Running aspnet_merge.exe.
aspnet_merge : warning 1013: Cannot find any assemblies that can be merged
in the application bin folder.
Successfully merged 'obj\Test\TempBuildDir'.
Updating web.config: RootPath = \\hrIntTest\E$\Inetpub\wwwroot\VTC\,
ValidateSections = True, UseExternalConfigSource = False
Update of web.config Succeeded.
========== Build: 2 succeeded or up-to-date, 0 failed, 1 skipped ==========
 
Z

Zhi-Qiang Ni[MSFT]

Hi Chuck,

After some effort on your issue, we do not find anything cause it.

What we did:

1. Use VS 2008 SP1 create a C# web application

2. Add follow lines in project file:

<target Name="AfterBuild">

<MakeDir Directories="$(OutputPath)/ConfigFiles" />

</target>

3. Save the project file.

4. open the project by VS2010 RTM

5. Convert into .Net Framework 4.0(optional)

6. build the project.

7. there is a \bin\ConfigFiles

--
Sincerely,
Zhi-Qiang Ni
Microsoft Online Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

MSDN Managed Newsgroup support offering is for non-urgent issues where an
initial response from the community or a Microsoft Support Engineer within
2 business day is acceptable. Please note that each follow up response may
take approximately 2 business days as the support professional working with
you may need further investigation to reach the most efficient resolution.
The offering is not appropriate for situations that require urgent,
real-time or phone-based interactions. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
 
C

Chuck

Looks like I had two AfterBuild tasks defined in xml.
One of the conditions had been removed.
I guess if you have two only the last one runs.
I moved the actual work from both into one and then it ran.
 
C

Chuck

Little more investigating. If I try to limit the Exec task to only test
build conditions. Nothing works.

this works
<Target Name="AfterBuild" >
<RemoveDir Directories="$(OutputPath)/ConfigFiles" />
<Exec WorkingDirectory="$(OutputPath)"
Command="$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\2.0@MSBuildToolsPath)aspnet_regiis.exe
-pef connectionStrings $(OutputPath) -prov HrCustomProvider" />

</Target>



This does not


<Target Name="AfterBuild" >
<RemoveDir Directories="$(OutputPath)/ConfigFiles" />
</Target>


<Target Name="AfterBuild" Condition="'$(Configuration)|$(Platform)' ==
'Test|AnyCPU'">
<Exec WorkingDirectory="$(OutputPath)"
Command="$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\2.0@MSBuildToolsPath)aspnet_regiis.exe
-pef connectionStrings $(OutputPath) -prov HrCustomProvider" />
</Target>
 
S

Steven Cheng

Hi Chuck,

So the build event still only run one of the <target Name="AfterBuild" >
but ignore the others? What if you only put a single <target > which set
the Condition to "Test" build(and put all the commands in that <target>)?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


--------------------
From: =?Utf-8?B?Q2h1Y2s=?= <[email protected]>
References: <[email protected]>
Subject: RE: 2010 WebDeployment after build don't execute
Date: Tue, 29 Jun 2010 15:19:34 -0700
Little more investigating. If I try to limit the Exec task to only test
build conditions. Nothing works.

this works
<Target Name="AfterBuild" >
<RemoveDir Directories="$(OutputPath)/ConfigFiles" />
<Exec WorkingDirectory="$(OutputPath)"
Command="$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVers
ions\2.0@MSBuildToolsPath)aspnet_regiis.exe
-pef connectionStrings $(OutputPath) -prov HrCustomProvider" />

</Target>



This does not


<Target Name="AfterBuild" >
<RemoveDir Directories="$(OutputPath)/ConfigFiles" />
</Target>


<Target Name="AfterBuild" Condition="'$(Configuration)|$(Platform)' ==
'Test|AnyCPU'">
<Exec WorkingDirectory="$(OutputPath)"
Command="$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVers
ions\2.0@MSBuildToolsPath)aspnet_regiis.exe
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,702
Latest member
LukasConde

Latest Threads

Top