Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit a3c345f

Browse files
committed
Fix build on Linux
.NET Core does not support building for `net45` target on non-Windows platforms. See dotnet/sdk#335 To workaround this need to set up environment variable `FrameworkPathOverride` with path to `/usr/lib/mono/4.5/` Senod issue that portable profile was looked on wrong path so just disable it on Linux/Mac builds.
1 parent 800e349 commit a3c345f

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.vscode/tasks.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,15 @@
55
"command": "dotnet",
66
"isShellCommand": true,
77
"args": [],
8+
"options": {
9+
"env": {
10+
"FrameworkPathOverride": "/usr/lib/mono/4.5/"
11+
}
12+
},
813
"tasks": [
914
{
1015
"taskName": "build",
11-
"args": [ "tests/ServiceStack.Text.Tests" ],
16+
"args": [ "src/ServiceStack.Text.sln", "-v", "m" ],
1217
"isBuildCommand": true,
1318
"showOutput": "silent",
1419
"problemMatcher": "$msCompile"

src/ServiceStack.Text/ServiceStack.Text.csproj

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net45;netstandard1.1;netstandard1.3;portable45-net45+win8</TargetFrameworks>
4+
<TargetFrameworks>net45;netstandard1.1;netstandard1.3</TargetFrameworks>
5+
</PropertyGroup>
6+
7+
<PropertyGroup Condition=" '$(OS)' != 'Unix' ">
8+
<TargetFrameworks>$(TargetFrameworks);portable45-net45+win8</TargetFrameworks>
9+
</PropertyGroup>
10+
11+
<PropertyGroup>
512
<!--<TargetFrameworks>net45;netstandard1.1;netstandard1.3;portable45-net45+win8;sl5</TargetFrameworks>-->
613
<AssemblyName>ServiceStack.Text</AssemblyName>
714
<PackageId>ServiceStack.Text</PackageId>

0 commit comments

Comments
 (0)