Sicos1977 / MsgKit

A .NET library to make MSG files without the need for Outlook
199 stars 55 forks source link

MsgKit currently still depends on .NETStandard, Version=v2.0, MsgReader on .NETFramework, Version=v4.6.2 #123

Closed mhuellwegen closed 2 months ago

mhuellwegen commented 5 months ago

Dear Kees,

are there any plans to "transfer" the MsgKit project also to the same .NETFramework version as MsgReader still is?

I am asking since i try to use both of your projects together in a simple .aspx C# project and especlially and only for your MsgKit i have to refer the much older netstandard assembly (in my case in a separate web.config) since my target framework on the web project is 4.7.2 by default.

Any ideas about that?

Best regards,

Martin

Sicos1977 commented 5 months ago

I don't understand the problem. The .net standard 2.0 version should work fine in 4.7.2

mhuellwegen commented 5 months ago

Hi Kees,

The .net standard 2.0 version should work fine in 4.7.2 Yes, yes, it's not a bug or problem, also not for me !!!!

But i'll have to do some extra add to/within my web.config file on my aspx project because MsgKit is now the one and only lib of some more who needs it so i placed this not "as an issue" but as an "are there any plans to go further" so you can think about it since most solutions don't relay on .NET 2.0 any more.

Best regards

Martin

Btw: You've done a "great job" and MsgKit and MsgReader work for me very well for my current project, so 1000thanx for now.

Sicos1977 commented 5 months ago

I still don't understand the problem. .netstandard 2.0 is nothing more than an interface that makes it possible to use the code in the .net framework and .net core (.net 6 and higher) .... .netstandard 2.0 != .net 2.0

https://andrewlock.net/understanding-the-dotnet-ecosystem-the-introduction-of-dotnet-standard/

Sicos1977 commented 5 months ago

Or do you mean that I make a specific package that targets .net 6.0 and higher? ... and use code that is only possible in .net 6.0 and higher ... because this would make a library like this much more complex to build because you need to add #if (NET6.0) tags everywhere.

mhuellwegen commented 5 months ago

Good morning Kees,

Or do you mean that I make a specific package that targets .net 6.0 and higher? Emm I think, that's not my issue, since I still in .NET Framework 4.7.2 for that project.

My issue is: In my web project I got an CS0012 Error the first time after installing the MsgKit package because I didn't refer to "netstandard, Version 2.0.0.0, ..." never before.

But I was able to help myself by adding

to my web.config file, as CS0012 also suggested (Perhaps a hint for other users who will run into the same compiler error).

I'm not so familiar with uploading packages to github but you did it differently somehow for the MsgReader package not causing this little problem since I am using both packages in the same project, your MsgReader months before and MsgKit since this week and CS0012 came with installing the MsgKit package.

By the way for the MsgReader package i can see three different grouped sections of dependencies (each section labeled with .NETFramework 4.6.2, .NETStandard 2.0 and .NETStandard 2.1) in the nuget-manager of visual studio.

For the MsgKit package i see only one grouped section of dependencies (section labeled with .NETStandard 2.0).

Perhaps this is a useful hint for you? But you can also close the case since adding a reference to my project fixed the issue...

Best regards,

Martin

Sicos1977 commented 5 months ago

I also don't know why you get that compiler error because I build the exact same packages

image

image

mhuellwegen commented 5 months ago

Hmm, i get this a bit different in Visual Studio 2022:

For MsgReader on nuget.org:

MsgReader-VS2022

and for MsgKit on nuget.org:

MsgKit-VS2022

:-)

mhuellwegen commented 5 months ago

And on https://www.nuget.org/packages/MsgReader : MsgReader-NuGet

And on https://www.nuget.org/packages/MsgKit : MsgKit-NuGet

Might be a problem that only refers to the publication of the packages at NuGet.org?

Regards, Martin

Sicos1977 commented 5 months ago

Weird... I will look into it

mhuellwegen commented 4 months ago

Hi Kees,

do you already have an idea why your MsgKit is only offered as .NET Standard 2.0 dependent at nuget.org?

Regards, Martin

mhuellwegen commented 4 months ago

Could this (the target framework settings in visual studio) cause the issue?

MsgKit

Regards, Martin

Sicos1977 commented 4 months ago

Have to look into it again

Sicos1977 commented 2 months ago