Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
q913777031 opened this issue Feb 4, 2021 · 7 comments
Open

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

q913777031 opened this issue Feb 4, 2021 · 7 comments
Labels
bug Something isn't working

Comments

@q913777031
Copy link

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

@patriksvensson
Copy link
Member

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

@patriksvensson patriksvensson added the bug Something isn't working label Feb 4, 2021
@tjrobinson
Copy link

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?

@SimonCropp
Copy link
Contributor

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

@yooakim
Copy link

yooakim commented Dec 21, 2021

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

@patriksvensson
Copy link
Member

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

@yooakim
Copy link

yooakim commented Dec 21, 2021

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

@VisualBean
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants