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

ForMember angering ReSharper? - Non-existing PCL profile on client machine causing compile/R# errors #381

Closed
i8beef opened this Issue Sep 3, 2013 · 51 comments

Comments

Projects
None yet
@i8beef

i8beef commented Sep 3, 2013

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.

@jbogard

This comment has been minimized.

Show comment
Hide comment
@jbogard

jbogard Sep 3, 2013

Member

So you're using the ForMember("Thing", o => o.Ignore()) version?

On Tue, Sep 3, 2013 at 3:58 PM, Michael Hallock notifications@github.comwrote:

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
.

Member

jbogard commented Sep 3, 2013

So you're using the ForMember("Thing", o => o.Ignore()) version?

On Tue, Sep 3, 2013 at 3:58 PM, Michael Hallock notifications@github.comwrote:

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
.

@i8beef

This comment has been minimized.

Show comment
Hide comment
@i8beef

i8beef Sep 3, 2013

Opposite actually. That works fine (And is what I'm using as a workaround for now). ReSharper (Latest) refuses to recognize the LINQ expression version.

i8beef commented Sep 3, 2013

Opposite actually. That works fine (And is what I'm using as a workaround for now). ReSharper (Latest) refuses to recognize the LINQ expression version.

@jbogard

This comment has been minimized.

Show comment
Hide comment
@jbogard

jbogard Sep 4, 2013

Member

Hmm, have you tried opening and closing VS? I've had R# do this to me a
couple of times (on other things).

On Tue, Sep 3, 2013 at 5:40 PM, Michael Hallock notifications@github.comwrote:

Opposite actually. That works fine (And is what I'm using as a workaround
for now). ReSharper (Latest) refuses to recognize the LINQ expression
version.


Reply to this email directly or view it on GitHubhttps://github.com/AutoMapper/AutoMapper/issues/381#issuecomment-23753041
.

Member

jbogard commented Sep 4, 2013

Hmm, have you tried opening and closing VS? I've had R# do this to me a
couple of times (on other things).

On Tue, Sep 3, 2013 at 5:40 PM, Michael Hallock notifications@github.comwrote:

Opposite actually. That works fine (And is what I'm using as a workaround
for now). ReSharper (Latest) refuses to recognize the LINQ expression
version.


Reply to this email directly or view it on GitHubhttps://github.com/AutoMapper/AutoMapper/issues/381#issuecomment-23753041
.

@i8beef

This comment has been minimized.

Show comment
Hide comment
@i8beef

i8beef Sep 4, 2013

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.

i8beef commented Sep 4, 2013

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.

@Fa-C-Shus

This comment has been minimized.

Show comment
Hide comment
@Fa-C-Shus

Fa-C-Shus Sep 20, 2013

I agree with i8Beef's experience. On all our dev workstations it also objects to the dest being linq.
Who is really the responsible party? AutoMapper or ReSharper?

I agree with i8Beef's experience. On all our dev workstations it also objects to the dest being linq.
Who is really the responsible party? AutoMapper or ReSharper?

@jbogard

This comment has been minimized.

Show comment
Hide comment
@jbogard

jbogard Sep 22, 2013

Member

Not sure, I'm not seeing this, VS2012 and R# 8.0.1

Member

jbogard commented Sep 22, 2013

Not sure, I'm not seeing this, VS2012 and R# 8.0.1

@i8beef

This comment has been minimized.

Show comment
Hide comment
@i8beef

i8beef Sep 23, 2013

We are on visual studio 2010, working on a .NET 4.0 MVC 3 project if it helps.

i8beef commented Sep 23, 2013

We are on visual studio 2010, working on a .NET 4.0 MVC 3 project if it helps.

@Fa-C-Shus

This comment has been minimized.

Show comment
Hide comment
@Fa-C-Shus

Fa-C-Shus Sep 23, 2013

Visual Studio 2012/Resharper seems to play nice with ForMember

My 2010 Ultimate/Resharper is angered by ForMember

On 9/22/2013 8:56 PM, Michael Hallock wrote:

We are on visual studio 2010, working on a .NET 4.0 MVC 3 project if
it helps.


Reply to this email directly or view it on GitHub
#381 (comment).

Visual Studio 2012/Resharper seems to play nice with ForMember

My 2010 Ultimate/Resharper is angered by ForMember

On 9/22/2013 8:56 PM, Michael Hallock wrote:

We are on visual studio 2010, working on a .NET 4.0 MVC 3 project if
it helps.


Reply to this email directly or view it on GitHub
#381 (comment).

@jbogard

This comment has been minimized.

Show comment
Hide comment
@jbogard

jbogard Sep 23, 2013

Member

Nuts, I don't have VS 2010 installed :P

I guess it would be a little out of place to say, just upgrade to VS 2012?

On Sun, Sep 22, 2013 at 10:37 PM, Paul Erickson notifications@github.comwrote:

Visual Studio 2012/Resharper seems to play nice with ForMember

My 2010 Ultimate/Resharper is angered by ForMember

On 9/22/2013 8:56 PM, Michael Hallock wrote:

We are on visual studio 2010, working on a .NET 4.0 MVC 3 project if
it helps.


Reply to this email directly or view it on GitHub
<
#381 (comment)
.


Reply to this email directly or view it on GitHubhttps://github.com/AutoMapper/AutoMapper/issues/381#issuecomment-24897561
.

Member

jbogard commented Sep 23, 2013

Nuts, I don't have VS 2010 installed :P

I guess it would be a little out of place to say, just upgrade to VS 2012?

On Sun, Sep 22, 2013 at 10:37 PM, Paul Erickson notifications@github.comwrote:

Visual Studio 2012/Resharper seems to play nice with ForMember

My 2010 Ultimate/Resharper is angered by ForMember

On 9/22/2013 8:56 PM, Michael Hallock wrote:

We are on visual studio 2010, working on a .NET 4.0 MVC 3 project if
it helps.


Reply to this email directly or view it on GitHub
<
#381 (comment)
.


Reply to this email directly or view it on GitHubhttps://github.com/AutoMapper/AutoMapper/issues/381#issuecomment-24897561
.

@bryancrosby

This comment has been minimized.

Show comment
Hide comment
@bryancrosby

bryancrosby Oct 16, 2013

I am also having the same issue. R# 8.0.1000.2286 2013-09-05T16:18:00 and Visual Studio 2010 Premium (10.0.40219.1 SP1Rel). Has anyone been able to resolve this or know of any open issues @ JetBrains?

I am also having the same issue. R# 8.0.1000.2286 2013-09-05T16:18:00 and Visual Studio 2010 Premium (10.0.40219.1 SP1Rel). Has anyone been able to resolve this or know of any open issues @ JetBrains?

@zebenir

This comment has been minimized.

Show comment
Hide comment
@zebenir

zebenir Nov 15, 2013

I agree with the above... VS 2010 Ultimate with Resharper... I can't even get the member names when I type
.ForMember(d => d.

zebenir commented Nov 15, 2013

I agree with the above... VS 2010 Ultimate with Resharper... I can't even get the member names when I type
.ForMember(d => d.

@xlegalles

This comment has been minimized.

Show comment
Hide comment
@xlegalles

xlegalles Dec 9, 2013

Same problem: VS2010 Pro 10.0.40219/R# 8.0.2000.2660

Same problem: VS2010 Pro 10.0.40219/R# 8.0.2000.2660

@ishimmings

This comment has been minimized.

Show comment
Hide comment
@ishimmings

ishimmings Dec 12, 2013

Me too. I wrote a similar method declaration with an Expression as a parameter and it worked fine. Not quite sure what that indicates...

Unfortunately at this client we're stuck with VS2010 for the foreseeable.

Me too. I wrote a similar method declaration with an Expression as a parameter and it worked fine. Not quite sure what that indicates...

Unfortunately at this client we're stuck with VS2010 for the foreseeable.

@dimkaspb

This comment has been minimized.

Show comment
Hide comment
@dimkaspb

dimkaspb Feb 17, 2014

I am seeing the same issue with VS2012 Professional 11.0.50727.1 and R# 8.1.23.546

I am seeing the same issue with VS2012 Professional 11.0.50727.1 and R# 8.1.23.546

@jbogard

This comment has been minimized.

Show comment
Hide comment
@jbogard

jbogard Feb 18, 2014

Member

I'm not seeing it with VS2012 Pro 11.0.61030.00 Update 4, R# 8.1.23.546 and
NOT seeing it. What kind of configuration options are you using? ForMember
works fine.

On Mon, Feb 17, 2014 at 5:18 PM, dimkaspb notifications@github.com wrote:

I am seeing the same issue with VS2012 Professional 11.0.50727.1 and R#
8.1.23.546

Reply to this email directly or view it on GitHubhttps://github.com/AutoMapper/AutoMapper/issues/381#issuecomment-35332283
.

Member

jbogard commented Feb 18, 2014

I'm not seeing it with VS2012 Pro 11.0.61030.00 Update 4, R# 8.1.23.546 and
NOT seeing it. What kind of configuration options are you using? ForMember
works fine.

On Mon, Feb 17, 2014 at 5:18 PM, dimkaspb notifications@github.com wrote:

I am seeing the same issue with VS2012 Professional 11.0.50727.1 and R#
8.1.23.546

Reply to this email directly or view it on GitHubhttps://github.com/AutoMapper/AutoMapper/issues/381#issuecomment-35332283
.

@dimkaspb

This comment has been minimized.

Show comment
Hide comment
@dimkaspb

dimkaspb Feb 18, 2014

Fixed for now. Here is what I did:

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

Fixed for now. Here is what I did:

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

This comment has been minimized.

Show comment
Hide comment
@hazzik

hazzik Feb 18, 2014

Contributor

So then it should be reported to JetBrains, as it seems that R# caches
assemblies only by name and version ( as I understand now assembly version
remains the same )

Contributor

hazzik commented Feb 18, 2014

So then it should be reported to JetBrains, as it seems that R# caches
assemblies only by name and version ( as I understand now assembly version
remains the same )

@dimkaspb

This comment has been minimized.

Show comment
Hide comment
@dimkaspb

dimkaspb Feb 18, 2014

I have opened a support ticket with JetBrains. Let's see what they say about it...

I have opened a support ticket with JetBrains. Let's see what they say about it...

@jbogard

This comment has been minimized.

Show comment
Hide comment
@jbogard

jbogard Mar 12, 2014

Member

@dimkaspb any word on the support ticket? Do you have a link to it?

Member

jbogard commented Mar 12, 2014

@dimkaspb any word on the support ticket? Do you have a link to it?

@mgrogan01

This comment has been minimized.

Show comment
Hide comment
@mgrogan01

mgrogan01 Mar 23, 2014

I solved this issue by upgrading to the latest version of ReSharper if anyone still has this problem. (VS2012 11.0.61030.00 update 4 -- Resharper 8.2.0.2160)

I solved this issue by upgrading to the latest version of ReSharper if anyone still has this problem. (VS2012 11.0.61030.00 update 4 -- Resharper 8.2.0.2160)

@moconnor33

This comment has been minimized.

Show comment
Hide comment
@moconnor33

moconnor33 Mar 25, 2014

latest version of Resharper did not work for me. - Resharper 8.2.0.2160. But i'm a VS version behind mgrogan01 - i have vs professional 2012 11.0.50727.1

latest version of Resharper did not work for me. - Resharper 8.2.0.2160. But i'm a VS version behind mgrogan01 - i have vs professional 2012 11.0.50727.1

@Roly67

This comment has been minimized.

Show comment
Hide comment
@Roly67

Roly67 Apr 15, 2014

Still getting this in JetBrains ReSharper 8.2 Full Edition
Build 8.2.0.2160 on 2014-03-20T18:53:08 with VS 2013

Have raised a ticket #8216 with Jetbrains.

Will advise...

Roly67 commented Apr 15, 2014

Still getting this in JetBrains ReSharper 8.2 Full Edition
Build 8.2.0.2160 on 2014-03-20T18:53:08 with VS 2013

Have raised a ticket #8216 with Jetbrains.

Will advise...

@jbogard

This comment has been minimized.

Show comment
Hide comment
@jbogard

jbogard Apr 15, 2014

Member

Do you have a link? Is that on their YouTrack?

On Tue, Apr 15, 2014 at 10:06 AM, Roly67 notifications@github.com wrote:

Still getting this in JetBrains ReSharper 8.2 Full Edition
Build 8.2.0.2160 on 2014-03-20T18:53:08 with VS 2013

Have raised a ticket #8216 with Jetbrains.

Will advise...


Reply to this email directly or view it on GitHubhttps://github.com/AutoMapper/AutoMapper/issues/381#issuecomment-40492842
.

Member

jbogard commented Apr 15, 2014

Do you have a link? Is that on their YouTrack?

On Tue, Apr 15, 2014 at 10:06 AM, Roly67 notifications@github.com wrote:

Still getting this in JetBrains ReSharper 8.2 Full Edition
Build 8.2.0.2160 on 2014-03-20T18:53:08 with VS 2013

Have raised a ticket #8216 with Jetbrains.

Will advise...


Reply to this email directly or view it on GitHubhttps://github.com/AutoMapper/AutoMapper/issues/381#issuecomment-40492842
.

@Roly67

This comment has been minimized.

Show comment
Hide comment
@Roly67

Roly67 Apr 16, 2014

Here's the response I got from Jetbrains.

It's obviously a tricky one to reproduce!

Not sure where to go from here with Jetbrains.

My sample project to reproduce the error is @

https://dl.dropboxusercontent.com/u/32051584/ResharperAutoMapperFault.zip

There's definitely something strange going on...


Alexander Kurakin (JetBrains ReSharper Support)

Apr 16 15:54

Hello

Thank you for the report.

I checked it in ReSharper 8.2.1 private build and did not notice any error there - http://screencast.com/t/zfd67exF.

So, could you please download this private development build [url deleted].msi, clean ReSharper caches http://resharper-support.jetbrains.com/entries/23853492-ReSharper-stopped-working-for-a-single-specific-solution and check the issue again.

Thank you.

Alexander Kurakin
Support Engineer
JetBrains
http://www.jetbrains.com
"Develop with pleasure!"

Roly67 commented Apr 16, 2014

Here's the response I got from Jetbrains.

It's obviously a tricky one to reproduce!

Not sure where to go from here with Jetbrains.

My sample project to reproduce the error is @

https://dl.dropboxusercontent.com/u/32051584/ResharperAutoMapperFault.zip

There's definitely something strange going on...


Alexander Kurakin (JetBrains ReSharper Support)

Apr 16 15:54

Hello

Thank you for the report.

I checked it in ReSharper 8.2.1 private build and did not notice any error there - http://screencast.com/t/zfd67exF.

So, could you please download this private development build [url deleted].msi, clean ReSharper caches http://resharper-support.jetbrains.com/entries/23853492-ReSharper-stopped-working-for-a-single-specific-solution and check the issue again.

Thank you.

Alexander Kurakin
Support Engineer
JetBrains
http://www.jetbrains.com
"Develop with pleasure!"

@jbogard

This comment has been minimized.

Show comment
Hide comment
@jbogard

jbogard Apr 16, 2014

Member

@Roly67 did you try the suggestion here? #381 (comment)

Member

jbogard commented Apr 16, 2014

@Roly67 did you try the suggestion here? #381 (comment)

@Roly67

This comment has been minimized.

Show comment
Hide comment
@Roly67

Roly67 Apr 16, 2014

@jbogard

Yes, I tried clearing caches, disabling R#, uninstalling in the exact same sequence. Same result...

Roly67 commented Apr 16, 2014

@jbogard

Yes, I tried clearing caches, disabling R#, uninstalling in the exact same sequence. Same result...

@David-Brabant

This comment has been minimized.

Show comment
Hide comment
@David-Brabant

David-Brabant Apr 16, 2014

@jbogard
Did try the suggestion. Doesn't work.

@jbogard
Did try the suggestion. Doesn't work.

@jbogard

This comment has been minimized.

Show comment
Hide comment
Member

jbogard commented Apr 16, 2014

image

@Roly67

This comment has been minimized.

Show comment
Hide comment
@Roly67

Roly67 Apr 16, 2014

@jbogard

I guess we're at the clutching at straws stage then:)

Yes, just done a re-start. Same...

Roly67 commented Apr 16, 2014

@jbogard

I guess we're at the clutching at straws stage then:)

Yes, just done a re-start. Same...

@martinjt

This comment has been minimized.

Show comment
Hide comment
@martinjt

martinjt Apr 16, 2014

We just had the same problem, unloading the project then reloading it worked for us...

Maybe that forces resharper to do something in the background?

We just had the same problem, unloading the project then reloading it worked for us...

Maybe that forces resharper to do something in the background?

@gabrielfuller

This comment has been minimized.

Show comment
Hide comment
@gabrielfuller

gabrielfuller Apr 16, 2014

I tried unloading then reloading the project as well and that worked. How strange.

I tried unloading then reloading the project as well and that worked. How strange.

@David-Brabant

This comment has been minimized.

Show comment
Hide comment
@David-Brabant

David-Brabant Apr 16, 2014

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.

@dimkaspb

This comment has been minimized.

Show comment
Hide comment
@dimkaspb

dimkaspb Apr 16, 2014

@jbogard Sorry, took a while to respond here...

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!

I haven't seen this problem come back yet.

@jbogard Sorry, took a while to respond here...

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!

I haven't seen this problem come back yet.

@guillenix

This comment has been minimized.

Show comment
Hide comment
@guillenix

guillenix Apr 16, 2014

It is happening to me with Version 3.2
I downgraded to 3.0 and is working well
For me will even not compile at all

It is happening to me with Version 3.2
I downgraded to 3.0 and is working well
For me will even not compile at all

@jbogard

This comment has been minimized.

Show comment
Hide comment
@jbogard

jbogard Apr 16, 2014

Member

Compiling is a completely different story. Can you open a new issue with
your compiler error?

On Wed, Apr 16, 2014 at 1:35 PM, guillenix notifications@github.com wrote:

It is happening to me with Version 3.2
I downgraded to 3.0 and is working well
For me will even not compile at all


Reply to this email directly or view it on GitHubhttps://github.com/AutoMapper/AutoMapper/issues/381#issuecomment-40635379
.

Member

jbogard commented Apr 16, 2014

Compiling is a completely different story. Can you open a new issue with
your compiler error?

On Wed, Apr 16, 2014 at 1:35 PM, guillenix notifications@github.com wrote:

It is happening to me with Version 3.2
I downgraded to 3.0 and is working well
For me will even not compile at all


Reply to this email directly or view it on GitHubhttps://github.com/AutoMapper/AutoMapper/issues/381#issuecomment-40635379
.

@guillenix

This comment has been minimized.

Show comment
Hide comment
@guillenix

guillenix Apr 16, 2014

yup, i will downgrade and paste all the info

yup, i will downgrade and paste all the info

@guillenix

This comment has been minimized.

Show comment
Hide comment
@guillenix

guillenix Apr 16, 2014

Done! I broke it so you can view the error

#502

#502

Done! I broke it so you can view the error

#502

#502

@hazzik

This comment has been minimized.

Show comment
Hide comment
@hazzik

hazzik Apr 16, 2014

Contributor

Tried everything suggested - does not work:(

Contributor

hazzik commented Apr 16, 2014

Tried everything suggested - does not work:(

@Roly67

This comment has been minimized.

Show comment
Hide comment
@Roly67

Roly67 Apr 17, 2014

Ok, I've done some more investigation.

Out of 4 workstations with very similar configurations, we see this happening on 3. I'm not sure what it is about the fourth workstation that makes it work (I wish I knew!).

Tried everything recommended in this thread (including unloading / reloading project) as well as recommendations from my JetBrains ticket (see above) but nothing works.

The next phase of investigation was to revert AutoMapper to a previous version. Results as follows:

-v3.0.0 - works fine (i.e. no squigly lines in R#)
-Tried all CI versions from 3.0.0 upwards to find the version that breaks R# and found it's version 3.2.0-ci1021 that breaks R#.

Perhaps analysing the diffs between 3.2.0-ci1017 and 3.2.0-ci1021 will provide a further clue to this mystery?

Roly67 commented Apr 17, 2014

Ok, I've done some more investigation.

Out of 4 workstations with very similar configurations, we see this happening on 3. I'm not sure what it is about the fourth workstation that makes it work (I wish I knew!).

Tried everything recommended in this thread (including unloading / reloading project) as well as recommendations from my JetBrains ticket (see above) but nothing works.

The next phase of investigation was to revert AutoMapper to a previous version. Results as follows:

-v3.0.0 - works fine (i.e. no squigly lines in R#)
-Tried all CI versions from 3.0.0 upwards to find the version that breaks R# and found it's version 3.2.0-ci1021 that breaks R#.

Perhaps analysing the diffs between 3.2.0-ci1017 and 3.2.0-ci1021 will provide a further clue to this mystery?

@David-Brabant

This comment has been minimized.

Show comment
Hide comment
@David-Brabant

David-Brabant Apr 17, 2014

Reverted to 3.1.1 and things work perfectly.

Reverted to 3.1.1 and things work perfectly.

@Roly67

This comment has been minimized.

Show comment
Hide comment
@Roly67

Roly67 Apr 17, 2014

@jbogard

Getting closer in this investigation now;)

Have downloaded the AutoMapper source code and, using version control, have identified the source of the problem.

There is what appears to be an environmental related fault introduced between the following commits:

Trying to compile the 4th April build yields the following errors:

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.

Roly67 commented Apr 17, 2014

@jbogard

Getting closer in this investigation now;)

Have downloaded the AutoMapper source code and, using version control, have identified the source of the problem.

There is what appears to be an environmental related fault introduced between the following commits:

Trying to compile the 4th April build yields the following errors:

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.

@David-Brabant

This comment has been minimized.

Show comment
Hide comment
@David-Brabant

David-Brabant Apr 17, 2014

@Roly67 I confirm that I don't have the .NET portable SDK on my machine. Thanks for your investigations (and thanks for AutoMapper too :-) )

@Roly67 I confirm that I don't have the .NET portable SDK on my machine. Thanks for your investigations (and thanks for AutoMapper too :-) )

@bcronje

This comment has been minimized.

Show comment
Hide comment
@bcronje

bcronje Apr 17, 2014

Contributor

I'm also having this issue. VS 2013 with Resharper 8.2. Tried everything including uninstalling and re-installing Resharper. Hopefully @Roly67 comment above about the .NETPortable leads to a fix.

Contributor

bcronje commented Apr 17, 2014

I'm also having this issue. VS 2013 with Resharper 8.2. Tried everything including uninstalling and re-installing Resharper. Hopefully @Roly67 comment above about the .NETPortable leads to a fix.

@kampilan

This comment has been minimized.

Show comment
Hide comment
@kampilan

kampilan Apr 17, 2014

Nothing worked for my case (VS2013 latest Resharper). I reverted to 3.1.1 and all is fine

Nothing worked for my case (VS2013 latest Resharper). I reverted to 3.1.1 and all is fine

@devshorts

This comment has been minimized.

Show comment
Hide comment
@devshorts

devshorts Apr 21, 2014

Chiming in here, unloading and reloading the project also worked for me. I originally deleted the R# solution cache but it didn't make a difference.

Chiming in here, unloading and reloading the project also worked for me. I originally deleted the R# solution cache but it didn't make a difference.

@bcronje

This comment has been minimized.

Show comment
Hide comment
@bcronje

bcronje Apr 21, 2014

Contributor

Unloading and reloading did not work for me. Reverted back to 3.1.1 and all working again.

Contributor

bcronje commented Apr 21, 2014

Unloading and reloading did not work for me. Reverted back to 3.1.1 and all working again.

@jbogard

This comment has been minimized.

Show comment
Hide comment
@David-Brabant

This comment has been minimized.

Show comment
Hide comment
@David-Brabant

David-Brabant Apr 24, 2014

Works for me. Thanks, Jimmy.

Works for me. Thanks, Jimmy.

@Roly67

This comment has been minimized.

Show comment
Hide comment
@Roly67

Roly67 Apr 24, 2014

Yes, this has fixed it.

Thanks Jimmy...

Roly67 commented Apr 24, 2014

Yes, this has fixed it.

Thanks Jimmy...

@AndreasBeyer

This comment has been minimized.

Show comment
Hide comment
@AndreasBeyer

AndreasBeyer Apr 24, 2014

Perfect. Works for me also. Thanks 👍

Perfect. Works for me also. Thanks 👍

@jbogard jbogard added this to the 3.2.1 milestone Apr 24, 2014

@jbogard jbogard added the Bug label Apr 24, 2014

@jbogard jbogard changed the title from ForMember angering ReSharper? to ForMember angering ReSharper? - Non-existing PCL profile on client machine causing compile/R# errors Apr 24, 2014

@jbogard jbogard closed this Apr 24, 2014

@danielmoore

This comment has been minimized.

Show comment
Hide comment
@danielmoore

danielmoore Jul 3, 2014

This still seems to be an issue in VS2010, but the issue is on Jetbrain's side. Here's the relevant bug: http://youtrack.jetbrains.com/issue/RSRP-417480

This still seems to be an issue in VS2010, but the issue is on Jetbrain's side. Here's the relevant bug: http://youtrack.jetbrains.com/issue/RSRP-417480

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment