开发者

PostSharp 1.5 and .Net 4

开发者 https://www.devze.com 2023-01-11 01:28 出处:网络
Postsharp is great, but only the 1.5 version is still opensource.Does it work with .net 4.0?If not, are there any other good AOP weavers out there?开发者_StackOverflow社区I\'m not interested in the pr

Postsharp is great, but only the 1.5 version is still opensource. Does it work with .net 4.0? If not, are there any other good AOP weavers out there? 开发者_StackOverflow社区I'm not interested in the proxy type.


PostSharp 1.5 will not run on .NET 4.0. There's a discussion of alternatives on http://www.sharpcrafters.com/postsharp/alternatives.


To answer my own question:

PostSharp 1.5 does appear to work with .net 4.0. I have a [Cache] Attribute working just fine in a .net 4.0 Class Library. Now, maybe some parts of it don't work, but i haven't hit those. Gael can you enlighten me here?

That said, the community edition of the latest PostSharp seems like the way to go. Thank you Gael for providing a commercially usable lite version of this great product.


I'm not sure I agree with the other answers... We're using PostSharp on some ASP.NET 4 projects at work with no problems!

I don't remember us having to do anything tricky to get this to work, so if you're getting errors, post them here, and maybe we can help.


Running PostSharpo 1.5 from VS2010 is not supported but I've managed to make it work but it took some tinkering. In the .csproj file add the following line:

<PropertyGroup>
    <PostSharpUseCommandLine>True</PostSharpUseCommandLine>
</PropertyGroup>

This would make PostSharp run until you can upgrade to a newer and better version.

0

精彩评论

暂无评论...
验证码 换一张
取 消