Cant compile with Raygun4Net reference on .NET 4.0 Client profile targeted assembly

jure

Posted on
Jun 28 2013

Im trying Raygun.NET and have problem with Raygun.NET reference in my WPF desktop app project. Im using .NET Client profile target framework, i have to as my customers only have that framework installed.

The error i get is

"The currently targeted framework ".NETFramework,Version=v4.0,Profile=Client" does not include "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which the referenced assembly "Mindscape.Raygun4Net" depends on. This caused the referenced assembly to not resolve. To fix this, either (1) change the targeted framework for this project, or (2) remove the referenced assembly from the project."

is there a way to use Raygun inside "Client Profile" assemblies?

Thanks, jure


jeremy

Raygun

Posted on
Jul 02 2013

You will need to compile your own version of the provider which is targeting Client Profile to get this to work as we rely on System.Web for extracting information relating to web requests.

Ive created a branch of the provider on Github to help get this started here: https://github.com/MindscapeHQ/raygun4net/tree/net4-client-profile

If you add a CLIENT_PROFILE directive to the project and switch it to target the .NET 4 Client Profile you will get a version of the assembly which should work happily.


Jeremy


Reply