Open rockfordlhotka opened 9 months ago
Hi, tried reproducing. But as I don't have MAUI workload installed, I'm not even able to do the design-time build.
Platform version is not present for one or more target frameworks, even though they have specified a platform: net8.0-android, net8.0-ios, net8.0-maccatalyst Unhandled exception. System.Collections.Generic.KeyNotFoundException: The given key 'Microsoft.Maui.Controls' was not present in the dictionary.
So I don't have to install the MAUI workloads on my machine, would you mind debugging Depends for me? Place a breakpoint around here https://github.com/bjorkstromm/depends/blob/92edbd8ab6e218f8e78b59bfebd48cc27c9abd87/src/Depends.Core/DependencyAnalyzer.cs#L253-L258 and tell me the values of targetFramework
, runtimeIdentifier
, and lockFile.Targets
😄
Thank you for the reply, I'll give that a try and let you know.
targetFramework is net6.0
runtimeIdentifier is null
lockFile.Targets
? lockFile.Targets[0]
{NuGet.ProjectModel.LockFileTarget}
Libraries: Count = 21
Name: "net6.0"
RuntimeIdentifier: null
TargetFramework: {net6.0}
? lockFile.Targets[1]
{NuGet.ProjectModel.LockFileTarget}
Libraries: Count = 20
Name: "net7.0"
RuntimeIdentifier: null
TargetFramework: {net7.0}
? lockFile.Targets[2]
{NuGet.ProjectModel.LockFileTarget}
Libraries: Count = 22
Name: "net8.0"
RuntimeIdentifier: null
TargetFramework: {net8.0}
The list of libraries in the net6.0 target is:
"Microsoft.Build.Tasks.Git\r\nMicrosoft.Extensions.Configuration\r\nMicrosoft.Extensions.Configuration.Abstractions\r\nMicrosoft.Extensions.Configuration.Binder\r\nMicrosoft.Extensions.DependencyInjection\r\nMicrosoft.Extensions.DependencyInjection.Abstractions\r\nMicrosoft.Extensions.FileProviders.Abstractions\r\nMicrosoft.Extensions.Hosting.Abstractions\r\nMicrosoft.Extensions.Logging.Abstractions\r\nMicrosoft.Extensions.Primitives\r\nMicrosoft.SourceLink.Common\r\nMicrosoft.SourceLink.GitHub\r\nSystem.ComponentModel.Annotations\r\nSystem.Runtime.CompilerServices.Unsafe\r\n"
I attempted to use the tool against the
main
branch of the CSLA .NET project (Source/csla.build.sln) and got this exception:This solution builds a wide range of projects, most UI types, class libraries, netfx, net8.0, and more. I don't see in the exception where there's any indication of which project caused the failure. Let me know if I can provide assistance.