Closed JansthcirlU closed 1 month ago
Had the same problem. There is an error in the given example.
Solution: Replace "MqttServerFactory" with "MqttFactory". This should solve your problem.
There is an error in the given example.
No, the wiki is just not used anymore, just for version 3.x. For version 4.x, refer to the https://github.com/dotnet/MQTTnet/tree/master/Samples folder, please.
Describe the bug
I've created a new class library project, added
MQTTnet
to it, but when trying to make a newMqttServerFactory
, the IDE complains that that class cannot be found.Which component is your bug related to?
To Reproduce
Steps to reproduce the behavior:
dotnet new classlib
.MqttServerFactory
.Expected behavior
The
MqttServerFactory
class, which lives inside theServer
namespace and is public, should be recognized.Screenshots
Code example