PC Review


Reply
Thread Tools Rate Thread

2010 WebDeployment after build don't execute

 
 
Chuck
Guest
Posts: n/a
 
      25th Jun 2010
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 ==========
 
Reply With Quote
 
 
 
 
Zhi-Qiang Ni[MSFT]
Guest
Posts: n/a
 
      29th Jun 2010
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/subs...#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/subs.../aa948874.aspx
==================================================

 
Reply With Quote
 
Chuck
Guest
Posts: n/a
 
      29th Jun 2010

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.

 
Reply With Quote
 
Chuck
Guest
Posts: n/a
 
      29th Jun 2010
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>

 
Reply With Quote
 
Steven Cheng
Guest
Posts: n/a
 
      12th Jul 2010
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=?= <(E-Mail Removed)>
>References: <7B1D38BB-3798-4C29-9ADE-(E-Mail Removed)>

<(E-Mail Removed)>
>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
>-pef connectionStrings $(OutputPath) -prov HrCustomProvider" />
> </Target>
>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
WebDeployment Project Build Configuration Chuck Microsoft ASP .NET 2 30th Jun 2010 06:30 PM
Build and execute dynamic instructions Smitty Microsoft Excel Misc 3 25th Nov 2008 04:43 PM
Build and Execute Multiple Update Queries =?Utf-8?B?d2FkZXYx?= Microsoft Access VBA Modules 1 30th Sep 2004 08:32 PM
Make code not execute for a Debug build Tom Microsoft VB .NET 7 15th Jul 2004 06:37 PM
how can I execute a batch file during build time ? carrot Microsoft C# .NET 4 10th Feb 2004 03:39 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:54 PM.