'property'에 해당되는 글 1건

  1. 2013.08.21 [빌드] How to define Global Properties
posted by 네코냥이 2013. 8. 21. 11:25


MSBuild_ how to create a global property_ - Stack Overflow.pdf



<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 

  <PropertyGroup> 

    <AppServer>\\sayedApp</AppServer> 

    <WebServer>\\sayedWeb</WebServer> 

  </PropertyGroup> 

</Project>


As previously stated, the PropertyGroup element, inside the Project element, will contain 

all of our properties. The name of a property is the XML tag name of the element, and the 

value of the property is the value inside the element. In this example, we have declared 

two   properties, AppServer and WebServer, with the values \\sayedApp and \\sayedWeb, 

  respectively. You can create as many PropertyGroup elements under the Project tag as you 

want. The previous fragment could have been defined like this:


<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 

  <PropertyGroup> 

    <AppServer>\\sayedApp</AppServer> 

  </PropertyGroup> 

  <PropertyGroup> 

    <WebServer>\\sayedWeb</WebServer> 

  </PropertyGroup> 

</Project>


The MSBuild engine will process all elements sequentially within each PropertyGroup in the 

same manner. If you take a look at a project created by Visual Studio, you’ll notice that many 

properties are declared. These properties have values that will be used throughout the build 

process for that project. Here is a region from a sample project that I created:


<Project DefaultTargets="Build"  

    xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 

  <PropertyGroup> 

    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 

    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 

    <ProductVersion>8.0.50727</ProductVersion> 

    <SchemaVersion>2.0</SchemaVersion> 

    <ProjectGuid>{A71540FD-9949-4AC4-9927-A66B84F97769}</ProjectGuid> 

    <OutputType>WinExe</OutputType> 

    <AppDesignerFolder>Properties</AppDesignerFolder> 

    <RootNamespace>WindowsApplication1</RootNamespace> 

    <AssemblyName>WindowsApplication1</AssemblyName> 

  </PropertyGroup>