Skip to content

Commit

Permalink
Merge pull request #495 from stakx/remove-targets
Browse files Browse the repository at this point in the history
Remove framework targets `net40`, `netstandard1.3`, `netstandard1.5`
  • Loading branch information
stakx committed May 16, 2020
2 parents 2567985 + ebd80f8 commit 77e76b3
Show file tree
Hide file tree
Showing 237 changed files with 419 additions and 10,537 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Enhancements:
- .NET Standard 2.0 and 2.1 support (@lg2de, #485)

Deprecations:
- Removed support for the .NET Framework 3.5.
- Removed support for the .NET Framework < 4.5 and .NET Standard 1.x. (@stakx, #495, #496)

## 4.4.1 (2020-05-06)

Expand Down
61 changes: 16 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ build.cmd

Compilation requires an up-to-date .NET Core SDK and MSBuild 15+ (which should be included in the former).

Running the unit tests additionally requires the .NET Framework 4.6.1+ as well as the .NET Core 1.1 runtime to be installed.
Running the unit tests additionally requires the .NET Framework 4.6.1+ as well as the .NET Core 3.1 runtime to be installed.

Most of these requirements should be covered by Visual Studio 2017.
Most of these requirements should be covered by Visual Studio 2019.

### On Linux

Expand All @@ -48,7 +48,7 @@ Most of these requirements should be covered by Visual Studio 2017.

Compilation requires an up-to-date .NET Core SDK.

Running the unit tests additionally requires the .NET Core 1.1 runtime to be installed, as well as either Docker or Mono. For the latter, we recommend Mono 5.10+, though older versions (4.6.1+) might still work as well.
Running the unit tests additionally requires the .NET Core 3.1 runtime to be installed, as well as either Docker or Mono. For the latter, we recommend Mono 5.10+, though older versions (4.6.1+) might still work as well.

:information_source: **Mono runtime support:** Castle Core runs with minor limitations and defects on Mono 4.0.2+ (however 4.6.1+ is highly recommended, or 5.10+ if your code uses new C# 7.x language features such as `in` parameters).

Expand All @@ -60,55 +60,26 @@ For known Mono defects, check [our issue tracker](https://github.com/castleproje

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

Symbol | NET40 | NET45 | .NET Core
----------------------------------- | ------------------ | ------------------ | ------------------
`FEATURE_APPDOMAIN` | :white_check_mark: | :white_check_mark: | :no_entry_sign:
`FEATURE_ASSEMBLYBUILDER_SAVE` | :white_check_mark: | :white_check_mark: | :no_entry_sign:
`FEATURE_BINDINGLIST` | :white_check_mark: | :white_check_mark: | :no_entry_sign:
`FEATURE_DICTIONARYADAPTER_XML` | :white_check_mark: | :white_check_mark: | :no_entry_sign:
`FEATURE_CUSTOMMODIFIERS` | :white_check_mark: | :white_check_mark: | :no_entry_sign:
`FEATURE_EVENTLOG` | :white_check_mark: | :white_check_mark: | :no_entry_sign:
`FEATURE_GAC` | :white_check_mark: | :white_check_mark: | :no_entry_sign:
`FEATURE_GET_REFERENCED_ASSEMBLIES` | :white_check_mark: | :white_check_mark: | :no_entry_sign:
`FEATURE_IDATAERRORINFO` | :white_check_mark: | :white_check_mark: | :no_entry_sign:
`FEATURE_ISUPPORTINITIALIZE` | :white_check_mark: | :white_check_mark: | :no_entry_sign:
`FEATURE_LEGACY_REFLECTION_API` | :white_check_mark: | :no_entry_sign: | :no_entry_sign:
`FEATURE_LISTSORT` | :white_check_mark: | :white_check_mark: | :no_entry_sign:
`FEATURE_NETCORE_REFLECTION_API` | :no_entry_sign: | :no_entry_sign: | :white_check_mark:
`FEATURE_REMOTING` | :white_check_mark: | :white_check_mark: | :no_entry_sign:
`FEATURE_SECURITY_PERMISSIONS` | :white_check_mark: | :white_check_mark: | :no_entry_sign:
`FEATURE_SERIALIZATION` | :white_check_mark: | :white_check_mark: | :no_entry_sign:
`FEATURE_SMTP` | :white_check_mark: | :white_check_mark: | :no_entry_sign:
`FEATURE_SYSTEM_CONFIGURATION` | :white_check_mark: | :white_check_mark: | :no_entry_sign:
`FEATURE_TARGETEXCEPTION` | :white_check_mark: | :white_check_mark: | :no_entry_sign:
`FEATURE_TEST_COM` | :white_check_mark: | :white_check_mark: | :no_entry_sign:
`FEATURE_TEST_DATASET` | :white_check_mark: | :white_check_mark: | :no_entry_sign:
`FEATURE_TEST_PEVERIFY` | :white_check_mark: | :white_check_mark: | :no_entry_sign:
`FEATURE_TEST_SERILOGINTEGRATION` | :no_entry_sign: | :white_check_mark: | :white_check_mark:
--- | | |
`DOTNET40` | :white_check_mark: | :white_check_mark: | :no_entry_sign:
`DOTNET45` | :no_entry_sign: | :white_check_mark: | :no_entry_sign:
Symbol | .NET 4.5 | .NET Standard 2.x
----------------------------------- | ------------------ | ------------------
`FEATURE_APPDOMAIN` | :white_check_mark: | :no_entry_sign:
`FEATURE_ASSEMBLYBUILDER_SAVE` | :white_check_mark: | :no_entry_sign:
`FEATURE_EVENTLOG` | :white_check_mark: | :no_entry_sign:
`FEATURE_REMOTING` | :white_check_mark: | :no_entry_sign:
`FEATURE_SECURITY_PERMISSIONS` | :white_check_mark: | :no_entry_sign:
`FEATURE_SERIALIZATION` | :white_check_mark: | :no_entry_sign:
`FEATURE_SYSTEM_CONFIGURATION` | :white_check_mark: | :no_entry_sign:
`FEATURE_TEST_COM` | :white_check_mark: | :no_entry_sign:
`FEATURE_TEST_PEVERIFY` | :white_check_mark: | :no_entry_sign:
--- | |
`DOTNET45` | :white_check_mark: | :no_entry_sign:

* `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_CUSTOMMODIFIERS` - enables reading and 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 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_DATASET` - enables tests that involve `System.Data.DataSet`s.
* `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.
2 changes: 1 addition & 1 deletion buildscripts/CommonAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
[assembly: ComVisible(false)]
[assembly: CLSCompliant(true)]

#if FEATURE_SECURITY_PERMISSIONS && DOTNET40
#if FEATURE_SECURITY_PERMISSIONS
[assembly: SecurityRules(SecurityRuleSet.Level2)]
#endif
48 changes: 7 additions & 41 deletions buildscripts/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -43,53 +43,27 @@

<PropertyGroup>
<DiagnosticsConstants>DEBUG</DiagnosticsConstants>
<NetStandard13Constants>TRACE;FEATURE_NETCORE_REFLECTION_API;FEATURE_TEST_SERILOGINTEGRATION</NetStandard13Constants>
<NetStandard15Constants>$(NetStandard13Constants);FEATURE_CUSTOMMODIFIERS</NetStandard15Constants>
<NetStandard20Constants>TRACE;FEATURE_BINDINGLIST;FEATURE_DICTIONARYADAPTER_XML;FEATURE_CUSTOMMODIFIERS;FEATURE_GAC;FEATURE_IDATAERRORINFO;FEATURE_ISUPPORTINITIALIZE;FEATURE_LISTSORT;FEATURE_SMTP;FEATURE_TARGETEXCEPTION;FEATURE_TEST_DATASET;FEATURE_TEST_SERILOGINTEGRATION;FEATURE_NETSTANDARD2_COMPATIBILITY</NetStandard20Constants>
<NetStandard21Constants>TRACE;FEATURE_BINDINGLIST;FEATURE_DICTIONARYADAPTER_XML;FEATURE_CUSTOMMODIFIERS;FEATURE_GAC;FEATURE_IDATAERRORINFO;FEATURE_ISUPPORTINITIALIZE;FEATURE_LISTSORT;FEATURE_SMTP;FEATURE_TARGETEXCEPTION;FEATURE_TEST_DATASET;FEATURE_TEST_SERILOGINTEGRATION;FEATURE_NETSTANDARD2_COMPATIBILITY</NetStandard21Constants>
<CommonDesktopClrConstants>TRACE;FEATURE_APPDOMAIN;FEATURE_ASSEMBLYBUILDER_SAVE;FEATURE_BINDINGLIST;FEATURE_DICTIONARYADAPTER_XML;FEATURE_CUSTOMMODIFIERS;FEATURE_EVENTLOG;FEATURE_GAC;FEATURE_GET_REFERENCED_ASSEMBLIES;FEATURE_IDATAERRORINFO;FEATURE_ISUPPORTINITIALIZE;FEATURE_LISTSORT;FEATURE_REMOTING;FEATURE_SECURITY_PERMISSIONS;FEATURE_SERIALIZATION;FEATURE_SMTP;FEATURE_SYSTEM_CONFIGURATION;FEATURE_TARGETEXCEPTION;FEATURE_TEST_COM;FEATURE_TEST_DATASET;FEATURE_TEST_SERILOGINTEGRATION</CommonDesktopClrConstants>
<NetStandard20Constants>TRACE</NetStandard20Constants>
<NetStandard21Constants>TRACE</NetStandard21Constants>
<CommonDesktopClrConstants>TRACE;FEATURE_APPDOMAIN;FEATURE_ASSEMBLYBUILDER_SAVE;FEATURE_EVENTLOG;FEATURE_REMOTING;FEATURE_SECURITY_PERMISSIONS;FEATURE_SERIALIZATION;FEATURE_SYSTEM_CONFIGURATION;FEATURE_TEST_COM</CommonDesktopClrConstants>
<DesktopClrConstants Condition="'$(OS)'=='Unix'">$(CommonDesktopClrConstants)</DesktopClrConstants>
<DesktopClrConstants Condition="'$(OS)'=='Windows_NT'">$(CommonDesktopClrConstants);FEATURE_TEST_PEVERIFY</DesktopClrConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)|$(Configuration)'=='net40|Debug'">
<DefineConstants>$(DiagnosticsConstants);$(DesktopClrConstants);FEATURE_LEGACY_REFLECTION_API;DOTNET40</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)|$(Configuration)'=='net40|Release'">
<DefineConstants>$(DesktopClrConstants);FEATURE_LEGACY_REFLECTION_API;DOTNET40</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)|$(Configuration)'=='net45|Debug'">
<DefineConstants>$(DiagnosticsConstants);$(DesktopClrConstants);DOTNET45;DOTNET40</DefineConstants>
<DefineConstants>$(DiagnosticsConstants);$(DesktopClrConstants);DOTNET45</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)|$(Configuration)'=='net45|Release'">
<DefineConstants>$(DesktopClrConstants);DOTNET45;DOTNET40;</DefineConstants>
<DefineConstants>$(DesktopClrConstants);DOTNET45;</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)|$(Configuration)'=='net461|Debug'">
<DefineConstants>$(DiagnosticsConstants);$(DesktopClrConstants);DOTNET45;DOTNET40</DefineConstants>
<DefineConstants>$(DiagnosticsConstants);$(DesktopClrConstants);DOTNET45</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)|$(Configuration)'=='net461|Release'">
<DefineConstants>$(DesktopClrConstants);DOTNET45;DOTNET40</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)|$(Configuration)'=='netstandard1.3|Debug'">
<DefineConstants>$(DiagnosticsConstants);$(NetStandard13Constants)</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)|$(Configuration)'=='netstandard1.3|Release'">
<DefineConstants>$(NetStandard13Constants)</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)|$(Configuration)'=='netstandard1.5|Debug'">
<DefineConstants>$(DiagnosticsConstants);$(NetStandard15Constants)</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)|$(Configuration)'=='netstandard1.5|Release'">
<DefineConstants>$(NetStandard15Constants)</DefineConstants>
<DefineConstants>$(DesktopClrConstants);DOTNET45</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)|$(Configuration)'=='netstandard2.0|Debug'">
Expand All @@ -108,14 +82,6 @@
<DefineConstants>$(NetStandard21Constants)</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)|$(Configuration)'=='netcoreapp1.1|Debug'">
<DefineConstants>$(DiagnosticsConstants);$(NetStandard15Constants)</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)|$(Configuration)'=='netcoreapp1.1|Release'">
<DefineConstants>$(NetStandard15Constants)</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)|$(Configuration)'=='netcoreapp2.1|Debug'">
<DefineConstants>$(DiagnosticsConstants);$(NetStandard20Constants)</DefineConstants>
</PropertyGroup>
Expand Down
5 changes: 3 additions & 2 deletions docs/dynamicproxy-introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ DynamicProxy differs from the proxy implementation built into the CLR which requ
To use Castle DynamicProxy you need the following environment:

* one of the following runtimes installed
* .NET Framework 4.0+
* .NET Core 1.0+ (Castle Core 4.0+)
* .NET Framework 4.5+
* .NET Core 2.1+
* any another .NET platform that supports .NET Standard 2.0+ and runtime type generation using System.Reflection.Emit
* `Castle.Core.dll` (assembly where DynamicProxy lives)

:information_source: **DynamicProxy assembly:** In previous versions (up to v2.2) DynamicProxy used to live in its own assembly `Castle.DynamicProxy.dll`. It was later moved to `Castle.Core.dll` and now no other assembly is required to use it.
Expand Down
Loading

0 comments on commit 77e76b3

Please sign in to comment.