MsBuild Task and Scope

I have one build project with a target build

<Target Name="Build">
    <Message Text="Version : $(FullVersionNr)"  />
    <MSBuild Projects="@(WebProj)"  Properties="WebProjectOutputDir=$(SitePublishPath);OutDir=$(SitePublishPath1);Configuration=$(Configuration)" />      
<Message Text="Version  : $(FullVersionNr)"  /> 

and during build I set $ (FullVersionNr) to the exact build number, and that’s not the end of nr at the end

I even declared support for $ (FullVersionNr) in another file

<Import Project="Common.proj"/>

and he does not go out.

This is only one message from the parent to the child project, and I want it to be bi-directional

+3
source share
1 answer

This MSDN article should give you some ideas on how to achieve this: MSBuild Properties . More specifically, this blog post should answer your questions about the scope: Scales of properties and element in the MSBuild script . Be sure to read the summary at the end.

, , , $(FullVersionNr) (.. , , - ).

, MSDN, .

+1

All Articles