iamkinetic / NEventSocket

A reactive FreeSwitch eventsocket library for .Net/.Net Framework (.net standard 2)
Mozilla Public License 2.0
26 stars 11 forks source link

Examples are not compatible with Net Core 3.x #4

Open gregoriusus opened 3 years ago

gregoriusus commented 3 years ago

Solution builds ok on Net Core 2.x. But when changing to Net Core 3.0, example project doesn't build. Get a lot of errors like: 'ILifetimeScope' does not contain a definition for 'ImplementationsFor' and no accessible extension method 'ImplementationsFor' accepting a first argument of type 'ILifetimeScope' could be found

Guess some extensions are missing in Net Core 3.x.

Any ideas?

Best regards, Gregor

iamkinetic commented 3 years ago

Can you post the full exceptions?

gregoriusus commented 3 years ago

Hi!

Below are the errors. It looks like something with reference to Autofac. Project is configured for Net Core 3.1

2>------ Rebuild All started: Project: NEventSocket.Examples, Configuration: Debug Any CPU ------ 2>NEventSocket Core\NEventSocket.Examples\CommandLineTaskRunner.cs(6,7,6,10): error CS0246: The type or namespace name 'Net' could not be found (are you missing a using directive or an assembly reference?) 2>NEventSocket Core\NEventSocket.Examples\NetCore\CommandLineReader.cs(6,7,6,10): error CS0246: The type or namespace name 'Net' could not be found (are you missing a using directive or an assembly reference?) 2>NEventSocket Core\NEventSocket.Examples\NetCore\CommandLineReader.cs(7,7,7,10): error CS0246: The type or namespace name 'Net' could not be found (are you missing a using directive or an assembly reference?) 2>NEventSocket Core\NEventSocket.Examples\NetCore\CommandLineReader.cs(8,7,8,10): error CS0246: The type or namespace name 'Net' could not be found (are you missing a using directive or an assembly reference?) 2>Done building project "NEventSocket.Examples.csproj" -- FAILED.

iamkinetic commented 3 years ago

You're absolutely right, I haven't updated the "NEventSocket.Examples" project. Honestly I'm not sure I will, but you can use the unit tests as documentation.

danbarua commented 3 years ago

@gregoriusus HI, nice to see this project is still alive.

The Examples app is a basic console app that uses AutoFac to spin up the examples. You could just copy and paste the example code for each one into a vanilla console app and remove un-needed dependencies to try them out.