Custom SDK Microsoft.NET.Sdk.IL causing exception in dependencies tree
See original GitHub issueReported by @ViktorHofer.
Repro steps:
- Install .NET 6.0 SDK preview
- ~Open project https://github.com/dotnet/runtime/blob/35744328d0a94df5545cfe1cc02f6be133fbe655/src/libraries/System.Runtime/tests/NlsTests/System.Runtime.Nls.Tests.csproj#L6~
- Open project https://github.com/dotnet/runtime/blob/fde9281606859d4990dbaf92c0079c67936a9c4b/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj
Error:
Must contain activeTargetFramework (.NETCoreApp,Version=v6.0). Parameter name: dependenciesByTargetFramework
Exception:
Recoverable
System.AggregateException: Project system data flow 'DataflowBlockSlim (ActionBlockSlimAsync`1 : 17673919)' closed because of an exception: System.AggregateException: One or more errors occurred. ---> System.ArgumentException: Must contain activeTargetFramework (.NETCoreApp,Version=v6.0).
Parameter name: dependenciesByTargetFramework
at Microsoft.VisualStudio.ProjectSystem.Tree.Dependencies.Snapshot.DependenciesSnapshot..ctor(TargetFramework activeTargetFramework, ImmutableDictionary`2 dependenciesByTargetFramework)
at Microsoft.VisualStudio.ProjectSystem.Tree.Dependencies.Snapshot.DependenciesSnapshot.SetTargets(ImmutableArray`1 targetFrameworks, TargetFramework activeTargetFramework)
at Microsoft.VisualStudio.ProjectSystem.Tree.Dependencies.Subscriptions.DependenciesSnapshotProvider.<>c__DisplayClass32_0.<UpdateProjectContextAndSubscriptionsAsync>b__2(DependenciesSnapshot previousSnapshot)
at Microsoft.VisualStudio.ProjectSystem.Tree.Dependencies.Subscriptions.DependenciesSnapshotProvider.SnapshotUpdater.TryUpdate(Func`2 updateFunc, CancellationToken token)
at Microsoft.VisualStudio.ProjectSystem.Tree.Dependencies.Subscriptions.DependenciesSnapshotProvider.<<UpdateProjectContextAndSubscriptionsAsync>b__32_0>d.MoveNext()
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
The SDK 'Microsoft.NET.Sdk' specified could not be found. ...
Since Visual Studio 2022 updated from version 17.4 to 17.5, I couldn't load my project. and get the error "The SDK 'Microsoft.NET.
Read more >NET project SDK overview
NET projects can package custom MSBuild targets and properties for use by projects that consume the package. Use this type of extensibility when ......
Read more >NETSDK1141: Unable to resolve the .NET SDK version as ...
NET SDK version as specified in the global.json located at C:\path\global.json. Cause. The SDK version in the global.json file is incorrectly ...
Read more >dotnet sdk is installed but not recognized - Linux Ubuntu ...
I had the same problem, and here's what I did to resolve it. Removed all .NET packages sudo apt remove 'dotnet*' sudo apt...
Read more >The SDK 'Microsoft.NET.Sdk' specified could not be found - ...
I encountered this error after playing around with .Net Core 2.0 installation and seemingly messing it up. I would get this same error...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I will make a change to the error message to help diagnose this problem. It would be useful to know the set of target frameworks it expects
activeTargetFramework
to be in.If this is a bug in the custom SDK, there still needs to be a way to figure out what it’s doing wrong.