diff options
author | Eric Mellino <erme@microsoft.com> | 2017-01-05 01:20:01 +0300 |
---|---|---|
committer | Eric Mellino <erme@microsoft.com> | 2017-01-05 03:56:57 +0300 |
commit | e51adfb7cf480ccbe29ea599b53e32285cc89827 (patch) | |
tree | 62ae493187bc6b0d8b6a564af519caf97ae85222 /dir.props | |
parent | e19ef70718a971664aa1c0d2894af1d63b8055bc (diff) |
Introduce a 'RunningOnUnix' property and use it in targets.
Diffstat (limited to 'dir.props')
-rw-r--r-- | dir.props | 31 |
1 files changed, 11 insertions, 20 deletions
@@ -9,27 +9,13 @@ <MinorVersion>6</MinorVersion> </PropertyGroup> - <PropertyGroup> - <OsEnvironment Condition="'$(OsEnvironment)'=='' AND '$(OS)'=='Unix' AND Exists('/Applications')">OSX</OsEnvironment> - <OsEnvironment Condition="'$(OsEnvironment)'=='' AND '$(OS)'=='Unix'">Linux</OsEnvironment> - <OsEnvironment Condition="'$(OsEnvironment)'==''">$(OS)</OsEnvironment> - </PropertyGroup> - <Import Condition="Exists('$(MSBuildProjectDirectory)/Configurations.props')" Project="$(MSBuildProjectDirectory)/Configurations.props" /> - <PropertyGroup> - <InputOSGroup Condition="'$(InputOSGroup)'==''">$(OSEnvironment)</InputOSGroup> - </PropertyGroup> - <!-- Informs build tools to apply .NET Framework metadata if not a test project --> <PropertyGroup> <IsDotNetFrameworkProductAssembly>true</IsDotNetFrameworkProductAssembly> </PropertyGroup> - <PropertyGroup> - <BuildToolsTargets45 Condition="'$(OsEnvironment)'=='Windows_NT'">true</BuildToolsTargets45> - </PropertyGroup> - <!-- Common repo directories --> <PropertyGroup> <ProjectDir>$(MSBuildThisFileDirectory)</ProjectDir> @@ -68,6 +54,11 @@ <!-- Import Build tools common props file where repo-independent properties are found --> <Import Project="$(ToolsDir)Build.Common.props" Condition="Exists('$(ToolsDir)Build.Common.props')" /> + <PropertyGroup> + <InputOSGroup Condition="'$(InputOSGroup)'==''">$(OSEnvironment)</InputOSGroup> + <BuildToolsTargets45 Condition="'$(OsEnvironment)'=='Windows_NT'">true</BuildToolsTargets45> + </PropertyGroup> + <Import Project="$(MSBuildThisFileDirectory)targetingpacks.props" /> <!-- Enable the analyzers for this repo --> @@ -122,10 +113,10 @@ <PropertyGroup> <DnxPackageDir Condition="'$(DnxPackageDir)'==''">$(PackagesDir)/$(DnxPackageName)/</DnxPackageDir> - <DnuToolPath Condition="'$(DnuToolPath)'=='' and '$(OS)'!='Unix'">$(DnxPackageDir)/bin/dnu.cmd</DnuToolPath> - <DnuToolPath Condition="'$(DnuToolPath)'=='' and '$(OS)'=='Unix'">$(DnxPackageDir)/bin/dnu</DnuToolPath> - <DotnetToolCommand Condition="'$(DotnetToolCommand)' == '' and '$(OS)'!='Unix'">$(DotnetCliPath)dotnet.exe</DotnetToolCommand> - <DotnetToolCommand Condition="'$(DotnetToolCommand)' == '' and '$(OS)'=='Unix'">$(DotnetCliPath)dotnet</DotnetToolCommand> + <DnuToolPath Condition="'$(DnuToolPath)'=='' and '$(RunningOnUnix)'!='true'">$(DnxPackageDir)/bin/dnu.cmd</DnuToolPath> + <DnuToolPath Condition="'$(DnuToolPath)'=='' and '$(RunningOnUnix)'=='true'">$(DnxPackageDir)/bin/dnu</DnuToolPath> + <DotnetToolCommand Condition="'$(DotnetToolCommand)' == '' and '$(RunningOnUnix)'!='true'">$(DotnetCliPath)dotnet.exe</DotnetToolCommand> + <DotnetToolCommand Condition="'$(DotnetToolCommand)' == '' and '$(RunningOnUnix)'=='true'">$(DotnetCliPath)dotnet</DotnetToolCommand> <DnuToolPath>$(DotnetToolCommand)</DnuToolPath> <DnuRestoreSource>@(DnuSourceList -> '--source %(Identity)', ' ')</DnuRestoreSource> @@ -266,6 +257,6 @@ </PropertyGroup> <!-- Use Roslyn Compilers to build --> - <Import Project="$(RoslynPropsFile)" Condition="'$(OS)'!='Unix' and Exists('$(RoslynPropsFile)') and '$(UseRoslynCompilers)'!='false'" /> - <Import Project="$(RoslynPropsFile)" Condition="'$(OS)'=='Unix' and Exists('$(RoslynPropsFile)')" /> + <Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'!='true' and Exists('$(RoslynPropsFile)') and '$(UseRoslynCompilers)'!='false'" /> + <Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'=='true' and Exists('$(RoslynPropsFile)')" /> </Project> |