Skip to content

Commit 9839432

Browse files
committed
Add net451 back and use msbuild directly
1 parent 7746a74 commit 9839432

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

build.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@ECHO OFF
22
dotnet restore
33
dotnet run -p .\projects\client\Apigen --apiName:AMQP_0_9_1 .\docs\specs\amqp0-9-1.stripped.xml .\gensrc\autogenerated-api-0-9-1.cs
4-
dotnet build .\projects\client\RabbitMQ.Client
4+
msbuild.\projects\client\RabbitMQ.Client
55
dotnet build .\projects\client\Unit

build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ SCRIPT_DIR=$(cd $(dirname "$SCRIPT") && pwd)
77

88
dotnet restore ./RabbitMQDotNetClient.sln
99
dotnet run -p $SCRIPT_DIR/projects/client/Apigen/Apigen.csproj --apiName:AMQP_0_9_1 $SCRIPT_DIR/docs/specs/amqp0-9-1.stripped.xml $SCRIPT_DIR/gensrc/autogenerated-api-0-9-1.cs
10-
dotnet build $SCRIPT_DIR/projects/client/RabbitMQ.Client/RabbitMQ.Client.csproj
10+
# we have to use msbuild or else multi-targeting doesn't work
11+
msbuild $SCRIPT_DIR/projects/client/RabbitMQ.Client/RabbitMQ.Client.csproj
1112
dotnet build $SCRIPT_DIR/projects/client/Unit/Unit.csproj

projects/client/RabbitMQ.Client/RabbitMQ.Client.csproj

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<Description>The RabbitMQ .NET client is the official client library for C# (and, implicitly, other .NET languages)</Description>
55
<VersionPrefix>5.3.2</VersionPrefix>
6-
<TargetFrameworks>netstandard1.5</TargetFrameworks>
6+
<TargetFrameworks>net451;netstandard1.5</TargetFrameworks>
77
<NoWarn>$(NoWarn);CS1591</NoWarn>
88
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
99
<GenerateDocumentationFile>true</GenerateDocumentationFile>
@@ -28,6 +28,12 @@
2828
<Compile Include="..\..\..\gensrc\autogenerated-api-0-9-1.cs" Exclude="build\**\*;bin\**;obj\**;**\*.xproj;packages\**" />
2929
</ItemGroup>
3030

31+
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
32+
<PackageReference Include="Microsoft.Diagnostics.Tracing.EventSource.Redist" Version="1.1.*" />
33+
<Reference Include="System" />
34+
<Reference Include="Microsoft.CSharp" />
35+
</ItemGroup>
36+
3137
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.5' ">
3238
<DefineConstants>$(DefineConstants);CORECLR</DefineConstants>
3339
</PropertyGroup>

0 commit comments

Comments
 (0)