Open heikomilke opened 4 years ago
Postmark-dotnet
is currently built only for .NET Standard (2.0). As mentioned above, .NET Core has great support for .NET Standard, but it's a little bit messy for .NET Framework, generally adding a non-trivial amount of assembly dependencies and assembly redirects.
Additionally, there are buggy compatibility issues with older (but netstandard2.0
-compliant) versions of .NET Framework (4.6.1-4.7.1
) which Microsoft has been addressing in .NET Framework 4.7.2+.
We had at least one customer a few months back having trouble using Postmark-dotnet
from (4.6.1-4.7.1
) projects due to dependency issues.
Taking the additional maintenance into account, I believe this is OK to add. @atheken what are your thoughts on providing a native .NET Framework built nuget (or alternatively, additional net461
and net472
build targets to the current one) to improve the experience of .NET Framework users? (especially on older versions: 4.6.1-4.7.1
)
Old issue, I know, but what about providing a multi-targeted package?
Would change to
<TargetFrameworks>net471;net6.0;net5.0;netcoreapp3.1</TargetFrameworks>
Then add conditional references
<ItemGroup Condition=" '$(TargetFramework)' == 'net471' ">
<Reference Include="mscorlib" />
<Reference Include="System.Web" />
<Reference Include="System.Net.Http" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
Then pretty much any new project could use it natively. And in this configuration a reference to the System.Net.Http NuGet package would be completely unnecessary.
Would be completely removed.
With System.Net.Http being messed up in netstandard2.0 vs. .NET Framework would you consider providing a native .NET Framework built nuget?
e.g.
https://github.com/heikomilke/postmark-dotnet/tree/master/src/PostmarkNETFramework
The issue explained. Right now if you add a package reference from a .NET Framework assembly (I tried 4.7.1 and 4.8) to Postmark 4.3 you end up with some messy assembly references.
I started with clean class library and this is the result (excerpt):
... when all it should do is a plain reference to System.Net.Http.
Building the nuget for .NET Framework directly solves that issue.