Skip to content
This repository was archived by the owner on Aug 30, 2023. It is now read-only.

Commit acb587d

Browse files
committed
Add the net40 flag to SharpRaven.Nancy.UnitTests and check for it in the LogModule
1 parent 138c4e3 commit acb587d

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/tests/SharpRaven.Nancy.UnitTests/LogModule.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ public LogModule(IRavenClient ravenClient)
5252
response.EnsureSuccessStatusCode();
5353

5454
var result = await response.Content.ReadAsStringAsync();
55+
#if (!net40)
5556
var messageId = await ravenClient.CaptureMessageAsync("Hello world!!!");
57+
#else
58+
var messageId = ravenClient.CaptureMessage("Hello world!!!");
59+
#endif
5660

5761
return View["log.html", new { MessageId = messageId }];
5862
};

src/tests/SharpRaven.Nancy.UnitTests/SharpRaven.Nancy.UnitTests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</PropertyGroup>
1818
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release 4.0|AnyCPU'">
1919
<OutputPath>bin\Release\net40\</OutputPath>
20-
<DefineConstants>TRACE</DefineConstants>
20+
<DefineConstants>TRACE;net40</DefineConstants>
2121
<Optimize>true</Optimize>
2222
<DebugType>pdbonly</DebugType>
2323
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -38,7 +38,7 @@
3838
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug 4.0|AnyCPU'">
3939
<DebugSymbols>true</DebugSymbols>
4040
<OutputPath>bin\Debug\net40\</OutputPath>
41-
<DefineConstants>DEBUG;TRACE</DefineConstants>
41+
<DefineConstants>TRACE;DEBUG;net40</DefineConstants>
4242
<DebugType>full</DebugType>
4343
<PlatformTarget>AnyCPU</PlatformTarget>
4444
<ErrorReport>prompt</ErrorReport>

0 commit comments

Comments
 (0)