-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Solution will not build VS 2022 #1770
Comments
Please see https://github.com/dotnet/MQTTnet/wiki/Build for required components which must be installed in order to build this project. The CI build server also uses Studio 2022 and works perfectly. |
I ran into the same problem on a machine that had the Windows 11 SDK selected for the "Universal Windows Platform development" workload within the Visual Studio installer. Another machine with "Windows 10 SDK 10.0.19041" builds fine. I suspect that this may be the problem. @roblatour, could you check your selected Windows SDK and does potentially changing the Windows SDK option to Windows 10 work for you? |
@logicaloud Thank you, I had missed the build requirement noted in https://github.com/dotnet/MQTTnet/wiki/Build as posted by @chrik1011 - I installed Universal Windows Platform development (Version 10.0.18362.0) via "Visual Studio Installer" and then the build worked fine. Thanks again! |
Thank you. In case someone else comes across this: The particular machine I had problems with had a clean install of Windows 11 and Visual Studio 2022. Workloads included C++ and the "Windows 11 SDK" was preselected for the "Universal Windows Platform development". The error that I was getting when compiling MQTTnet was "type forwarder ... causes a cycle in windowsruntime" or similar. I have now changed the "Windows SDK" option to use "Windows 10 SDK (10.0.18362.0)" and the build works. For this machine, only that specific SDK version worked, not, for example "Windows 10 SDK (10.0.19041.0)" which worked on a different machine. I'm note sure if playing around with the Visual Studio installer simply installed something "in the right order" or repaired something or whether there is indeed some specific dependency on the Windows SDK. |
I ran into the same issue @chkr1011 is it worth it to keep support for UWP these days? Wondering if the next major release (5.x) could drop support for old frameworks and target just LTS dotnet versions (4.8 for NETFX and 8.0 for dotnet) |
We already tried to remove support for UWP but since MQTT is used on real hardware via Windows IoT Core we still need to support very old targets. It is also a goal of this project to cover as most targets as possible. There are also requests to port this library to .net 3.5 and even 2.0... |
from https://learn.microsoft.com/en-us/lifecycle/products/windows-10-iot-core windows iot core is out of support, wondering what's the motivation to support EOL targets. |
There is still hardware which runs worldwide based on Windows IoT core and even .NET 4.5.2. This is common for hardware. It often runs very long with software which is out of support. The XBOX also still supports running UWP apps. So I guess we need to support it for a while. But we may consider moving support for UWP to a different library. |
users running outdated frameworks (NETFX, NET3, etc..) can always use the existing versions, but new versions going forward could target only supported platforms.
How can we (Microsoft) help with this? |
From the technical perspective it is quite easy. We could also fork this project and port bugfixes whenever needed but this requires some effort and will slow down development of the other stuff. For starters I would like to create a PR which removes the support for UWP. This may be implemented in the next update (4.4.x). Then we will see how the users respond to that. What do you think about this strategy? Do you have another idea how to deal with that (apart from just remove all support for older frameworks)? |
The strategy sounds good, I was thinking along the same lines. To provide more insights, I'd like to know more about the other stuff. Beyond bug fixes, is there a backlog or roadmap for next minor and major releases? Removing UWP will simplify the multi-target, and with .NET8 coming in a few weeks, I'd say the target frameworks could be reduced to: Would you like to follow this conversation in a new Discussion or Issue ? |
Please create a separate ticket (Issue). Then we can discuss the plan there and involve more people and making this topic more visible. |
|
Verification
Describe the bug
github solution fails to build
Which component is your bug related to?
see below
To Reproduce
download library, try to build solution with Microsoft Visual Studio Community 2022 (64-bit) - Current
Version 17.6.4.
Build fails: with 42 errors
Expected behavior
build should work
Screenshots
Additional context / logging
Severity Code Description Project File Line Suppression State
Error CS0731 The type forwarder for type 'Windows.Networking.Sockets.StreamSocket' in assembly 'Windows' causes a cycle MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpChannel.Uwp.cs 29 Active
Error CS1069 The type name 'StreamSocket' could not be found in the namespace 'Windows.Networking.Sockets'. This type has been forwarded to assembly 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime' Consider adding a reference to that assembly. MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpChannel.Uwp.cs 29 Active
Error CS0731 The type forwarder for type 'Windows.Networking.Sockets.StreamSocket' in assembly 'Windows' causes a cycle MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpChannel.Uwp.cs 39 Active
Error CS1069 The type name 'StreamSocket' could not be found in the namespace 'Windows.Networking.Sockets'. This type has been forwarded to assembly 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime' Consider adding a reference to that assembly. MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpChannel.Uwp.cs 39 Active
Error CS0731 The type forwarder for type 'Windows.Security.Cryptography.Certificates.ChainValidationResult' in assembly 'Windows' causes a cycle MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpChannel.Uwp.cs 52 Active
Error CS1069 The type name 'ChainValidationResult' could not be found in the namespace 'Windows.Security.Cryptography.Certificates'. This type has been forwarded to assembly 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime' Consider adding a reference to that assembly. MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpChannel.Uwp.cs 52 Active
Error CS0731 The type forwarder for type 'Windows.Security.Cryptography.Certificates.Certificate' in assembly 'Windows' causes a cycle MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpChannel.Uwp.cs 127 Active
Error CS1069 The type name 'Certificate' could not be found in the namespace 'Windows.Security.Cryptography.Certificates'. This type has been forwarded to assembly 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime' Consider adding a reference to that assembly. MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpChannel.Uwp.cs 127 Active
Error CS0731 The type forwarder for type 'Windows.Security.Cryptography.Certificates.ChainValidationResult' in assembly 'Windows' causes a cycle MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpChannel.Uwp.cs 142 Active
Error CS1069 The type name 'ChainValidationResult' could not be found in the namespace 'Windows.Security.Cryptography.Certificates'. This type has been forwarded to assembly 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime' Consider adding a reference to that assembly. MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpChannel.Uwp.cs 142 Active
Error CS0731 The type forwarder for type 'Windows.Networking.Sockets.StreamSocketListener' in assembly 'Windows' causes a cycle MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpServerAdapter.Uwp.cs 24 Active
Error CS1069 The type name 'StreamSocketListener' could not be found in the namespace 'Windows.Networking.Sockets'. This type has been forwarded to assembly 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime' Consider adding a reference to that assembly. MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpServerAdapter.Uwp.cs 24 Active
Error CS0731 The type forwarder for type 'Windows.Networking.Sockets.StreamSocketListener' in assembly 'Windows' causes a cycle MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpServerAdapter.Uwp.cs 73 Active
Error CS1069 The type name 'StreamSocketListener' could not be found in the namespace 'Windows.Networking.Sockets'. This type has been forwarded to assembly 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime' Consider adding a reference to that assembly. MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpServerAdapter.Uwp.cs 73 Active
Error CS0731 The type forwarder for type 'Windows.Networking.Sockets.StreamSocketListenerConnectionReceivedEventArgs' in assembly 'Windows' causes a cycle MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpServerAdapter.Uwp.cs 73 Active
Error CS1069 The type name 'StreamSocketListenerConnectionReceivedEventArgs' could not be found in the namespace 'Windows.Networking.Sockets'. This type has been forwarded to assembly 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime' Consider adding a reference to that assembly. MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpServerAdapter.Uwp.cs 73 Active
Error CS0103 The name 'SocketProtectionLevel' does not exist in the current context MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpChannel.Uwp.cs 46 Active
Error CS0731 The type forwarder for type 'Windows.Networking.Sockets.StreamSocket' in assembly 'Windows' causes a cycle MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpChannel.Uwp.cs 64 Active
Error CS1069 The type name 'StreamSocket' could not be found in the namespace 'Windows.Networking.Sockets'. This type has been forwarded to assembly 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime' Consider adding a reference to that assembly. MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpChannel.Uwp.cs 64 Active
Error CS0731 The type forwarder for type 'Windows.Networking.HostName' in assembly 'Windows' causes a cycle MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpChannel.Uwp.cs 71 Active
Error CS1069 The type name 'HostName' could not be found in the namespace 'Windows.Networking'. This type has been forwarded to assembly 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime' Consider adding a reference to that assembly. MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpChannel.Uwp.cs 71 Active
Error CS0103 The name 'SocketProtectionLevel' does not exist in the current context MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpChannel.Uwp.cs 82 Active
Error CS0103 The name 'SocketProtectionLevel' does not exist in the current context MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpChannel.Uwp.cs 85 Active
Error CS0103 The name 'SocketProtectionLevel' does not exist in the current context MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpChannel.Uwp.cs 89 Active
Error CS0731 The type forwarder for type 'Windows.Networking.HostName' in assembly 'Windows' causes a cycle MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpChannel.Uwp.cs 92 Active
Error CS1069 The type name 'HostName' could not be found in the namespace 'Windows.Networking'. This type has been forwarded to assembly 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime' Consider adding a reference to that assembly. MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpChannel.Uwp.cs 92 Active
Error CS0731 The type forwarder for type 'Windows.Security.Cryptography.Certificates.Certificate' in assembly 'Windows' causes a cycle MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpChannel.Uwp.cs 139 Active
Error CS1069 The type name 'Certificate' could not be found in the namespace 'Windows.Security.Cryptography.Certificates'. This type has been forwarded to assembly 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime' Consider adding a reference to that assembly. MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpChannel.Uwp.cs 139 Active
Error CS0731 The type forwarder for type 'Windows.Storage.Streams.IBuffer' in assembly 'Windows' causes a cycle MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpChannel.Uwp.cs 139 Active
Error CS0731 The type forwarder for type 'Windows.Security.Cryptography.Certificates.ChainValidationResult' in assembly 'Windows' causes a cycle MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpChannel.Uwp.cs 149 Active
Error CS1069 The type name 'ChainValidationResult' could not be found in the namespace 'Windows.Security.Cryptography.Certificates'. This type has been forwarded to assembly 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime' Consider adding a reference to that assembly. MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpChannel.Uwp.cs 149 Active
Error CS0103 The name 'ChainValidationResult' does not exist in the current context MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpChannel.Uwp.cs 153 Active
Error CS0103 The name 'ChainValidationResult' does not exist in the current context MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpChannel.Uwp.cs 155 Active
Error CS0103 The name 'ChainValidationResult' does not exist in the current context MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpChannel.Uwp.cs 160 Active
Error CS0103 The name 'ChainValidationResult' does not exist in the current context MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpChannel.Uwp.cs 165 Active
Error CS0731 The type forwarder for type 'Windows.Networking.Sockets.StreamSocketListener' in assembly 'Windows' causes a cycle MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpServerAdapter.Uwp.cs 40 Active
Error CS1069 The type name 'StreamSocketListener' could not be found in the namespace 'Windows.Networking.Sockets'. This type has been forwarded to assembly 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime' Consider adding a reference to that assembly. MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpServerAdapter.Uwp.cs 40 Active
Error CS0103 The name 'SocketQualityOfService' does not exist in the current context MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpServerAdapter.Uwp.cs 45 Active
Error CS0103 The name 'SocketProtectionLevel' does not exist in the current context MQTTnet (uap10.0) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\Implementations\MqttTcpServerAdapter.Uwp.cs 48 Active
Error CS0006 Metadata file 'C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\bin\Debug\uap10.0\MQTTnet.dll' could not be found MQTTnet.Extensions.ManagedClient (netstandard1.3) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet.Extensions.ManagedClient\CSC 1 Active
Error CS0006 Metadata file 'C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\bin\Debug\uap10.0\MQTTnet.dll' could not be found MQTTnet.Extensions.Rpc (netstandard1.3) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet.Extensions.Rpc\CSC 1 Active
Error CS0006 Metadata file 'C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet\bin\Debug\uap10.0\MQTTnet.dll' could not be found MQTTnet.Extensions.WebSocket4Net (netstandard1.3) C:\Users\Rob Latour\Desktop\New folder\MQTTnet-master\MQTTnet-master\Source\MQTTnet.Extensions.WebSocket4Net\CSC 1 Active
The text was updated successfully, but these errors were encountered: