It is the same source code... just copied to my laptop...
You are probably seeing the FxCop rules being run where they aren't run on
your other computer's IDE (pre 2005 or without the Code Analysis turned on
in the project).
Here's an explanation of the issue. Let's say you have a class called foo
with a shared method bar as follows:
Public Class Foo
Public Shared Sub Bar()
'Do Something
End Sub
End Class
Now, lets consider how you call this method. You can not have a calling method
that calls Bar on an instance of Foo as follows:
Public Sub Main()
Dim instance as new Foo
instance.Bar 'This is invalid
End Sub
Instead, you need to call Bar directly without an instance as follows:
Public Sub Main()
Foo.Bar()
End Sub
Sometimes, you can end up with conflicts in namespaces and although you think
you are calling the shared method directly, you are trying to call it from
an instance as follows:
Public Sub Main()
Dim foo as new Foo
foo.Bar() 'Incorrect
MyApp.Foo.Bar() 'Correct assuming MyApp is the namespace for the application.
End Sub
I hope this helps you understand the situation. Typically, this is a relatively
easy oversight to make and luckily fix as well.
Jim Wooley
http://devauthority.com/blogs/jwooley/default.aspx