Touseefelahi / GigeVision

Simple GigeVision implementation, GVSP, GVCP protocol implemented
103 stars 31 forks source link

Porting to .NetStandard2.0 #105

Closed blauertee closed 3 months ago

blauertee commented 3 months ago

Hello,

I need a GigE Vision Implementation on .Net Framework 4.7. So either I have to write my own or Port this. In #74 you said that would be quite a lot of work. Are there any really hard to overcome obstacls, if I wanted to port this to target netstandard2.0? (To be able to Reference it in my Framework project)

What are the difficulties I'd face in general?

If you say it's probably less than 16h of work, I'd try and submit a PR if wanted.

Thank's!

Touseefelahi commented 3 months ago

No actually it will be less than 16 hours of work. Testing might take some time though.

Touseefelahi commented 3 months ago

Actually I did make for 4.7 as well. I had to do it for some client. I'll need to find the library. Library wasn't very optimized, tell me about your requirements a bit. You can contact me at Touseefelahi@ymail.com

Touseefelahi commented 3 months ago

you can try this for now https://github.com/Touseefelahi/GigeVision/tree/4.8FrameworkCompatible

blauertee commented 3 months ago

Thanks! For the Quick reply! Okay I'll use the 4.8 Framework Branch as starting point. I don't really need much, just a bit of Camera configuration and retrieveing still Images. If you'd just push the non optimized 4.7 Version somwhere that'd ofc also make me very happy :)

And I mean if you want this to be widely used targeting some kind of .Net Standard on master would make the Nuget much more accessible :)

Touseefelahi commented 3 months ago

The branch that I shared is valid for 4.7.1 as well, try it and update me if there is something wrong. Yeah .Net Standard will make it really easy to use, but little hard to build. I started with .net standard and there were few things that pushed me to use .net core

blauertee commented 3 months ago

I Just threw all the WPF Stuff out because I don't need that which made it a really quick task. I think refactoring so that GigEVision.Core doesn't depend on any WPF Libraries would also be a good Idea. I bet this library is used in Backends a lot where all of this is just baggage. Not sue how to abstract from your BaseNotifyPropertyChanged class but I think it must be possible.

Touseefelahi commented 3 months ago

I would say it would be better to use the master branch and then try to get it working for netstandard. So that we don't have to repeat the work. For your application if the dotnet framework 4.8 branch work then use as it is, or with minimum changes. The wpf related stuff is only for INotifyPropertyChange interface implementation. It has nothing to related to wpf actually. In newer version of the library it is already removed.

blauertee commented 3 months ago

Ah okay makes sense, well it works now for me. I think i'm not gonna submit a PR since in my Dev Environment I don't have acces to VS 2022, so I cannot test targeting anything above net5.0. But after removing/ignoring all the WPF stuff in the Repo just adding netstandard2.0 to TargetFrameworks worked pretty much out of the box.

Thank's a lot for all the Support!

blauertee commented 3 months ago

Nvm https://github.com/Touseefelahi/GigeVision/pull/106 :)