Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove framework targets net40, netstandard1.3, netstandard1.5 #495

Merged
merged 16 commits into from
May 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Comment on lines 77 to -114
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After this is merged we can talk through these, more definitely need to go.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. I'll open an issue for that.

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
Comment on lines -22 to 24
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it isn't already, removing all the security transparency junk should be on the list for this major release.

But leave it for another pull request, this one is already big 😉

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll do that next.

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