Comments

I'm trying to use the ForMember to add an ignore mapping to an object. ReSharper refuses to believe that ".ForMember(x => x.Thing, o => o.Ignore())" exists, though it's fine with using the string varient of that method. I'd rather use the former for obvious reasons, but seem to be stuck using the latter for now.

Note it, will COMPILE the other way, ReSharper just doesn't seem able to grok the Expression using the other one. Using 3.0.0 NuGet package.

This comment has been minimized.

I'm trying to use the ForMember to add an ignore mapping to an object.
ReSharper refuses to believe that ".ForMember(x => x.Thing, o =>
o.Ignore())" exists, though it's fine with using the string varient of that
method. I'd rather use the former for obvious reasons, but seem to be stuck
using the latter for now.

Note it, will COMPILE the other way, ReSharper just doesn't seem able to
grok the Expression using the other one. Using 3.0.0 NuGet package.

—
Reply to this email directly or view it on GitHubhttps://github.com/AutoMapper/AutoMapper/issues/381
.

I'm trying to use the ForMember to add an ignore mapping to an object.
ReSharper refuses to believe that ".ForMember(x => x.Thing, o =>
o.Ignore())" exists, though it's fine with using the string varient of that
method. I'd rather use the former for obvious reasons, but seem to be stuck
using the latter for now.

Note it, will COMPILE the other way, ReSharper just doesn't seem able to
grok the Expression using the other one. Using 3.0.0 NuGet package.

—
Reply to this email directly or view it on GitHubhttps://github.com/AutoMapper/AutoMapper/issues/381
.

This comment has been minimized.

Yes. All of our machines here are having the issue. ReSharper seems to think destinationMember is of type System.Linq.Expressions.Expression`1, and doesn't consider a normal Lambda expression to match that.

Yes. All of our machines here are having the issue. ReSharper seems to think destinationMember is of type System.Linq.Expressions.Expression`1, and doesn't consider a normal Lambda expression to match that.

This comment has been minimized.

Unloading and reloading the project didn't work for me. I also updated my R# to the latest version, and did all what has been suggested above. Without success. I'm using VS 2013, R# 8.2, AutoMapper 3.2.0 (whichI updated this morning). Prior to AutoMapper 3.2.0 everything was working fine. Although I've seen messages on StackOverflow which seems to be related to previous versions of AutoMapper. Very strange. My projects are based on .Net 4.5.1.

Unloading and reloading the project didn't work for me. I also updated my R# to the latest version, and did all what has been suggested above. Without success. I'm using VS 2013, R# 8.2, AutoMapper 3.2.0 (whichI updated this morning). Prior to AutoMapper 3.2.0 everything was working fine. Although I've seen messages on StackOverflow which seems to be related to previous versions of AutoMapper. Very strange. My projects are based on .Net 4.5.1.

This comment has been minimized.

The response I got back from JetBrains after filing a ticket was that they are glad I got it resolved, although I am not sure why it was resolved this way. Here is what fixed it for me again:

Updated to VS2012 Pro 11.0.61030.00 Update 4. The problem remained.
Uninstalled R# and installed a clean version from scratch. The problem remained.
Suspended R# in Tools->Options->Resharper and closed VS.
Deleted R# cache folder for the solution in "C:\Users\XXX\AppData\Local\JetBrains\ReSharper\v8.1\SolutionCaches"
Opened VS and resumed R# in Tools->Options->Resharper. The problem remained.
Restarted VS again and it finally worked!

The response I got back from JetBrains after filing a ticket was that they are glad I got it resolved, although I am not sure why it was resolved this way. Here is what fixed it for me again:

Updated to VS2012 Pro 11.0.61030.00 Update 4. The problem remained.
Uninstalled R# and installed a clean version from scratch. The problem remained.
Suspended R# in Tools->Options->Resharper and closed VS.
Deleted R# cache folder for the solution in "C:\Users\XXX\AppData\Local\JetBrains\ReSharper\v8.1\SolutionCaches"
Opened VS and resumed R# in Tools->Options->Resharper. The problem remained.
Restarted VS again and it finally worked!

Warning 1 The reference assemblies for framework ".NETPortable,Version=v4.0,Profile=Profile328" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. AutoMapper
Warning 2 There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\\mscorlib.dll", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. AutoMapper

It seems as if the problems occurred around the "Adding WPA81" commit which aligns with the general dates of the 3.2.0-ci1021 commit in NuGet.

My suspicion is that the R# / AutoMapper problem is caused by having or not having a particular version of NetPortable SDK on affected workstations. This would be consistent with observations of some people seeing the problem whilst others are unaffected. If this is the case, the problem and resolution is with AutoMapper (not Jetbrains / R#).

Have spent quite a bit of time on this so far;) Hope this helps and thanks for a great library in AutoMapper.

Warning 1 The reference assemblies for framework ".NETPortable,Version=v4.0,Profile=Profile328" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. AutoMapper
Warning 2 There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\\mscorlib.dll", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. AutoMapper

It seems as if the problems occurred around the "Adding WPA81" commit which aligns with the general dates of the 3.2.0-ci1021 commit in NuGet.

My suspicion is that the R# / AutoMapper problem is caused by having or not having a particular version of NetPortable SDK on affected workstations. This would be consistent with observations of some people seeing the problem whilst others are unaffected. If this is the case, the problem and resolution is with AutoMapper (not Jetbrains / R#).

Have spent quite a bit of time on this so far;) Hope this helps and thanks for a great library in AutoMapper.