question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Build errors in .net 5 after migration to 3.0.14

See original GitHub issue

Describe the bug

In my solution I’ve a netstandard2.1 class library that references MQTTnet and then a couple of net5 test projects that reference that class library.

As soon as I upgrade MQTTnet from v3.0.13 to v3.0.14 I start getting some weird build errors like the following one:

MqttProducerEndpointBuilderTests.cs(20, 59): [CS0012] The type 'MqttClientOptions' is defined in an assembly that is not referenced. You must add a reference to assembly 'MQTTnet, Version=3.0.14.0, Culture=neutral, PublicKeyToken=b69712f52770c0a7'.

Directly referencing the MQTTnet nuget package in the test projects doesn’t help.

No problem with v3.0.13 and v3.0.14 also seems to work if the test projects are targeting netcore3.1 instead of net5.

Which project is your bug related to?

  • Client

Code example

See the broken branch https://github.com/BEagle1984/silverback/tree/feature/update-mqttnet-net5 (MQTTnet 3.0.14 with net5 test projects).

Here is a working branch with MQTTnet 3.0.14 and netcore3.1: https://github.com/BEagle1984/silverback/tree/feature/update-mqttnet-netcore31 And here is a working branch with MQTTnet 3.0.13 and net5: https://github.com/BEagle1984/silverback/tree/feature/net5

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
BEagle1984commented, Feb 15, 2021

It seems to work correctly with the 3.0.15-rc1. Well done.

0reactions
chkr1011commented, Feb 21, 2021

Closing because the issue is fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Build errors in .net 5 after migration to 3.0.14 · Issue #1088
In my solution I've a netstandard2.1 class library that references MQTTnet and then a couple of net5 test projects that reference that class ......
Read more >
NETSDK1045: The current .NET SDK does not support ...
This error occurs when the build tools can't find the version of the .NET SDK that's needed to build a project. This is...
Read more >
EF Core add-migration Build Failed
If Project A is not successful build and then Project B data migration will fail. So you should unload Project A and add...
Read more >
Migrate from ASP.NET Core 3.1 to 5.0
Learn how to migrate an ASP.NET Core 2.2 project to ASP.NET Core 3.0. The Microsoft.
Read more >
Migration from Asp.Net Core 2.2 to 3.1 — Real project
The purpose of this article is to share my personal experience of migrating a medium complexity real project from Asp.Net Core 2.2 and ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found