Castle Core, including Castle DynamicProxy, Logging Services and DictionaryAdapter
C# Other
Clone or download

README.md

Castle Core

Castle Core provides common Castle Project abstractions including logging services. It also features Castle DynamicProxy a lightweight runtime proxy generator, and Castle DictionaryAdapter.

See the documentation.

Releases

NuGet

See the Releases.

Debugging symbols are available in symbol packages in the AppVeyor build artifacts since version 4.1.0. For example, here are the artifacts for 4.1.0.

License

Castle Core is © 2004-2018 Castle Project. It is free software, and may be redistributed under the terms of the Apache 2.0 license.

Contributing

Browse the contributing section of our Home repository to get involved.

Building

Platform Build Status
Windows Build status
Linux Build Status

.NET Framework and .NET Core

build.cmd

Mono

Castle Core works with some limitations and defects on Mono 4.0.2+, however Mono 4.6.1+ is highly recommended, Mono 4.0.0 and 4.0.1 have serious runtime bugs that cause runtime crashes. Mono 3.x releases used to work well, but are not supported. Check our issue tracker for known Mono defects.

./build.sh

Conditional Compilation Symbols

The following conditional compilation symbols (vertical) are currently defined for each of the build configurations (horizontal):

Symbol NET35 NET40 NET45 .NET Core
FEATURE_APPDOMAIN 🚫
FEATURE_ASSEMBLYBUILDER_SAVE 🚫
FEATURE_BINDINGLIST 🚫
FEATURE_DICTIONARYADAPTER_XML 🚫
FEATURE_EMIT_CUSTOMMODIFIERS 🚫
FEATURE_EVENTLOG 🚫
FEATURE_GAC 🚫
FEATURE_GET_REFERENCED_ASSEMBLIES 🚫
FEATURE_IDATAERRORINFO 🚫
FEATURE_ISUPPORTINITIALIZE 🚫
FEATURE_LEGACY_REFLECTION_API 🚫 🚫
FEATURE_LISTSORT 🚫
FEATURE_NETCORE_REFLECTION_API 🚫 🚫 🚫
FEATURE_REMOTING 🚫
FEATURE_SECURITY_PERMISSIONS 🚫
FEATURE_SERIALIZATION 🚫
FEATURE_SMTP 🚫
FEATURE_SYSTEM_CONFIGURATION 🚫
FEATURE_TARGETEXCEPTION 🚫
FEATURE_TEST_COM 🚫
FEATURE_TEST_PEVERIFY 🚫
FEATURE_TEST_SERILOGINTEGRATION 🚫 🚫
---
DOTNET35 🚫 🚫 🚫
DOTNET40 🚫 🚫
DOTNET45 🚫 🚫 🚫
  • FEATURE_APPDOMAIN - enables support for features that make use of an AppDomain in the host.
  • FEATURE_ASSEMBLYBUILDER_SAVE - enabled support for saving the dynamically generated proxy assembly.
  • FEATURE_BINDINGLIST - enables support features that make use of System.ComponentModel.BindingList.
  • FEATURE_DICTIONARYADAPTER_XML - enable DictionaryAdapter Xml features.
  • FEATURE_EMIT_CUSTOMMODIFIERS - enables emitting optional and required custom modifiers defined on parameters including return parameters. It seems like a defect in corefx not to expose these methods because they are still implemented.
  • FEATURE_EVENTLOG - provides a diagnostics logger using the Windows Event Log.
  • FEATURE_GAC - enables support for obtaining assemblies using an assembly long form name.
  • FEATURE_GET_REFERENCED_ASSEMBLIES - enables code that takes advantage of System.Reflection.Assembly.GetReferencedAssemblies().
  • FEATURE_IDATAERRORINFO - enables code that depends on System.ComponentModel.IDataErrorInfo.
  • FEATURE_ISUPPORTINITIALIZE - enables support for features that make use of System.ComponentModel.ISupportInitialize.
  • FEATURE_LEGACY_REFLECTION_API - provides a shim for .NET 3.5/4.0 that emulates the TypeInfo API available in .NET 4.5+ and .NET Core.
  • FEATURE_LISTSORT - enables support for features that make use of System.ComponentModel.ListSortDescription.
  • FEATURE_NETCORE_REFLECTION_API - provides shims to implement missing functionality in .NET Core that has no alternatives.
  • FEATURE_REMOTING - supports remoting on various types including inheriting from MarshalByRefObject.
  • FEATURE_SECURITY_PERMISSIONS - enables the use of CAS and Security[Critical|SafeCritical|Transparent].
  • FEATURE_SERIALIZATION - enables support for serialization of dynamic proxies and other types.
  • FEATURE_SMTP - provides the email sender abstraction and implementation.
  • FEATURE_SYSTEM_CONFIGURATION - enables features that use System.Configuration and the ConfigurationManager.
  • FEATURE_TARGETEXCEPTION - enabled catching a TargetException. System.Reflection.TargetException is implemented by .NET Core but not exposed by corefx.
  • FEATURE_TEST_COM - enables COM Interop tests.
  • FEATURE_TEST_PEVERIFY - enables verification of dynamic assemblies using PEVerify during tests. (Only defined on Windows builds since Windows is currently the only platform where PEVerify is available.)
  • FEATURE_TEST_SERILOGINTEGRATION - enables Serilog integration tests.