Errors that aren't errors

What would cause ReSharper to show "2 files with errors" next to the big red circle at the bottom right when there are in fact no errors, and the program compiles, and executes, cleanly with no warnings or errors?

The code in question is underlined in red, with the message "Only assignment, call, increment, decrement and new object expressions can be used as a statement, however, I've verified that it builds and executes cleanly, even on another machine.  On a machine that does not have ReSharper installed, this code is not annotated in any way, and also builds and executes cleanly.

On both machines
Visual Studio 2008 version 9.0.30729.1 SP1
.NET Framework Vesion 3.5 SP1

On the machine with ReSharper
Windows XP SP2
ReSharper 4.1 Full Edition build 4.1.933.3

On the machine without Resharper
Windows XP SP3

Thanks,
Brad

12 comments
Comment actions Permalink

Hello Brad,

Could you please show us the code that triggers the problem in question?
If you could create small self-contained C# code sample which exhibits same
behavior, it would be really awesome. Thanks.

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


BS> What would cause ReSharper to show "2 files with errors" next to the
BS> big red circle at the bottom right when there are in fact no errors,
BS> and the program compiles, and executes, cleanly with no warnings or
BS> errors?
BS>
BS> The code in question is underlined in red, with the message "Only
BS> assignment, call, increment, decrement and new object expressions
BS> can be used as a statement, however, I've verified that it builds
BS> and executes cleanly, even on another machine. On a machine that
BS> does not have ReSharper installed, t
BS>
BS> his code is not annotated in any way, and also builds and executes
BS> cleanly.
BS>
BS> On both machines
BS> Visual Studio 2008 version 9.0.30729.1 SP1
BS> NET Framework Vesion 3.5 SP1
BS> On the machine with ReSharper
BS> Windows XP SP2
BS> ReSharper 4.1 Full Edition build 4.1.933.3
BS> On the machine without Resharper
BS> Windows XP SP3
BS> Thanks,
BS> Brad
BS> ---
BS> Original message URL:
BS> http://www.jetbrains.net/devnet/message/5235346#5235346


0
Comment actions Permalink

Hello Brad,

Also, be sure to upgrade to ReSharper 4.5 (free upgrade for owners of 4.x).
You can Release Candidate now, or wait for release bits.

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


BS> What would cause ReSharper to show "2 files with errors" next to the
BS> big red circle at the bottom right when there are in fact no errors,
BS> and the program compiles, and executes, cleanly with no warnings or
BS> errors?
BS>
BS> The code in question is underlined in red, with the message "Only
BS> assignment, call, increment, decrement and new object expressions
BS> can be used as a statement, however, I've verified that it builds
BS> and executes cleanly, even on another machine. On a machine that
BS> does not have ReSharper installed, t
BS>
BS> his code is not annotated in any way, and also builds and executes
BS> cleanly.
BS>
BS> On both machines
BS> Visual Studio 2008 version 9.0.30729.1 SP1
BS> NET Framework Vesion 3.5 SP1
BS> On the machine with ReSharper
BS> Windows XP SP2
BS> ReSharper 4.1 Full Edition build 4.1.933.3
BS> On the machine without Resharper
BS> Windows XP SP3
BS> Thanks,
BS> Brad
BS> ---
BS> Original message URL:
BS> http://www.jetbrains.net/devnet/message/5235346#5235346


0
Comment actions Permalink

I'm using a third part mocking library called Moq (though I want to repeat that the code actually compiles and executes both with and without ReSharper installed, and only shows as erroneous when ReSharper is installed.  I do understand that this doesn't necessarily mean that ReSharper is soley responsible for the problem), version 3.0.308.2, available at http://code.google.com/p/moq/.

using Moq;

namespace SomeNamespace {

    interface Interface1 {
        string someProperty { get; set; }
    }


    public class StandaloneTest {

        public void SomeMethod()
        {
            Mock<Interface1> mockInterface1 = new Mock<Interface1>();
            mockInterface1.VerifySet(m => m.someProperty);
        }
    }
}


In this example, the "m.SomeProperty" is highlight as an error.

Thanks,
/bs

0
Comment actions Permalink

orangy wrote:

Hello Brad,


Also, be sure to upgrade to ReSharper 4.5 (free upgrade for owners of 4.x).
You can Release Candidate now, or wait for release bits.


Unfortunately, I'm not allowed to do that yet.

I can give it a shot when I get home, but I would have to use a trial version there, if that makes any difference.

/bs

0
Comment actions Permalink

Hello,

As far as I know it is fixed in ReSharper 4.5. Please try it when you can.

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


IR> I'm using a third part mocking library called Moq (though I want to
IR> repeat that the code actually compiles and executes both with and
IR> without ReSharper installed, and only shows as erroneous when
IR> ReSharper is installed. I do understand that this doesn't
IR> necessarily mean that ReSharper is soley re
IR>
IR> sponsible for the problem), version 3.0.308.2, available at
IR> http://code.google.com/p/moq/.
IR>
IR> using Moq;
IR>
IR> namespace SomeNamespace {
IR>
IR> interface Interface1 {
IR> string someProperty { get; set; }
IR> }
IR> public class StandaloneTest {
IR>
IR> public void SomeMethod()
IR> {
IR> Mock mockInterface1 = new IR> Mock(); IR> mockInterface1.VerifySet(m => m.someProperty); IR> } IR> } IR> } IR> In this example, the "m.SomeProperty" is highlight as an error. IR> IR> Thanks, IR> /bs IR> --- IR> Original message URL: IR>]]> http://www.jetbrains.net/devnet/message/5235368#5235368


0
Comment actions Permalink

As far as I know it is fixed in ReSharper 4.5. Please try it when you can.


I'll check it out then.

Thanks.

/bs

0
Comment actions Permalink

The problem appears to be non-existent with version 4.5.

Thanks,

/bs

0
Comment actions Permalink

Hi

Sorry to re-open thread, but I installed ReSharper 4.5.1 and I am still having this problem. It keeks on saying that it can not resolve symbol Mock (with red font). Like with Brad, my code builds and executes, but I keep getting these errors on the ReSharper tab. Let me know what I can do to help to find the problem. Thanks!

Best regards,
John

0
Comment actions Permalink

Please could you check the latest ReSharper 5.0 EAP builds? We've fixed a number of issues with Mock there

0
Comment actions Permalink

Hi Eigene,

thanks for the response. I downloaded the version 5.0 ans installed it. I am still having the same issue, it does not recognize the Moq assembly and tags it has an error. Is there some configuration that I need to twick or settings? Is there any data that I can send you to better trouble shot this issue? Thanks!

Best regards,
John

0
Comment actions Permalink

Hello,

I couldn't reproduce unresolved symbols with Moq library in the latest nightly of R# 5.0. I have tried to create a simple class library which is uses Moq assembly
and also tried to open and analyze source code of Moq project.
If you could create small code sample which exhibits wrong behavior, it would be really useful. Send it to Kirill.Falk@jetbrains.com
Thanks in advance!


Kirill Falk
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink


Hi Kirill,

Sorry for the delay, but I've been having problems with my Visual Studio. After I installed ReSharper 5.0, I was not able to open the properties windows of my projects. I had to put back a HD image with my old VS with ReSharper 4.1. Then I tried to uninstall 4.1,but it still keeps on showing on the VS Flash window. The same thing happened when I previously installed 4.5, the version 4.1 kept on showing instead of 4.1. I am afraid that there is some residence from 4.1 that might me causing this error. Is their a way to remove completely version 4.1 and install 4.5 from ground zero? Thanks!

John

0

Please sign in to leave a comment.