snitch icon indicating copy to clipboard operation
snitch copied to clipboard

I have a problem, hope you can help me solve it

Open q913777031 opened this issue 4 years ago • 7 comments

When I follow the steps, I get the following error. image

Error: Value cannot be null. (Parameter 'key')

I have no idea deal with this ,please help me,thanks

q913777031 avatar Feb 04 '21 02:02 q913777031

@q913777031 Difficult to help you here without a reproducable example. Could you run snich from source and see where the exception is thrown?

patriksvensson avatar Feb 04 '21 09:02 patriksvensson

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?

tjrobinson avatar Feb 10 '21 15:02 tjrobinson

@patriksvensson would it be helpful to output the stack trace when an unknown exception is hit?

SimonCropp avatar Feb 17 '21 11:02 SimonCropp

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 image

yooakim avatar Dec 21 '21 06:12 yooakim

@yooakim I would need some kind of minimal reproducible example to be able to fix it.

patriksvensson avatar Dec 21 '21 10:12 patriksvensson

@patriksvensson I'll try to spend some time on this over the holidays ;-) Will see what I find.

yooakim avatar Dec 21 '21 12:12 yooakim

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.

VisualBean avatar Jul 25 '22 07:07 VisualBean