Automapper Intellisense does not work in VS2015

I have VS2010, 12, 13, 15 on my machine. All versions except 15 (Enterprise) work with Intellisense for Automapper.

code:

class Program { static void Main(string[] args) { Mapper.CreateMap<B, C>() .ForMember(x => x.) // this is where it breaks } } class B { public string BB { get; set; } } class C { public string CC { get; set; } } 

I have reproduced this on two machines now:

  • Creating a console project
  • Adding a link from Nuget for Automapper install-package automapper
  • Writing the above code

In previous versions of VS, as soon as I press x => x. I get Intellisense with target members.

+5
source share
2 answers

I ran into a similar problem. I noticed that you need to provide the full syntax for displaying intellisense

Copy-paste the sample code below and replace it with the source and recipients. Then remove the ".ChildDetails" element samples, you will begin to see intellisense!

Mapper.CreateMap<tblBusinessName, BusinessNameBO>() .ForMember(dest => dest.ChildDetails, m => m.MapFrom(s => s.tblBusinessNameChild));

+3
source

Try the following:

  • Update AutoMapper in VS2015 or uninstall AutoMapper and install
  • In VS2015, check: Tools → Options → Text Editor → All Languages ​​-> [Auto List Items] and [Parameter Information]

What version of AutoMapper did you install?

+1
source

Source: https://habr.com/ru/post/1240981/


All Articles