Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ILogger deprecated for .NET core 3.1 - #9

Open
antoabbot opened this issue Jun 2, 2020 · 2 comments
Open

ILogger deprecated for .NET core 3.1 - #9

antoabbot opened this issue Jun 2, 2020 · 2 comments
Assignees

Comments

@antoabbot
Copy link

I am successfully using your ROS port from .NET core 3.1, via Nuget, when run in a console Application

However, when I run the same from within an ASP.net core App, I get an error (Method not found) whenever the ROS static instance is declared. This is due to the ILogger interface being deprecated.

Method not found: 'Void Microsoft.Extensions.Logging.Console.ConsoleLoggerProvider..ctor(System.Func`3<System.String,Microsoft.Extensions.Logging.LogLevel,Boolean>, Boolean)'.

This occurs in any .NET core 3.1 ASP.NET core or related App that uses the Microsoft.AspnetCore.App (3.1.2) framework.

I see that the code is utilising the ILogger interface. I have pulled a local copy of the code to try fix but I cannot find the Uml.Robotis.Ros.Messages project seems to be missing.

@andreaskoepf
Copy link
Member

The project Uml.Robotis.Ros.Messages source is generated by the the 'YAMLParser' tool from available msg, srv and action definition files (e.g. the basic set in the common_msgs folder).

I have personally not tried to execute it with .Net Core 3.1 but probably you can try to adapt the instructions from the project's README.md under ".NET Core 2.1 Build Instructions":

  1. cd YAMLParser
  2. dotnet run -f netcoreapp2.1 -- -m ../ -c Release -n Uml.Robotics.Ros.Messages -o ../Uml.Robotics.Ros.Messages
  3. cd ..
  4. dotnet build -f netcoreapp2.1 Uml.Robotics.Ros.sln

You can run the YAMLParser with --help or have a look at the command line options in the code Program.cs#L30-L37.

@andreaskoepf andreaskoepf self-assigned this Jun 2, 2020
@antoabbot
Copy link
Author

antoabbot commented Jun 2, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants