Skip to content

Commit 084d870

Browse files
authored
Merge pull request #1 from Haplois/linux-build-fix
Fixed linux build
2 parents 2f9043d + 0dba966 commit 084d870

File tree

4 files changed

+15
-14
lines changed

4 files changed

+15
-14
lines changed

scripts/build.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,14 +184,16 @@ function install_cli()
184184
return 1
185185
fi
186186
chmod u+x $install_script
187+
# Get netcoreapp1.1 shared components
188+
$install_script --runtime dotnet --version "2.1.0" --channel "release/2.1.0" --install-dir "$TP_DOTNET_DIR" --no-path --architecture x64
189+
$install_script --runtime dotnet --version "3.1.0" --channel "release/3.1.0" --install-dir "$TP_DOTNET_DIR" --no-path --architecture x64
187190

188191
log "install_cli: Get the latest dotnet cli toolset..."
189192
$install_script --install-dir "$TP_DOTNET_DIR" --no-path --channel "master" --version $DOTNET_CLI_VERSION
190193

191-
# Get netcoreapp1.1 shared components
192-
$install_script --install-dir "$TP_DOTNET_DIR" --no-path --channel "release/2.1.0" --version "2.1.0" --runtime dotnet
193-
#log "install_cli: Get shared components which is compatible with dotnet cli version $DOTNET_CLI_VERSION..."
194-
#$install_script --install-dir "$TP_DOTNET_DIR" --no-path --channel "master" --version $DOTNET_RUNTIME_VERSION --runtime dotnet
194+
195+
log " ---- dotnet x64"
196+
"$TP_DOTNET_DIR/dotnet" --info
195197
fi
196198

197199
local dotnet_path=$(_get_dotnet_path)

src/Microsoft.TestPlatform.PlatformAbstractions/Microsoft.TestPlatform.PlatformAbstractions.csproj

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
<Import Project="$(TestPlatformRoot)scripts/build/TestPlatform.Settings.targets" />
77
<PropertyGroup>
88
<AssemblyName>Microsoft.TestPlatform.PlatformAbstractions</AssemblyName>
9-
<TargetFrameworks>netcoreapp2.1;net451;uap10.0;netstandard2.0;netstandard1.0</TargetFrameworks>
9+
<TargetFrameworks>netcoreapp2.1;netstandard2.0;netstandard1.0;net451</TargetFrameworks>
10+
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">$(TargetFrameworks);uap10.0</TargetFrameworks>
1011
<TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">netstandard2.0;netstandard1.0;netcoreapp2.1</TargetFrameworks>
1112
<EnableCodeAnalysis>true</EnableCodeAnalysis>
1213
<NoWarn>NU1605</NoWarn>
@@ -21,10 +22,6 @@
2122
<TargetFrameworkIdentifier>.NETPortable</TargetFrameworkIdentifier>
2223
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
2324
<DefineConstants>$(DefineConstants);WINDOWS_UWP</DefineConstants>
24-
25-
<!-- On non windows environment, make UAP behave like desktop .NET framework -->
26-
<TargetFrameworkIdentifier Condition="'$(OS)' != 'Windows_NT'">.NETFramework</TargetFrameworkIdentifier>
27-
<TargetFrameworkVersion Condition="'$(OS)' != 'Windows_NT'">v4.5.1</TargetFrameworkVersion>
2825
</PropertyGroup>
2926

3027
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">

src/datacollector/datacollector.csproj

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@
99
</PropertyGroup>
1010
<PropertyGroup>
1111
<AssemblyName>datacollector</AssemblyName>
12-
<TargetFrameworks>netcoreapp2.1;net472</TargetFrameworks>
12+
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
13+
<TargetFrameworks Condition=" '$(OS)' == 'WINDOWS_NT' ">$(TargetFrameworks);net472</TargetFrameworks>
14+
<TargetFrameworks Condition=" '$(OS)' != 'WINDOWS_NT' ">$(TargetFrameworks);net451</TargetFrameworks>
1315
<TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">netcoreapp2.1</TargetFrameworks>
1416
<WarningsAsErrors>true</WarningsAsErrors>
15-
<PlatformTarget Condition="'$(TargetFramework)' == 'net451'">AnyCPU</PlatformTarget>
17+
<PlatformTarget Condition="$(TargetFramework.StartsWith('net4'))">AnyCPU</PlatformTarget>
1618
<OutputType>Exe</OutputType>
1719
</PropertyGroup>
18-
<PropertyGroup Condition="'$(TargetFramework)' == 'net451'">
20+
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4'))">
1921
<RuntimeIdentifier>win7-x64</RuntimeIdentifier>
2022
</PropertyGroup>
2123
<ItemGroup>
@@ -29,7 +31,7 @@
2931
<FromP2P>true</FromP2P>
3032
</ProjectReference>
3133
</ItemGroup>
32-
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
34+
<ItemGroup Condition="$(TargetFramework.StartsWith('net4'))">
3335
<Reference Include="System" />
3436
<Reference Include="Microsoft.CSharp" />
3537
<Reference Include="System.Xml" />

test/vstest.console.UnitTests/vstest.console.UnitTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<FromP2P>true</FromP2P>
2020
</ProjectReference>
2121
</ItemGroup>
22-
<ItemGroup>
22+
<ItemGroup Condition=" '$(TargetFramework)' != 'net451' ">
2323
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
2424
</ItemGroup>
2525
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">

0 commit comments

Comments
 (0)