Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Commit

Permalink
Merge pull request #12 from sirkirby/develop
Browse files Browse the repository at this point in the history
Adding support for .NET 4.5 and .NET 4.0
  • Loading branch information
sirkirby committed Oct 1, 2015
2 parents b8c2866 + 84569a0 commit c240bb1
Show file tree
Hide file tree
Showing 14 changed files with 311 additions and 37 deletions.
21 changes: 15 additions & 6 deletions Gruntfile.js
Expand Up @@ -5,19 +5,27 @@ module.exports = function(grunt) {
pkg: grunt.file.readJSON('package.json'),
clean: ["dist"],
nugetpack: {
dist: {
src: 'src/**/*.csproj',
debug: {
src: 'src/Raygun.Diagnostics/*.csproj',
dest: 'dist/',
options: {
properties: "Configuration=Debug;",
verbose: true
}
},
release: {
src: 'src/Raygun.Diagnostics/*.csproj',
dest: 'dist/',
options: {
properties: "Configuration=Release"
properties: "Configuration=Release;"
}
}
},
nugetpush: {
dist: {
src: 'dist/*.nupkg'
}
}
}
});

grunt.loadNpmTasks('grunt-contrib-clean');
Expand All @@ -26,7 +34,8 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-nuget');

// Default task(s).
grunt.registerTask('default', ['clean', 'nugetpack']);
grunt.registerTask('default', ['clean', 'nugetpack:debug']);
grunt.registerTask('release', ['clean', 'nugetpack:release']);
// Build and publish to nuget task
grunt.registerTask('publish', ['clean', 'nugetpack', 'nugetpush']);
};
};
27 changes: 14 additions & 13 deletions README.md
@@ -1,18 +1,20 @@
# Raygun.Diagnostics #

Enables rich Raygun messaging with your existing System.Diagnostics debug and trace code.
Enables rich Raygun messaging with your existing System.Diagnostics debug and trace code.

[![Join the chat at https://gitter.im/sirkirby/raygun.diagnostics](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/sirkirby/raygun.diagnostics?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Join the chat at https://gitter.im/sirkirby/raygun.diagnostics](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/sirkirby/raygun.diagnostics?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

## master ##
[![Build Status](https://travis-ci.org/sirkirby/raygun.diagnostics.svg?branch=master)](https://travis-ci.org/sirkirby/raygun.diagnostics)
[![Build status](https://ci.appveyor.com/api/projects/status/7bk54tsjxp2cakr5/branch/master?svg=true)](https://ci.appveyor.com/project/Authenticom/raygun-diagnostics/branch/master)

## develop ##
[![Build Status](https://travis-ci.org/sirkirby/raygun.diagnostics.svg?branch=develop)](https://travis-ci.org/sirkirby/raygun.diagnostics)
[![Build status](https://ci.appveyor.com/api/projects/status/7bk54tsjxp2cakr5/branch/master?svg=true)](https://ci.appveyor.com/project/Authenticom/raygun-diagnostics/branch/develop)

## Supported Platforms

* .NET 4.5+ (Desktop / Server)
* .NET 3.5
* .NET 4.0
* .NET 4.6

## Nuget ##

Expand Down Expand Up @@ -53,10 +55,10 @@ Settings.ApiKey = "myAppKey"
try {}
catch (Exception e)
{
// any arg of type IList<string> will be treated as tags and any type of IDictionary will be treated as custom data
// any arg of type IList<string> will be treated as tags and any type of IDictionary will be treated as custom data
// any arg of type Exception will be wrapped in the primary raygun exception object
var customData = new Dictionary<string, object> {{"myType", someParameter}};
var tags = new List<string> { "tag1", "tag1" };
var tags = new List<string> { "tag1", "tag1" };
Trace.TraceError("Something bad happened", e, tags, customData);
// or inline with arg just added to a default Dictionary<object, object> object
Trace.TraceError("something bad happened", e, new List<string> {"tag1"}, someParameter, someObject);
Expand All @@ -72,7 +74,7 @@ public void MyMethod()
catch(Exception e)
{
// the tags defined in the attribute will be automatically applied via reflection
Trace.TraceError("something bad happened", e, someParameter, someObject);
Trace.TraceError("something bad happened", e, someParameter, someObject);
}
}
```
Expand Down Expand Up @@ -103,24 +105,23 @@ Raygun.Diagnostics.Settings.MessageTraceLevel = MessageTraceLevel.Warning;

// in app example configuration
Raygun.Diagnostics.Settings.Client.AddWrapperExceptions(new List<Type> { typeof(MyCustomWrapperException) }.ToArray());
#if DEBUG
Raygun.Diagnostics.Settings.Debug = true;
#if DEBUG
Raygun.Diagnostics.Settings.Debug = true;
#endif

// add default tags to every message generated by app domain
Raygun.Diagnostics.Settings.DefaultTags.AddRange(new[] {"debug", "someDynamicString"});
```

## Build ##
Using msbuild (v4+) against [Raygun.Diagnostics.csproj](src/Raygun.Diagnostics/Raygun.Diagnostics.csproj).
Using msbuild (v14+) against [Raygun.Diagnostics.csproj](src/Raygun.Diagnostics/Raygun.Diagnostics.csproj).


## Requirements ##
- Visual Studio 2013+
- .NET FX 4.5+
- .NET FX 3.5+

## Copyright & License ##

Copyright 2015 Chris Kirby
[MIT License](LICENSE.txt)

37 changes: 37 additions & 0 deletions src/Raygun.Diagnostics.net35/Properties/AssemblyInfo.cs
@@ -0,0 +1,37 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Raygun.Diagnostics")]
[assembly: AssemblyDescription("Raygun System.Diagnostics tracing library for .NET")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Chris Kirby")]
[assembly: AssemblyProduct("Raygun.Diagnostics")]
[assembly: AssemblyCopyright("Copyright © Chris Kirby 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("45abc870-0eeb-472d-b9b9-7491f3f0c0a3")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.7.5")]
[assembly: AssemblyFileVersion("0.7.5")]
[assembly: AssemblyInformationalVersion("0.7.5")]
76 changes: 76 additions & 0 deletions src/Raygun.Diagnostics.net35/Raygun.Diagnostics.net35.csproj
@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{45ABC870-0EEB-472D-B9B9-7491F3F0C0A3}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Raygun.Diagnostics</RootNamespace>
<AssemblyName>Raygun.Diagnostics</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;NET35</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;NET35</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Mindscape.Raygun4Net, Version=5.1.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Mindscape.Raygun4Net.5.1.1\lib\net35\Mindscape.Raygun4Net.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\Raygun.Diagnostics\Helpers\ValidationExtensions.cs">
<Link>Helpers\ValidationExtensions.cs</Link>
</Compile>
<Compile Include="..\Raygun.Diagnostics\Models\MessageContext.cs">
<Link>Models\MessageContext.cs</Link>
</Compile>
<Compile Include="..\Raygun.Diagnostics\Models\MessageTraceLevel.cs">
<Link>Models\MessageTraceLevel.cs</Link>
</Compile>
<Compile Include="..\Raygun.Diagnostics\RaygunDiagnosticsAttribute.cs">
<Link>RaygunDiagnosticsAttribute.cs</Link>
</Compile>
<Compile Include="..\Raygun.Diagnostics\RaygunTraceListener.cs">
<Link>RaygunTraceListener.cs</Link>
</Compile>
<Compile Include="..\Raygun.Diagnostics\Settings.cs">
<Link>Settings.cs</Link>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
4 changes: 4 additions & 0 deletions src/Raygun.Diagnostics.net35/packages.config
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Mindscape.Raygun4Net" version="5.1.1" targetFramework="net35" />
</packages>
37 changes: 37 additions & 0 deletions src/Raygun.Diagnostics.net40/Properties/AssemblyInfo.cs
@@ -0,0 +1,37 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Raygun.Diagnostics")]
[assembly: AssemblyDescription("Raygun System.Diagnostics tracing library for .NET")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Chris Kirby")]
[assembly: AssemblyProduct("Raygun.Diagnostics")]
[assembly: AssemblyCopyright("Copyright © Chris Kirby 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("ec52e080-41d3-4b42-a924-7578115f78b4")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.7.5")]
[assembly: AssemblyFileVersion("0.7.5")]
[assembly: AssemblyInformationalVersion("0.7.5")]
82 changes: 82 additions & 0 deletions src/Raygun.Diagnostics.net40/Raygun.Diagnostics.net40.csproj
@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{EC52E080-41D3-4B42-A924-7578115F78B4}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Raygun.Diagnostics</RootNamespace>
<AssemblyName>Raygun.Diagnostics</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;NET40</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;NET40</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Mindscape.Raygun4Net, Version=5.1.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Mindscape.Raygun4Net.5.1.1\lib\net40\Mindscape.Raygun4Net.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Mindscape.Raygun4Net4, Version=5.1.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Mindscape.Raygun4Net.5.1.1\lib\net40\Mindscape.Raygun4Net4.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\Raygun.Diagnostics\Helpers\ValidationExtensions.cs">
<Link>Helpers\ValidationExtensions.cs</Link>
</Compile>
<Compile Include="..\Raygun.Diagnostics\Models\MessageContext.cs">
<Link>Models\MessageContext.cs</Link>
</Compile>
<Compile Include="..\Raygun.Diagnostics\Models\MessageTraceLevel.cs">
<Link>Models\MessageTraceLevel.cs</Link>
</Compile>
<Compile Include="..\Raygun.Diagnostics\RaygunDiagnosticsAttribute.cs">
<Link>RaygunDiagnosticsAttribute.cs</Link>
</Compile>
<Compile Include="..\Raygun.Diagnostics\RaygunTraceListener.cs">
<Link>RaygunTraceListener.cs</Link>
</Compile>
<Compile Include="..\Raygun.Diagnostics\Settings.cs">
<Link>Settings.cs</Link>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
4 changes: 4 additions & 0 deletions src/Raygun.Diagnostics.net40/packages.config
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Mindscape.Raygun4Net" version="5.1.1" targetFramework="net4" />
</packages>

0 comments on commit c240bb1

Please sign in to comment.