views:

102

answers:

3

Hi,

I've downloaded log4net, but I've realised that there are different assemblies for .NET and Mono.

Is possible to use the same assembly for .NET and Mono? I wouldn't like to have to recompile the application or change the file manually, is there a way to add one or add the two and put a condition somewhere?

Cheers.

A: 

Try using the Mono assembly with your .NET app (in Windows). If it works, you can just use the Mono version for both.

MusiGenesis
A: 

If you are looking to have your application work on both .NET and Mono, I would suggest, for something like log4net, that you ship the version of log4net you want to use with your application. Just use that one specific version, and it should be able to function fine with either runtime.

Pete
+2  A: 

Yes, it is possible, use CLI 1.0 Compatible special build. I think there is a reason behind their decision to provide different specific builds for different frameworks, however i don't know what actually differs this builds one from another.

n535
The reason is to take advantage of specific framework features, while dropping unsupported ones. For instance, the Compact Framework build ships with no attributes, as the CF does not let you scan assemblies for attributes.
Martinho Fernandes
@Martinho Fernandes. Thanks.
n535