Upgrading from raygun4net 2.2 to 3.3 causes problem with builds on our build server
Danny Simmons
Posted on
Sep 02 2014
Today I ran into an unexpected issue when trying to upgrade the raygun4net nuget package used in my application from version 2.2 to the most recent version (3.3).
At first everything seemed to go smoothly. The build succeeded on my machine, and I proceeded to checkin, only to discover that our CI build failed.
After a LOT of digging I was finally able to track the problem down to the fact that recently a reference was added from raygun4net to system.web.http.dll (part of Web API) but since I don't actually use Web API in my application, I don't have it installed in my project. Further, we have fxcop turned on for our builds but apparently there is a specific error which shows up just as a message in the output when built under visual studio but is actually treated as an error that fails the build when it is run under msbuild by our CI system (visual studio online). That message says that there is an indirectly referenced DLL which is not strictly needed for code analysis but without which code analysis may not be complete. By turning on verbose logging from fxcop I was able to finally get a message indicating that system.web.http.dll is the culprit.
It appears that fxcop has the limitation that if you have warnings as errors turned on, this situation will fail the build, and there is apparently NO WAY TO IGNORE the issue other than turn off warnings as errors (something we don't want to do) or reference the DLL in question (which means bringing all of Web API into our project even though we don't use it--to the tune of 5 new nuget packages -- also something we don't want to do).
Now I get that this isn't strictly an issue with raygun4net (fxcop / msbuild should have a way to ignore this issue), but I thought I'd bring it to your attention. If you can come up with some workaround (maybe a variant of the raygun4net nuget package which doesn't reference system.web.http.dll that can be used if you don't need web api support), that would be wonderful.
I get that I could pull the sources for raygun4net and make my own variation of the DLL, but I'd a lot rather work with your official supported package if possible.
In the meantime I'll probably either not upgrade my nuget package at all or maybe upgrade it to verison 3.1 (since that was the version right before web api support was added).
Thanks, Danny
John-Daniel Trask
Raygun
Posted on
Sep 02 2014
Thanks for the detailed feedback Danny!
We'll have a look at how we could improve this - we want you using the official package too. I'll get one of our team to post an update once we have a plan to solve this.
Appreciate the in depth analysis you did in identifying the issue too Danny.
John-Daniel Trask
Co-founder & CEO
Mindscape Limited
Jason Fauchelle
Raygun
Posted on
Oct 28 2014
Hi Danny,
Thanks again for your feedback. We've recently released version 4 of Raygun4Net which resolves this dependency issue by moving the MVC and WebApi (System.Web.Http) support into separate NuGet packages. This means that you can now continue using the latest version of the standard Mindscape.Raygun4Net NuGet package. (Rather than changing the source code, or using an old version). This is available right now.
Please let me know if you have further questions about this.
-Jason Fauchelle
Danny Simmons
Posted on
Oct 29 2014
Excellent!
I just upgraded to the latest Raygun4Net package and removed my hack-workarounds for the fxcop issues. Everything worked great on the first try.
Thanks for your help, Danny