Description
This issue has been moved from a ticket on Developer Community.
The upgrade with upgrade-assistant worked well. Nothing to say. Compiling and building in .Net 6.0 does not give any errors. On the other hand, this application, which worked perfectly with the Framework 4.8, no longer works with .NET 6.0.
I detected at least one error on these lines:
If upnpDev.Services.Count > 0 Then
For Each service As UPnPService In upnpDev.Services
If service IsNot Nothing Then
Dim nodeServ As New ClTreeNodeUPnPService(service, node)
Node. Nodes.Add(nodeServ)
End If
Next
End If
If upnpDev.Services contains only one UPnPService then the service variable of For Each returns nothing, if upnpDevServices contains more than two services then it works and we get both UPnPService.
I think there are other errors because the application loops I don't know where.
It is an application that displays UPnP devices and services and actions.
Well I don't know what the .NET 6.0 usage domain is. In any case, obviously, it works badly with COM dependencies.
[MyDisplayUPnP.zip] (https://aka.ms/dc/file?name=B2aec6b7f69314befaf77d19584269755637783939249648813_MyDisplayUPnP.zip&tid=2aec6b7f69314befaf77d19584269755637783939249648813)
Original Comments
Feedback Bot on 1/24/2022, 02:44 AM:
(private comment, text removed)
Sara Liu [MSFT] on 1/24/2022, 06:35 AM:
(private comment, text removed)
behemothe on 1/24/2022, 10:58 AM:
(private comment, text removed)
Feedback Bot on 1/25/2022, 00:17 PM:
(private comment, text removed)
Feedback Bot on 5/7/2022, 11:07 AM:
(private comment, text removed)
Original Solutions
behemothe solved on 1/21/2022, 10:26 PM, 0 votes:
Il s’avère que cet élément trouvé est complètement fantoche et que pour que ça marche il suffit de sortir du For Each pour éviter un bouclage infini:
If upnpDev.Services.Count > 0 Then
For Each service As UPnPService In upnpDev.Services
If service IsNot Nothing Then
Dim nodeServ As New ClTreeNodeUPnPService(service, node)
node.Nodes.Add(nodeServ)
Else
Exit For
End If
Next
End If