<Project Sdk="Microsoft.Build.Traversal">
<PropertyGroup>
- <TraversalGlobalProperties>BuildTargetFramework=$([MSBuild]::ValueOrDefault('$(BuildTargetFramework)', '$(NetCoreAppCurrent)'))</TraversalGlobalProperties>
+ <TraversalGlobalProperties Condition="'$(BuildAllConfigurations)' != 'true'">BuildTargetFramework=$([MSBuild]::ValueOrDefault('$(BuildTargetFramework)', '$(NetCoreAppCurrent)'))</TraversalGlobalProperties>
</PropertyGroup>
<!--
<AdditionalBuildTargetFrameworks Condition="'$(BuildTargetFramework)' == 'net48'">net45;net451;net452;net46;net461;net462;net47;net471;net472</AdditionalBuildTargetFrameworks>
<AdditionalBuildTargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true' and '$(BuildAllProjects)' == 'true'">$(AdditionalBuildTargetFrameworks);netstandard2.0</AdditionalBuildTargetFrameworks>
<BuildSettings>$(BuildTargetFramework)-$(TargetOS)-$(Configuration)-$(TargetArchitecture)</BuildSettings>
+ <BuildSettings Condition="'$(BuildTargetFramework)' == ''">$(NetCoreAppCurrent)-$(TargetOS)-$(Configuration)-$(TargetArchitecture)</BuildSettings>
</PropertyGroup>
<!-- Define test projects and companions -->
<!-- Hardcode version paths in a global location. -->
<NativeVersionFile Condition="'$(TargetOS)' == 'Windows_NT'">$(ArtifactsObjDir)_version.h</NativeVersionFile>
<NativeVersionFile Condition="'$(TargetOS)' != 'Windows_NT'">$(ArtifactsObjDir)_version.c</NativeVersionFile>
- <_BuildNativeArgs>$(TargetArchitecture) $(Configuration) outconfig $(BuildTargetFramework)-$(TargetOS)-$(Configuration)-$(TargetArchitecture) -os $(TargetOS)</_BuildNativeArgs>
+ <TargetFramework>$(BuildTargetFramework)</TargetFramework>
+ <TargetFramework Condition="'$(TargetFramework)' == ''">$(NetCoreAppCurrent)</TargetFramework>
+ <_BuildNativeArgs>$(TargetArchitecture) $(Configuration) outconfig $(TargetFramework)-$(TargetOS)-$(Configuration)-$(TargetArchitecture) -os $(TargetOS)</_BuildNativeArgs>
</PropertyGroup>
<ItemGroup>
<Target Name="BuildNativeWindows"
BeforeTargets="Build"
Condition="'$(TargetOS)' == 'Windows_NT' and
- '$(BuildTargetFramework)' == '$(NetCoreAppCurrent)'">
+ '$(TargetFramework)' == '$(NetCoreAppCurrent)'">
<!-- Run script that invokes Cmake to create VS files, and then calls msbuild to compile them -->
<Message Text=""$(MSBuildThisFileDirectory)build-native.cmd" $(_BuildNativeArgs)" Importance="High"/>
<Exec Command=""$(MSBuildThisFileDirectory)build-native.cmd" $(_BuildNativeArgs)" />