Skip to content

Commit a9b17b6

Browse files
committed
Add .NET Core support for ServiceStack.ProtoBuf
1 parent bbd27b5 commit a9b17b6

File tree

7 files changed

+108
-0
lines changed

7 files changed

+108
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0"?>
2+
<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
3+
<metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
4+
<id>ServiceStack.ProtoBuf.Core</id>
5+
<title>ServiceStack.ProtoBuf.Core</title>
6+
<version>1.0.0</version>
7+
<authors>Service Stack</authors>
8+
<owners>Service Stack</owners>
9+
<summary>ProtoBuf Format Serializer ContentType ServiceClients for ServiceStack</summary>
10+
<description>
11+
Add the ProtoBuf binary format and endpoint to a ServiceStack web service host.
12+
</description>
13+
<projectUrl>https://github.com/ServiceStack/ServiceStack</projectUrl>
14+
<licenseUrl>https://servicestack.net/terms</licenseUrl>
15+
<iconUrl>https://servicestack.net/img/logo-32.png</iconUrl>
16+
<tags>ProtoBuf Fast Binary Serializer Format ContentType REST Web Services ServiceStack</tags>
17+
<language>en-US</language>
18+
<copyright>Copyright 2016 Service Stack</copyright>
19+
<dependencies>
20+
<group targetFramework=".NETStandard1.6">
21+
<dependency id="NETStandard.Library" version="[1.6.0, )" />
22+
<dependency id="protobuf-net" version="[2.1.0, )" />
23+
<dependency id="ServiceStack.Text.Core" version="[1.0.0, )" />
24+
<dependency id="ServiceStack.Interfaces.Core" version="[1.0.0, )" />
25+
<dependency id="ServiceStack.Client.Core" version="[1.0.0, )" />
26+
<dependency id="ServiceStack.Common.Core" version="[1.0.0, )" />
27+
<dependency id="ServiceStack.Core" version="[1.0.0, )" />
28+
</group>
29+
</dependencies>
30+
</metadata>
31+
<files>
32+
<file src="lib\**\*.*" target="lib" />
33+
<file src="..\..\src\ServiceStack.ProtoBuf\**\*.cs" target="src" />
34+
</files>
35+
</package>

build/build-core.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ sed -i "s/\"version\": \"[^\"]\+\"/\"version\": \"${Version}\"/g" ./src/ServiceS
3434
sed -i "s/\"version\": \"[^\"]\+\"/\"version\": \"${Version}\"/g" ./src/ServiceStack.Server/project.json
3535
sed -i "s/\"version\": \"[^\"]\+\"/\"version\": \"${Version}\"/g" ./src/ServiceStack.RabbitMq/project.json
3636
sed -i "s/\"version\": \"[^\"]\+\"/\"version\": \"${Version}\"/g" ./src/ServiceStack.Api.Swagger/project.json
37+
sed -i "s/\"version\": \"[^\"]\+\"/\"version\": \"${Version}\"/g" ./src/ServiceStack.ProtoBuf/project.json
3738

3839
echo replace package
3940
find ./NuGet.Core -type f -name "*.nuspec" -exec sed -i "s/<version>[^<]\+/<version>${PackageVersion}/g" {} +
@@ -50,6 +51,7 @@ find ./NuGet.Core -type f -name "*.nuspec" -exec sed -i "s/\"ServiceStack.Redis.
5051
find ./NuGet.Core -type f -name "*.nuspec" -exec sed -i "s/\"ServiceStack.OrmLite.Core\" version=\"[^\"]\+\"/\"ServiceStack.OrmLite.Core\" version=\"\[${PackageVersion}, \)\"/g" {} +
5152
find ./NuGet.Core -type f -name "*.nuspec" -exec sed -i "s/\"ServiceStack.RabbitMq.Core\" version=\"[^\"]\+\"/\"ServiceStack.RabbitMq.Core\" version=\"\[${PackageVersion}, \)\"/g" {} +
5253
find ./NuGet.Core -type f -name "*.nuspec" -exec sed -i "s/\"ServiceStack.Api.Swagger.Core\" version=\"[^\"]\+\"/\"ServiceStack.Api.Swagger.Core\" version=\"\[${PackageVersion}, \)\"/g" {} +
54+
find ./NuGet.Core -type f -name "*.nuspec" -exec sed -i "s/\"ServiceStack.ProtoBuf.Core\" version=\"[^\"]\+\"/\"ServiceStack.ProtoBuf.Core\" version=\"\[${PackageVersion}, \)\"/g" {} +
5355

5456
#restore packages
5557
#(cd ./src && dotnet restore)

build/publish-core.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ declare -A projects=( \
1111
["ServiceStack.HttpClient.Core"]="1.1 1.6" \
1212
["ServiceStack.Common.Core"]="1.3" \
1313
["ServiceStack.Interfaces.Core"]="1.1" \
14+
["ServiceStack.ProtoBuf.Core"]="1.6" \
1415
)
1516

1617
#for each project copy files to Nuget.Core/$project/lib folder

src/ServiceStack.Core.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{FA46AB18
3232
..\NuGet.Core\ServiceStack.Interfaces.Core\ServiceStack.Interfaces.Core.nuspec = ..\NuGet.Core\ServiceStack.Interfaces.Core\ServiceStack.Interfaces.Core.nuspec
3333
..\NuGet.Core\ServiceStack.Kestrel\ServiceStack.Kestrel.nuspec = ..\NuGet.Core\ServiceStack.Kestrel\ServiceStack.Kestrel.nuspec
3434
..\NuGet.Core\ServiceStack.Mvc.Core\ServiceStack.Mvc.Core.nuspec = ..\NuGet.Core\ServiceStack.Mvc.Core\ServiceStack.Mvc.Core.nuspec
35+
..\NuGet.Core\ServiceStack.ProtoBuf.Core\ServiceStack.ProtoBuf.Core.nuspec = ..\NuGet.Core\ServiceStack.ProtoBuf.Core\ServiceStack.ProtoBuf.Core.nuspec
3536
..\NuGet.Core\ServiceStack.RabbitMq.Core\ServiceStack.RabbitMq.Core.nuspec = ..\NuGet.Core\ServiceStack.RabbitMq.Core\ServiceStack.RabbitMq.Core.nuspec
3637
..\NuGet.Core\ServiceStack.Server.Core\ServiceStack.Server.Core.nuspec = ..\NuGet.Core\ServiceStack.Server.Core\ServiceStack.Server.Core.nuspec
3738
EndProjectSection
@@ -62,6 +63,8 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ServiceStack.Mvc", "Service
6263
EndProject
6364
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ChatSelfHost", "..\tests\ChatSelfHost\ChatSelfHost.xproj", "{0848319C-7A4C-4135-B14E-8376AD7AD7CE}"
6465
EndProject
66+
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ServiceStack.ProtoBuf", "ServiceStack.ProtoBuf\ServiceStack.ProtoBuf.xproj", "{3B382DA7-442F-48E8-BD05-D438DA47FC68}"
67+
EndProject
6568
Global
6669
GlobalSection(SolutionConfigurationPlatforms) = preSolution
6770
Debug|Any CPU = Debug|Any CPU
@@ -144,6 +147,10 @@ Global
144147
{0848319C-7A4C-4135-B14E-8376AD7AD7CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
145148
{0848319C-7A4C-4135-B14E-8376AD7AD7CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
146149
{0848319C-7A4C-4135-B14E-8376AD7AD7CE}.Release|Any CPU.Build.0 = Release|Any CPU
150+
{3B382DA7-442F-48E8-BD05-D438DA47FC68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
151+
{3B382DA7-442F-48E8-BD05-D438DA47FC68}.Debug|Any CPU.Build.0 = Debug|Any CPU
152+
{3B382DA7-442F-48E8-BD05-D438DA47FC68}.Release|Any CPU.ActiveCfg = Release|Any CPU
153+
{3B382DA7-442F-48E8-BD05-D438DA47FC68}.Release|Any CPU.Build.0 = Release|Any CPU
147154
EndGlobalSection
148155
GlobalSection(SolutionProperties) = preSolution
149156
HideSolutionNode = FALSE
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"frameworks": {
3+
"net45": {}
4+
},
5+
"runtimes": {
6+
"win": {}
7+
}
8+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0.25420" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0.25420</VisualStudioVersion>
5+
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
6+
</PropertyGroup>
7+
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
8+
<PropertyGroup Label="Globals">
9+
<ProjectGuid>3b382da7-442f-48e8-bd05-d438da47fc68</ProjectGuid>
10+
<RootNamespace>ServiceStack.ProtoBuf</RootNamespace>
11+
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
12+
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
13+
</PropertyGroup>
14+
15+
<PropertyGroup>
16+
<SchemaVersion>2.0</SchemaVersion>
17+
</PropertyGroup>
18+
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
19+
</Project>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"configurations": {
3+
"Debug": {
4+
"buildOptions": {
5+
"define": [
6+
"DEBUG",
7+
"TRACE"
8+
]
9+
}
10+
},
11+
"Release": {
12+
"buildOptions": {
13+
"define": [
14+
"TRACE"
15+
],
16+
"optimize": true
17+
}
18+
}
19+
},
20+
"dependencies": {
21+
"NETStandard.Library": "1.6.0",
22+
"protobuf-net": "2.1.0",
23+
"ServiceStack.Text": "1.0.*",
24+
"ServiceStack.Interfaces": "1.0.*",
25+
"ServiceStack.Client": "1.0.*",
26+
"ServiceStack.Common": "1.0.*",
27+
"ServiceStack": "1.0.*"
28+
},
29+
"frameworks": {
30+
"netstandard1.6": {
31+
"dependencies": {
32+
}
33+
}
34+
},
35+
"version": "1.0.0"
36+
}

0 commit comments

Comments
 (0)