contre / Windows-API-Code-Pack-1.1

Windows API Code Pack 1.1
Other
161 stars 46 forks source link

Support for .Net Standard 2.0 #16

Closed tb-mtg closed 4 years ago

tb-mtg commented 6 years ago

Could you please add support for .Net Standard/.Net Core 2.0 ?

contre commented 6 years ago

This could be done but it will necessitate removing a variety of things because they are dependent on the windows UI frameworks which are not supported under Core

dahall commented 5 years ago

@contre I have forked the code and have upgraded all the projects to the new SDK format and made them support .NET Core 3.0. If I submit PRs, are you in a position to merge them and release updated NuGet packages?

contre commented 5 years ago

My wife and I just had our second child and as such I will not be able to do so for the near future. I can certainly review a pull request but I am pretty limited in computer access at the moment.

czdietrich commented 4 years ago

Is there any progress here? I would like to avoid making another fork of this source code, as there are already several forks and NuGets, but none of them seem to support .NET Core.

@dahall Can you create the pull request, so it can be reviewed?

dahall commented 4 years ago

I'm happy to create a PR, however I must warn everyone that I also ran code cleanup against all the files so there are 300 file changes. Almost no code logic is changed, other than those required for .NET Framework vs. .NET Core requirements. All the *.csproj files changed dramatically. I have done only minimal testing of the new builds. Still want my PR?

contre commented 4 years ago

I tried creating one from your branch already so there was at least interest from me.

dahall commented 4 years ago

It is done. PR #22 has been created and I've included some notes on how to resolve conflicts.

contre commented 4 years ago

This has now been fixed. Reopen or report a new issue if you have problems.

Still waiting on generating new nuget packages since additional changes are being made

GF-Huang commented 4 years ago

@dahall Could you please push the new version to NuGet ?

dahall commented 4 years ago

@GreatFireWall I don't have permissions

contre commented 4 years ago

It would be me that needs to do that. I'll do so once #24 is merged

GF-Huang commented 4 years ago

Got it, thank you all !

timcassell commented 2 years ago

.Net Standard support wasn't added, only .Net Core was. Is .Net Standard possible? It would be useful to build with it and use runtime checks to see if it's supported. (I'm looking to use this in BenchmarkDotNet)

czdietrich commented 2 years ago

I think, it is not really possible. These projects use UseWPF and UseWindowsForms switches which are only available in .NET Core and .NET Framework, but not in .NET Standard.

timcassell commented 2 years ago

I think it could be done with #if !NETSTANDARD2_0 conditional compilation blocks, so the parts that don't rely on WPF/WinForms can be used. I was able to extract at least a bit of that in https://github.com/dotnet/BenchmarkDotNet/pull/2158.