Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   2010 WebDeployment after build don't execute (http://www.velocityreviews.com/forums/t726571-2010-webdeployment-after-build-dont-execute.html)

Chuck 06-25-2010 09:48 PM

2010 WebDeployment after build don't execute
 
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 ==========

Zhi-Qiang Ni[MSFT] 06-29-2010 06:39 AM

RE: 2010 WebDeployment after build don't execute
 
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
==================================================


Chuck 06-29-2010 10:15 PM

RE: 2010 WebDeployment after build don't execute
 

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.


Chuck 06-29-2010 10:19 PM

RE: 2010 WebDeployment after build don't execute
 
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\Mi crosoft\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\Mi crosoft\MSBuild\ToolsVersions\2.0@MSBuildToolsPath )aspnet_regiis.exe
-pef connectionStrings $(OutputPath) -prov HrCustomProvider" />
</Target>


Steven Cheng 07-12-2010 09:02 AM

RE: 2010 WebDeployment after build don't execute
 
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=?= <nospam34@nospam.nospam>
>References: <7B1D38BB-3798-4C29-9ADE-2E01FAEBFFBA@microsoft.com>

<xSg9bX1FLHA.2364@TK2MSFTNGHUB02.phx.gbl>
>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\M icrosoft\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\M icrosoft\MSBuild\ToolsVers

ions\2.0@MSBuildToolsPath)aspnet_regiis.exe
>-pef connectionStrings $(OutputPath) -prov HrCustomProvider" />
> </Target>
>
>




All times are GMT. The time now is 08:29 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.