Exception on startup : SCR #1115: Object reference not set to an instance of an object. (VSProjectManager.Init)

Hi there,

this exception on startup has been experienced by so many users that I
decided to post this
into the newsgroup. After this exception ReSharper is unable to recognize
changes in VS project
(like adding / removing / renaming files). An observable symptom is that
such files contain a lot of red code.
In build 78 we've made some changes that targeted to fix the problem but it
seems that it still happens for some users.
So, we have a couple of questions:

1) Has the build 78 really fixed this problem for someone? That is, you got
this exception in 77 or earlier builds but
not in 78.

2) If you're still experiencing this problem, please conduct a very simple
experiment. Run VS.NET (you should get this exception
from ReSharper), then disable ReSharper thru Tools->AddIn Manager, and then
enable ReSharper again. Do you get the exception
after enabling ReSharper?

Thanks in advance for your help.

--
Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


15 comments
Comment actions Permalink

I've done what you told on step 2; but as soon as i've activate R#er, i got the same exception :(

btw, i'm not getting any error if newly added classes are remains open; but fails as soon as i've close them :(

0
Comment actions Permalink

Hi,
I did not start getting this error until build 78. I also tried your experiment but it did not work for me either. To get around the problem I disabled resharper, exited VS and removed all resharper caches from my project files. Then, I re-enabled resharper and had it rebuild all its caches. -- This appears to have worked.

0
Comment actions Permalink

Since #80 this exception must have turned into InvalidCastException (with
approximately the same strack trace).
I'd like to ask anyone experiencing this problem : could you please post
into this thread the attributes of the EnvDTE
assembly installed on your machine (assembly version and file attributes).
EnvDTE is typicall found in the Global
Assembly Cache.

"Dmitry Shaporenkov (JetBrains)" <dsha@jetbrains.com> wrote in message
news:c6lgru$l0k$1@is.intellij.net...

Hi there,

>

this exception on startup has been experienced by so many users that I
decided to post this
into the newsgroup. After this exception ReSharper is unable to recognize
changes in VS project
(like adding / removing / renaming files). An observable symptom is that
such files contain a lot of red code.
In build 78 we've made some changes that targeted to fix the problem but

it

seems that it still happens for some users.
So, we have a couple of questions:

>

1) Has the build 78 really fixed this problem for someone? That is, you

got

this exception in 77 or earlier builds but
not in 78.

>

2) If you're still experiencing this problem, please conduct a very simple
experiment. Run VS.NET (you should get this exception
from ReSharper), then disable ReSharper thru Tools->AddIn Manager, and

then

enable ReSharper again. Do you get the exception
after enabling ReSharper?

>

Thanks in advance for your help.

>

--
Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

>
>


0
Comment actions Permalink

"Dmitry Shaporenkov \(JetBrains\)" <dsha@jetbrains.com> wrote:

>Since #80 this exception must have turned into InvalidCastException (with
>approximately the same strack trace).
>I'd like to ask anyone experiencing this problem : could you please post
>into this thread the attributes of the EnvDTE
>assembly installed on your machine (assembly version and file attributes).
>EnvDTE is typicall found in the Global
>Assembly Cache.

7.0.9466.0. 245,760 bytes.
As for attributes, do you mean RO, Hidden, System? If yes, none of them is set.

0
Comment actions Permalink

Predrag, thanks for this info.
Under file attributes I mean file creation time. Could you
please post it as well.

"Predrag Stanar" <reply.to.usenet@nospam.com> wrote in message
news:mhvu90lcaog76gmva7urgbn5fuqrjdctod@4ax.com...

"Dmitry Shaporenkov \(JetBrains\)" <dsha@jetbrains.com> wrote:

>

>Since #80 this exception must have turned into InvalidCastException (with
>approximately the same strack trace).
>I'd like to ask anyone experiencing this problem : could you please post
>into this thread the attributes of the EnvDTE
>assembly installed on your machine (assembly version and file

attributes).

>EnvDTE is typicall found in the Global
>Assembly Cache.

>

7.0.9466.0. 245,760 bytes.
As for attributes, do you mean RO, Hidden, System? If yes, none of them is

set.


0
Comment actions Permalink

Interestingly enough. The version referred to by ReSharper is the following:
7.0.3300.0
245,760 bytes Creation time: 05.16.03

By the way, Predrag, have you the abovementioned version somewhere on your
computer? The suspicious places are VS.NET's Private and PublicAssemblies
folders.

Moreover, we've excluded the EnvDTE from the installation package, because
it seems that it caused problems with VS after uninstallation. Perhaps we
should
try to include it back again...

"Predrag Stanar" <reply.to.usenet@nospam.com> wrote in message
news:mhvu90lcaog76gmva7urgbn5fuqrjdctod@4ax.com...

"Dmitry Shaporenkov \(JetBrains\)" <dsha@jetbrains.com> wrote:

>

>Since #80 this exception must have turned into InvalidCastException (with
>approximately the same strack trace).
>I'd like to ask anyone experiencing this problem : could you please post
>into this thread the attributes of the EnvDTE
>assembly installed on your machine (assembly version and file

attributes).

>EnvDTE is typicall found in the Global
>Assembly Cache.

>

7.0.9466.0. 245,760 bytes.
As for attributes, do you mean RO, Hidden, System? If yes, none of them is

set.


0
Comment actions Permalink

"Dmitry Shaporenkov \(JetBrains\)" <dsha@jetbrains.com> wrote:

>Predrag, thanks for this info.
>Under file attributes I mean file creation time. Could you
>please post it as well.

2003/03/19 2:52 245,760 envdte.dll

0
Comment actions Permalink

"Dmitry Shaporenkov \(JetBrains\)" <dsha@jetbrains.com> wrote:

>Interestingly enough. The version referred to by ReSharper is the following:
>7.0.3300.0
>245,760 bytes Creation time: 05.16.03
>
>By the way, Predrag, have you the abovementioned version somewhere on your
>computer? The suspicious places are VS.NET's Private and PublicAssemblies
>folders.

Yes, it's in GAC.

c:\WINDOWS\assembly\GAC\EnvDTE\7.0.3300.0__b03f5f7f11d50a3a\
2004/05/12 10:18 245,760 envdte.dll

and in

c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\
2003/03/19 2:52 245,760 envdte.dll

Although having different dates they are identical (byte by byte).
And although directory in GAC carries 7.0.3300.0 version, they both have
embedded version of 7.0.9466.0. BTW, it's not only on my work machine this way.
It's on my home PC, as well as on every PC I checked in the office.

0
Comment actions Permalink

Craig Anderson <no_mail@jetbrains.com> wrote:

>Hi,

I did not start getting this error until build 78. I also tried your experiment but it did not work for me either. To get around the problem I disabled resharper, exited VS and removed all resharper caches from my project files. Then, I re-enabled resharper and had it rebuild all its caches. -- This appears to have worked.


I don't think that would solve anything. In fact, I have my Visual Studio set
not to open any project at startup (not even the last one). And I still get this
error.

0
Comment actions Permalink

Predrag,

could you please try to download and install in GAC the 'correct' version of
EnvDTE.dll:
http://download.jetbrains.com/resharper/EnvDTE.zip (it is really zipped).
Does that version
of EnvDTE.dll differ with your version?

"Predrag Stanar" <reply.to.usenet@nospam.com> wrote in message
news:gnj4a0pi71qlhhm8016a5at3siicou78dj@4ax.com...

"Dmitry Shaporenkov \(JetBrains\)" <dsha@jetbrains.com> wrote:

>

>Interestingly enough. The version referred to by ReSharper is the

following:

>7.0.3300.0
>245,760 bytes Creation time: 05.16.03
>
>By the way, Predrag, have you the abovementioned version somewhere on

your

>computer? The suspicious places are VS.NET's Private and PublicAssemblies
>folders.

>

Yes, it's in GAC.

>

c:\WINDOWS\assembly\GAC\EnvDTE\7.0.3300.0__b03f5f7f11d50a3a\
2004/05/12 10:18 245,760 envdte.dll

>

and in

>

c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\
2003/03/19 2:52 245,760 envdte.dll

>

Although having different dates they are identical (byte by byte).
And although directory in GAC carries 7.0.3300.0 version, they both have
embedded version of 7.0.9466.0. BTW, it's not only on my work machine this

way.

It's on my home PC, as well as on every PC I checked in the office.



0
Comment actions Permalink

"Dmitry Shaporenkov \(JetBrains\)" <dsha@jetbrains.com> wrote:

>Predrag,
>
>could you please try to download and install in GAC the 'correct' version of
>EnvDTE.dll:
>http://download.jetbrains.com/resharper/EnvDTE.zip (it is really zipped).
>Does that version
>of EnvDTE.dll differ with your version?

They are identical.

0
Comment actions Permalink

Predrag,

I've just realized that we've misunderstood each other. You are talking
about file version of EnvDTE (that is the NTFS attribute), while I mean
the assembly version (that is a .NET assembly property). Both files are
really
identical.

So it's not a version mismatch that causes this exception. We're looking for
true reason,
plese keep in touch.

"Predrag Stanar" <reply.to.usenet@nospam.com> wrote in message
news:34b7a0l9toc02e6minji0b9rvmae1bjfdh@4ax.com...

"Dmitry Shaporenkov \(JetBrains\)" <dsha@jetbrains.com> wrote:

>

>Predrag,
>
>could you please try to download and install in GAC the 'correct' version

of

>EnvDTE.dll:
>http://download.jetbrains.com/resharper/EnvDTE.zip (it is really zipped).
>Does that version
>of EnvDTE.dll differ with your version?

>

They are identical.



0
Comment actions Permalink

Predrag,

some other simple things to check:

1) Please make sure that the csproj.dll is registered properly on your
machine. It might get unregistered
due to the bug in some previous ReSharper builds or other faulty add-in
installations. Register it by running:

regsvr32.exe "Microsoft Visual Studio .NET 2003\Vc7\vcpackages\csproj.dll"


2) The same for dte.olb You'll need regtlb.exe tool
(http://adconsole.sourceforge.net/files/regtlb.zip). Run it on dte.olb
that can be found at

"Program Files\Common Files\Microsoft Shared\MSEnv\dte.olb"

Please let me know about the results.

"Dmitry Shaporenkov (JetBrains)" <dsha@jetbrains.com> wrote in message
news:c80auc$r5c$1@is.intellij.net...

Predrag,

>

I've just realized that we've misunderstood each other. You are talking
about file version of EnvDTE (that is the NTFS attribute), while I mean
the assembly version (that is a .NET assembly property). Both files are
really
identical.

>

So it's not a version mismatch that causes this exception. We're looking

for

true reason,
plese keep in touch.

>

"Predrag Stanar" <reply.to.usenet@nospam.com> wrote in message
news:34b7a0l9toc02e6minji0b9rvmae1bjfdh@4ax.com...

"Dmitry Shaporenkov \(JetBrains\)" <dsha@jetbrains.com> wrote:

>

>Predrag,
>
>could you please try to download and install in GAC the 'correct'

version

of

>EnvDTE.dll:
>http://download.jetbrains.com/resharper/EnvDTE.zip (it is really

zipped).

>Does that version
>of EnvDTE.dll differ with your version?

>

They are identical.

>
>


0
Comment actions Permalink

"Dmitry Shaporenkov \(JetBrains\)" <dsha@jetbrains.com> wrote:

>Predrag,
>
>some other simple things to check:
>
>1) Please make sure that the csproj.dll is registered properly on your
>machine. It might get unregistered
>due to the bug in some previous ReSharper builds or other faulty add-in
>installations. Register it by running:
>
>> regsvr32.exe "Microsoft Visual Studio .NET 2003\Vc7\vcpackages\csproj.dll"
>
>2) The same for dte.olb You'll need regtlb.exe tool
>(http://adconsole.sourceforge.net/files/regtlb.zip). Run it on dte.olb
>that can be found at
>
>"Program Files\Common Files\Microsoft Shared\MSEnv\dte.olb"
>
>Please let me know about the results.

Done both, and it's OK now. I can't tell you which one actually fixed it since I
didn't try to start Visual Studio after each repair. Thanks.

0
Comment actions Permalink

Thank you for your help, Predrag.
Once it has worked for your, we'll recommend it to other users experiencing
this problem.

"Predrag Stanar" <reply.to.usenet@nospam.com> wrote in message
news:qgj9a0hap751es88c6p6nr4r15ug7tfab2@4ax.com...

"Dmitry Shaporenkov \(JetBrains\)" <dsha@jetbrains.com> wrote:

>

>Predrag,
>
>some other simple things to check:
>
>1) Please make sure that the csproj.dll is registered properly on your
>machine. It might get unregistered
>due to the bug in some previous ReSharper builds or other faulty add-in
>installations. Register it by running:
>
>> regsvr32.exe "Microsoft Visual Studio .NET

2003\Vc7\vcpackages\csproj.dll"

>
>2) The same for dte.olb You'll need regtlb.exe tool
>(http://adconsole.sourceforge.net/files/regtlb.zip). Run it on dte.olb
>that can be found at
>
>"Program Files\Common Files\Microsoft Shared\MSEnv\dte.olb"
>
>Please let me know about the results.

>

Done both, and it's OK now. I can't tell you which one actually fixed it

since I

didn't try to start Visual Studio after each repair. Thanks.



0

Please sign in to leave a comment.