snitch
snitch copied to clipboard
I have a problem, hope you can help me solve it
When I follow the steps, I get the following error.

Error: Value cannot be null. (Parameter 'key')
I have no idea deal with this ,please help me,thanks
@q913777031 Difficult to help you here without a reproducable example. Could you run snich from source and see where the exception is thrown?
I'm also getting this error. It went away when I realised that I had a project with <TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks> which had a ProjectReference to a project with <TargetFramework>netcoreapp3.1</TargetFramework>.
Making sure both projects were set to <TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks> made the error go away.
Hope that helps?
@patriksvensson would it be helpful to output the stack trace when an unknown exception is hit?
I also have this error, what can I do to help track it down? the issue happens in this method:
private static string GetNearestFrameworkMoniker(this NuGetFramework framework, IEnumerable<string> candidates)
{
var provider = DefaultFrameworkNameProvider.Instance;
var reducer = new FrameworkReducer();
var mappings = new Dictionary<NuGetFramework, string>(
candidates.ToDictionary(
x => NuGetFramework.Parse(x, provider), y => y, new NuGetFrameworkFullComparer()));
return mappings[reducer.GetNearest(framework, mappings.Keys)];
}
Here's a screenshot from VS2022

@yooakim I would need some kind of minimal reproducible example to be able to fix it.
@patriksvensson I'll try to spend some time on this over the holidays ;-) Will see what I find.
This happens when you dont have the right dotnet installed.. To reproduce try running snitch with a tfm, that is not installed in your current machine. it produces this error.