Skip to content
This repository has been archived by the owner on Jan 16, 2022. It is now read-only.

Can't get Mapping options in Roslyn menu #50

Closed
brrbtr opened this issue Nov 8, 2018 · 13 comments
Closed

Can't get Mapping options in Roslyn menu #50

brrbtr opened this issue Nov 8, 2018 · 13 comments

Comments

@brrbtr
Copy link

brrbtr commented Nov 8, 2018

I have ReSharper installed, but disabled. Restarted VS 2017. Still no Generate Mapping Code in the Roslyn menu. I verified that the extension appears to be installed. What is required for the Generate Mapping Code to show up ?

@cezarypiatek
Copy link
Owner

cezarypiatek commented Nov 8, 2018

Hi

What exactly version of VS 2017 do you have installed? Did you restart VS after installing the extension?
Roslyn menu should be triggered with ctr + . shortcut.

@brrbtr
Copy link
Author

brrbtr commented Nov 13, 2018

VS Enterprise 2017 (15.8.9)
Verified that extension is installed.
Yes, restarted.
Here's what I see:
image

@cezarypiatek
Copy link
Owner

cezarypiatek commented Nov 13, 2018

Have you tried with the code that is correct? Your method signature is invalid - no identifier for method parameter.

@brrbtr
Copy link
Author

brrbtr commented Nov 13, 2018

Yes. I had. (I just tried to spin up an example really quickly and forgot to finish...) In the meantime, my system got updated and rebooted for me (without permission, of course). Now, it seems to be working just fine. Sorry for the bother.

@cezarypiatek
Copy link
Owner

No problem, good to know that even bugs in OS can break Roslyn analyzers.

@pug-pelle-p
Copy link

I still experience this problem, is there any known fix for this?

@cezarypiatek
Copy link
Owner

@pug-pelle-p please update VS 2017 to the newest version and restart your computer

@paluch82
Copy link

paluch82 commented Jan 4, 2019

Hi,
I have Resharper 2018.3.1 and Visual Studio 2017 version 15.9.4. Unfortunately I cannot get the Mapping Generator menu. I tried to restart computer but this didn't help. Do you know how to fix the issue?

@cezarypiatek
Copy link
Owner

@paluch82 please provide your code where you expect MappingGenerator options.

@paluch82
Copy link

paluch82 commented Jan 5, 2019

Hi,

Here is my sample code:
`public class Test
{
public class ClassA
{
public string Name { get; set; }
public int Value { get; set; }
}

    public class ClassB
    {
        public string Name { get; set; }
        public int Value { get; set; }
    }

    private ClassB Map(ClassA a)
    {

    }
}`

The issue is related with Resharper because when I disable it then MappingGenerator options shows up.

@cezarypiatek
Copy link
Owner

cezarypiatek commented Jan 5, 2019

@paluch82 thank you for reporting this issue. It looks like Resharper 2018.3.1 has different settings in Visual Studio Integration section than before. Please verify your settings (the first option should be unchecked).

image

I'm not sure what is the real culprit: the default settings has been changed or Resharper took over ctr + . shortcut.

@paluch82
Copy link

paluch82 commented Jan 6, 2019

This resolved the issue. Now it works like a charm. Thanks.

@Havret
Copy link

Havret commented Apr 17, 2019

I think this should be included in project's ReadMe.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants