Skip to main content

Posts tagged with 'PostSharp'

I was recently updating an ASP.NET project from MVC 4 to MVC 5 and I ran into some issues while compiling. The PostSharp post-compiler was complaining that it couldn't find a 4.0.0.0 version of an assembly.

PostSharp exception

I had the correct bindingRedirects in the Web.Config. I'm not completely clear on how and why bindingRedirects work, but as I understand it, this will redirect the compiler looking for a certain version of an assembly to another version of an assembly. Something like this:

I wasn't the first to run into this issue: I came across a similar question in the PostSharp support forums. PostSharp needs to be told where to look for the bindingRedirect confirmation (since PostSharp isn't specific to the web, the configuration could conceiveably be in app.config, web.config, or some other config file). So, I merely needed to add a PostSharpHostConfigurationFile property to the csproj file, as shown in the PostSharp documentation. After that, everything worked fine.

I will be at the New York City 2013 Code Camp on Saturday, September 14th, 2013.

I'll be giving my most popular talk, "The Class That Knew Too Much: Refactoring Spaghetti Code". I'll also be hanging out with the PostSharp guys, who are sponsoring the Code Camp event.

So, if you're in New York, come and see me! The NYC code camp appears to be sold out, but there might be a waiting list?

AOP in .NET is now available on Safari Books online.

The Safari Books Online Blog was also kind enough to invite me to write a guest post about AOP, which uses PostSharp. This post is a more expanded and updated version of the article I wrote for Mashed Code Magazine some time ago.

Part 5 of the "Aspect-Oriented Programming in .NET" webinar series, hosted by PostSharp is now available on Vimeo:

Unit Testing and Thin Aspects from PostSharp on Vimeo.

That wraps it up for this webinar series. Thank you for attending, thank you for watching, and please contact me if you have any questions or comments!

Part 4 of the "Aspect-Oriented Programming in .NET" webinar series, hosted by PostSharp is now available on Vimeo:

Under the Hood of a Post-Compiler from PostSharp on Vimeo.

Part 5 has already been recorded as well. I will post it soon.

Matthew D. Groves

About the Author

Matthew D. Groves lives in Central Ohio. He works remotely, loves to code, and is a Microsoft MVP.

Latest Comments

Twitter