Skip to content

Commit a9d74a7

Browse files
Merge pull request #202 from rabbitmq/dotnetcore
dotnet core support
2 parents e7a3bdd + 0f23e06 commit a9d74a7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+25631
-776
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ TestResult.xml
1818
.paket/paket.exe
1919
/NuGet
2020
rabbit-mock.snk
21+
.vscode/
22+
2123
test.sh
2224
*.VisualState.xml
2325
test-output.log

BUILD_DOTNET_CORE.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
To build the dotnet core components you need the `dotnet` command line utility installed.
2+
It can be obtained for your chosen platform [here](https://www.microsoft.com/net/core#macosx).
3+
4+
Run `./build.sh` (linux/osx) or `build.bat` (windows) to trigger code generation and complete a dotnet core build.
5+
6+
To run the tests simply run `run-tests.sh` (linux/osx) or `run-tests.bat` (windows). This will run the entire test suite. There is currently no way to only run a subset of tests.
7+
8+
If you get a warning saying `rabbitmqctl` cannot be found please set the `RABBITMQ_RABBITMQCLT_PATH` environment variable to point to where `rabbitmqctl` can be located.

appveyor.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "3.6.3.{build}"
1+
version: "4.0.0.{build}"
22

33
platform: Any CPU
44
configuration: Release
@@ -13,6 +13,7 @@ environment:
1313
init:
1414
- echo %APPVEYOR_BUILD_VERSION%
1515
- choco install -y rabbitmq
16+
- choco install -y dotnetcore-sdk -pre
1617

1718
install:
1819
- IF DEFINED SNKSECRET (nuget install secure-file -ExcludeVersion)
@@ -30,20 +31,30 @@ install:
3031
3132
before_build:
3233

33-
build_script: fake.bat AppVeyor
34+
build_script:
35+
- ps: .\fake.bat GenerateApi
36+
- ps: dotnet restore "projects\client\RabbitMQ.Client"
37+
- ps: dotnet build "projects\client\RabbitMQ.Client"
38+
- ps: dotnet pack "projects\client\RabbitMQ.Client" -c Release --version-suffix=build-$env:APPVEYOR_BUILD_NUMBER
3439

3540
test: off
3641

3742
after_build:
38-
- ps: |
39-
$semver = ${env:APPVEYOR_BUILD_VERSION} -ireplace '(\d+.\d+.\d+).(\d+)', "`$1-ci`$2-${env:APPVEYOR_REPO_BRANCH}"
40-
$semver = $semver.Substring(0, [System.Math]::Min(20, $semver.Length))
41-
nuget pack RabbitMQ.Client.nuspec -version $semver -symbols
42-
nuget pack RabbitMQ.ServiceModel.nuspec -version $semver -symbols
4343

4444
artifacts:
4545
- path: '*.nupkg'
46+
- path: 'projects\client\RabbitMQ.Client\bin\Release\*.nupkg'
4647
- path: '*.log'
4748
name: Logs
4849

4950
deploy: off
51+
52+
nuget:
53+
account_feed: true
54+
project_feed: true
55+
disable_publish_on_pr: true
56+
57+
branches:
58+
only:
59+
- master
60+
- stable

build.bat

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
@ECHO OFF
22
.paket\paket.bootstrapper.exe
33
.paket\paket.exe restore
4-
packages\FAKE\tools\FAKE.exe build.fsx
4+
packages\FAKE\tools\FAKE.exe build.fsx GenerateApi
5+
6+
dotnet restore .\projects\client\RabbitMQ.Client
7+
dotnet build .\projects\client\RabbitMQ.Client

build.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@ set -e
44

55
mono .paket/paket.bootstrapper.exe
66
mono .paket/paket.exe restore
7-
mono ./packages/FAKE/tools/FAKE.exe build.fsx
7+
mono ./packages/FAKE/tools/FAKE.exe build.fsx GenerateApi
8+
9+
dotnet restore ./projects/client/RabbitMQ.Client
10+
dotnet build ./projects/client/RabbitMQ.Client
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using System;
2+
3+
namespace ConsoleApplication
4+
{
5+
public class Program
6+
{
7+
public static void Main(string[] args)
8+
{
9+
Console.WriteLine("Hello World!");
10+
}
11+
}
12+
}

projects/client/RabbitMQ.Client/RabbitMQ.Client.csproj renamed to projects/client/RabbitMQ.Client/RabbitMQ.Client.csproj_old

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@
182182
<Compile Include="src\client\impl\StreamProperties.cs" />
183183
<Compile Include="src\client\impl\SyntaxError.cs" />
184184
<Compile Include="src\client\impl\TcpClientAdapter.cs" />
185-
<Compile Include="src\client\impl\TunneledTcpClient.cs" />
186185
<Compile Include="src\client\impl\UnexpectedFrameException.cs" />
187186
<Compile Include="src\client\impl\UnknownClassOrMethodException.cs" />
188187
<Compile Include="src\client\impl\WireFormatting.cs" />
@@ -207,4 +206,4 @@
207206
<Target Name="BeforeBuild" DependsOnTargets="" />
208207
<!-- Custom BeforeClean -->
209208
<Target Name="BeforeClean" DependsOnTargets="" />
210-
</Project>
209+
</Project>
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"version": "4.0.0-*",
3+
"buildOptions": {
4+
"emitEntryPoint": false,
5+
"compile": {
6+
"exclude": [
7+
"build",
8+
"src/util/XmlUtil.cs"
9+
],
10+
"include": [
11+
"../../../gensrc/RabbitMQ.Client/autogenerated-api-0-9-1.cs"
12+
]
13+
}
14+
},
15+
"dependencies": {
16+
},
17+
"frameworks": {
18+
"net45": {},
19+
/*
20+
".NETPortable,Version=v4.0,Profile=Profile32":{
21+
"buildOptions": {
22+
"define": [ "PORTABLE32", "NETFX_CORE" ] },
23+
"frameworkAssemblies":{
24+
"mscorlib":"",
25+
"System":"",
26+
"System.Core":"",
27+
"System.Net":"",
28+
"System.Net.Sockets":"",
29+
"System.Threading":""
30+
}
31+
},
32+
*/
33+
//"netcore45": {},
34+
"netstandard1.5": {
35+
"buildOptions": {
36+
"define": [ "CORECLR" ]
37+
},
38+
"imports": ["dnxcore50", "portable-net45+win81"],
39+
"dependencies": {
40+
"NETStandard.Library": "1.5.0-rc2-24027",
41+
"System.Net.Security": "4.0.0-rc2-24027",
42+
"System.Net.NameResolution": "4.0.0-rc2-24027",
43+
"System.Threading.Thread": "4.0.0-rc2-24027"
44+
/*
45+
"System.Runtime": "4.1.0-rc2-24027",
46+
"System.Runtime.Serialization.Primitives": "4.1.1-rc2-24027",
47+
"System.ComponentModel.EventBasedAsync": "4.0.11-rc2-24027",
48+
"System.Xml.ReaderWriter": "4.0.11-rc2-24027",
49+
"System.Xml.XDocument": "4.0.11-rc2-24027",
50+
"System.Xml.XmlDocument": "4.0.1-rc2-24027",
51+
"System.Xml.XmlSerializer": "4.0.11-rc2-24027",
52+
"System.Net.Sockets": "4.1.0-rc2-24027",
53+
"System.Threading": "4.0.11-rc2-24027",
54+
"System.Threading.Tasks": "4.0.11-rc2-24027"
55+
*/
56+
}
57+
}
58+
}
59+
}

0 commit comments

Comments
 (0)