Class Libraries not recognised with code highlighting
Hi All,
I'm glad IntelliJ have finally released this add-in for VS NET 2003 -
I'm a new user of C#, and Visual Studio IDE has been driving me nuts (I
usually program in Java and I already use IDEA, so I knew what I was
missing ... :) )
Anyway, I've struck a minor problem which I hope isn't a bug (I'll
report it in tracker the if anyone thinks that it is).
The add-in seems to work (more or less) ok, but with code highlighting
turned on, every symbol/method which is in a Class Library shows up in
red, meaning Ctrl+B (where applicable) can't jump to the source in my
own class libraries, and of course it doesn't recognise methods/symbol
names within those classes.
My entire solution compiles ok, so I don't think any paths are
incorrect. I'm still a learner when it comes to the Visual Studio IDE,
so can anyone tell me what I've got wrong?
Thanks.
--
___________________________________________________________________
Corey Yeatman 1st Floor, 66 Mandeville Street
Fifth Web Limited Christchurch
mailto:corey.yeatman@fifthweb.net Phone: +64-3-962-2751
Please sign in to leave a comment.
Hi Corey,
"Corey Yeatman" <corey.yeatman@fifthweb.net> wrote in message
news:c0osql$m5n$1@is.intellij.net...
>
>
>
>
>
Could you please outline the structure of your solution? In particular, it
is important for us
to know how your class libraries are referenced in your projects. That is,
if you have a Class Library
project and an application project, does the latter reference the former
thru an assembly reference or thru a project
reference?
Thanks in advance.
--
Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
I saw the same thing when i first opened my solution after installing
the plugin. Resharper was unable to recognize any class whether it was
in the current project, or a referenced assembly. I restarted Visual
Studio, and everything has worked great ever since.
I have five assembly references from other projects, but no other
project references.
I suppose this should go in tracker, if it's not already there...
--dfong
Dmitry Shaporenkov(JetBrains) wrote:
>>The add-in seems to work (more or less) ok, but with code highlighting
>>turned on, every symbol/method which is in a Class Library shows up in
>>red, meaning Ctrl+B (where applicable) can't jump to the source in my
>>own class libraries, and of course it doesn't recognise methods/symbol
>>names within those classes.
>>
>>
>>My entire solution compiles ok, so I don't think any paths are
>>incorrect. I'm still a learner when it comes to the Visual Studio IDE,
>>so can anyone tell me what I've got wrong?
>>
>>
Hi Dmitry,
Thanks for your reply.
In my solution, I have 4 projects: a WinForm application project, and 3 class library projects, one
of which is a windows control library (not sure if that makes any difference).
The WinForm app refers to the Libraries via a project reference (i.e., I've right-clicked the
'References' folder under the application, and chosen 'Add Reference ...' to add a reference to the
class library from the 'Projects' tab in the Window which pops up). I'm not quite sure what you
mean by an 'assembly reference'?
I've found that every 'using' reference in my source files appears in red, including references to
the 'System' libraries (System, System.Xml, System.Windows.Forms, etc.), so it's not just my
libraries which it can't see the methods/symbols for.
I've also noticed that CtrlN doesn't work for finding a class file, but CtrlShift+N shows all
files including class files, when a filename is entered. This is probably related to the problem
I'm having.
The debug console actually throws up the following when Visual Studio is started up - maybe this is
a cause of it? (I expect some of this is logged in the Tracker module already):
======================
System.InvalidCastException: QueryInterface for interface EnvDTE._DTE failed.
at EnvDTE._DTE.get_Solution()
at ProjectModel.VS.VSSolution.get_SolutionFilePath() in
C:\temp\tmp3D86.tmp\src\Services\project\vsImpl\VSSolution.cs:line 90
System.InvalidCastException: QueryInterface for interface EnvDTE._DTE failed.
at EnvDTE._DTE.get_MainWindow()
at Shell.VS.VSShell.GetMainWindow() in
C:\temp\tmp3D86.tmp\src\Services\shell\vsImpl\VSShell.cs:line 521
at Util.Logger.LogException(Exception e) in C:\temp\tmp3D86.tmp\src\Services\util\Logger.cs:line 188
at ProjectModel.VS.VSSolution.get_SolutionFilePath() in
C:\temp\tmp3D86.tmp\src\Services\project\vsImpl\VSSolution.cs:line 96
at ProjectModel.SolutionPersistenceHandler.get_PersistenceDirectoryName() in
C:\temp\tmp3D86.tmp\src\Services\project\SolutionPersistenceHandler.cs:line 310
at ProjectModel.SolutionPersistenceHandler.LoadPersistentData() in C:\temp\tm
p3D86.tmp\src\Services\project\SolutionPersistenceHandler.cs:line 173
System.InvalidCastException: QueryInterface for interface EnvDTE._DTE failed.
at EnvDTE._DTE.get_MainWindow()
at Shell.VS.VSShell.GetMainWindow() in
C:\temp\tmp3D86.tmp\src\Services\shell\vsImpl\VSShell.cs:line 521
at Util.Logger.LogException(Exception e) in C:\temp\tmp3D86.tmp\src\Services\util\Logger.cs:line 188
at ProjectModel.SolutionPersistenceHandler.LoadPersistentData() in
C:\temp\tmp3D86.tmp\src\Services\project\SolutionPersistenceHandler.cs:line 236
at ProjectModel.SolutionPersistenceHandler.LoadPersistentData(ISolution solutionBase) in
C:\temp\tmp3D86.tmp\src\Services\project\SolutionPersistenceHandler.cs:line 22
at ProjectModel.Impl.StartupSolutionVisitor.VisitSolution(ISolution solution) in
C:\temp\tmp3D86.tmp\src\Services\project\impl\SolutionVisitor.cs:line 93
at ProjectModel.Impl.SolutionBase.Accept(ProjectVisitor visitor) in
C:\temp\tmp3D86.tmp\src\Services\project\impl\SolutionBase.cs:line 50
at ProjectModel.Impl.VisitSolutionAction.Run() in
C:\temp\tmp3D86.tmp\src\Services\project\impl\SolutionVisitor.cs:line 25
System.InvalidCastException: QueryInterface for interface EnvDTE._DTE failed.
at EnvDTE._DTE.get_MainWindow()
at Shell.VS.VSShell.GetMainWindow() in
C:\temp\tmp3D86.tmp\src\Services\shell\vsImpl\VSShell.cs:line 521
at Util.Logger.LogException(Exception e) in C:\temp\tmp3D86.tmp\src\Services\util\Logger.cs:line 188
at ProjectModel.Impl.VisitSolutionAction.Run() in
C:\temp\tmp3D86.tmp\src\Services\project\impl\SolutionVisitor.cs:line 29
at ReSharper.ActionExecutor.RunActionWithProgress() in
C:\temp\tmp3D86.tmp\src\ReSharper\ProgressManager.cs:line 82
at ReSharper.ProgressManager.Run(Action action, IProgressIndicator progressIndicator) in
C:\temp\tmp3D86.tmp\src\ReSharper\ProgressManager.cs:line 51
at ReSharper.ActionExecutor.ThreadFunc() in
C:\temp\tmp3D86.tmp\src\ReSharper\ProgressManager.cs:line 92
System.ApplicationException: Event without adder/remover/raiser : ClearCache in type GC
System.ApplicationException: Event without adder/remover/raiser : PropertyChanging in type DataColumn
System.ApplicationException: Event without adder/remover/raiser : CollectionChanging in type
DataColumnCollection
System.ApplicationException: Event without adder/remover/raiser : ColumnPropertyChanged in type
DataColumnCollection
System.ApplicationException: Event without adder/remover/raiser : PropertyChanging in type DataRelation
System.ApplicationException: Event without adder/remover/raiser : CollectionChanging in type
DataRelationCollection
System.ApplicationException: Event without adder/remover/raiser : PropertyChanging in type DataSet
System.ApplicationException: Event without adder/remover/raiser : DataRowCreated in type DataSet
System.ApplicationException: Event without adder/remover/raiser : ClearFunctionCalled in type DataSet
System.ApplicationException: Event without adder/remover/raiser : PropertyChanging in type DataTable
System.ApplicationException: Event without adder/remover/raiser : ValidationEventHandler in type
XmlTextReader
System.ApplicationException: Event without adder/remover/raiser : InternalValidationEventHandler in
type XmlValidatingReader
System.ApplicationException: Event without adder/remover/raiser : RowHeaderClick in type DataGrid
System.ApplicationException: Event without adder/remover/raiser : NodeClick in type DataGrid
======================
I hope this helps. Let me know if you need any more info.
Regards,
Corey.
Dmitry Shaporenkov(JetBrains) wrote:
>>The add-in seems to work (more or less) ok, but with code highlighting
>>turned on, every symbol/method which is in a Class Library shows up in
>>red, meaning Ctrl+B (where applicable) can't jump to the source in my
>>own class libraries, and of course it doesn't recognise methods/symbol
>>names within those classes.
>>
>>
>>My entire solution compiles ok, so I don't think any paths are
>>incorrect. I'm still a learner when it comes to the Visual Studio IDE,
>>so can anyone tell me what I've got wrong?
>>
>>
--
___________________________________________________________________
Corey Yeatman 1st Floor, 66 Mandeville Street
Fifth Web Limited Christchurch
mailto:corey.yeatman@fifthweb.net Phone: +64-3-962-2751
I wish re-starting Visual Studio had solved my problem - unfortunately it didn't ... :(
Regards,
Corey.
don fong wrote:
>> Hi Corey,
>>
>> "Corey Yeatman" <corey.yeatman@fifthweb.net> wrote in message
>> news:c0osql$m5n$1@is.intellij.net...
>>
>>> The add-in seems to work (more or less) ok, but with code highlighting
>>> turned on, every symbol/method which is in a Class Library shows up in
>>> red, meaning Ctrl+B (where applicable) can't jump to the source in my
>>> own class libraries, and of course it doesn't recognise methods/symbol
>>> names within those classes.
>>>
>>>
>>> My entire solution compiles ok, so I don't think any paths are
>>> incorrect. I'm still a learner when it comes to the Visual Studio IDE,
>>> so can anyone tell me what I've got wrong?
>>>
>>>
>>
>>
>> Could you please outline the structure of your solution? In
>> particular, it
>> is important for us
>> to know how your class libraries are referenced in your projects.
>> That is,
>> if you have a Class Library
>> project and an application project, does the latter reference the
>> former
>> thru an assembly reference or thru a project
>> reference?
>>
>> Thanks in advance.
>>
Hi Corey,
thanks for your information. Looking at stack traces you posted,
we've found the possible reason and fixed it (you can check it in the next
EAP build which
is likely to be published tomorrow). It seems that the problem is
that ReSharper was unable to load referenced assemblies (including system),
so
all classes from them are unresolved.
For now, please try to disable using persistent caches (uncheck the check
box in Tools->Options->ReSharper->Solution).
Please let me know if it helps.
"Corey Yeatman" <corey.yeatman@fifthweb.net> wrote in message
news:c0rh39$5i8$1@is.intellij.net...
>
>
>
class library projects, one
difference).
>
I've right-clicked the
to add a reference to the
not quite sure what you
>
including references to
so it's not just my
>
CtrlShiftN shows all
probably related to the problem
>
started up - maybe this is
already):
>
failed.
>
failed.
C:\temp\tmp3D86.tmp\src\Services\util\Logger.cs:line 188
ProjectModel.SolutionPersistenceHandler.get_PersistenceDirectoryName() in
>
C:\temp\tmp3D86.tmp\src\Services\project\SolutionPersistenceHandler.cs:line
310
C:\temp\tm
>
failed.
C:\temp\tmp3D86.tmp\src\Services\util\Logger.cs:line 188
>
C:\temp\tmp3D86.tmp\src\Services\project\SolutionPersistenceHandler.cs:line
236
ProjectModel.SolutionPersistenceHandler.LoadPersistentData(ISolution
solutionBase) in
>
C:\temp\tmp3D86.tmp\src\Services\project\SolutionPersistenceHandler.cs:line
22
solution) in
>
failed.
C:\temp\tmp3D86.tmp\src\Services\util\Logger.cs:line 188
progressIndicator) in
>
ClearCache in type GC
>
PropertyChanging in type DataColumn
>
CollectionChanging in type
>
ColumnPropertyChanged in type
>
PropertyChanging in type DataRelation
>
CollectionChanging in type
>
PropertyChanging in type DataSet
>
DataRowCreated in type DataSet
>
ClearFunctionCalled in type DataSet
>
PropertyChanging in type DataTable
>
ValidationEventHandler in type
>
InternalValidationEventHandler in
>
RowHeaderClick in type DataGrid
>
NodeClick in type DataGrid
>
>
>
>
>
>
>
>
particular, it
is,
former
>
>
>
>
Hi Dmitry,
I've upgraded to build #65, and that seems to have solved the problem. BTW, I had persistent caches
turned off, but loading build #65 seemed to turn them on (?).
Anyway, I'm now very happy as I have CtrlB and CtrlN working! :)
Thanks for your help,
Regards,
Corey.
Dmitry Shaporenkov(JetBrains) wrote:
>>Hi Dmitry,
>>
>>Thanks for your reply.
>>
>>In my solution, I have 4 projects: a WinForm application project, and 3
>>of which is a windows control library (not sure if that makes any
>>The WinForm app refers to the Libraries via a project reference (i.e.,
>>'References' folder under the application, and chosen 'Add Reference ...'
>>class library from the 'Projects' tab in the Window which pops up). I'm
>>mean by an 'assembly reference'?
>>
>>I've found that every 'using' reference in my source files appears in red,
>>the 'System' libraries (System, System.Xml, System.Windows.Forms, etc.),
>>libraries which it can't see the methods/symbols for.
>>
>>I've also noticed that Ctrl+N doesn't work for finding a class file, but
>>files including class files, when a filename is entered. This is
>>I'm having.
>>
>>The debug console actually throws up the following when Visual Studio is
>>a cause of it? (I expect some of this is logged in the Tracker module
>>======================
>>System.InvalidCastException: QueryInterface for interface EnvDTE._DTE
>> at EnvDTE._DTE.get_Solution()
>> at ProjectModel.VS.VSSolution.get_SolutionFilePath() in
>>C:\temp\tmp3D86.tmp\src\Services\project\vsImpl\VSSolution.cs:line 90
>>
>>System.InvalidCastException: QueryInterface for interface EnvDTE._DTE
>> at EnvDTE._DTE.get_MainWindow()
>> at Shell.VS.VSShell.GetMainWindow() in
>>C:\temp\tmp3D86.tmp\src\Services\shell\vsImpl\VSShell.cs:line 521
>> at Util.Logger.LogException(Exception e) in
>> at ProjectModel.VS.VSSolution.get_SolutionFilePath() in
>>C:\temp\tmp3D86.tmp\src\Services\project\vsImpl\VSSolution.cs:line 96
>> at
>> at ProjectModel.SolutionPersistenceHandler.LoadPersistentData() in
>>p3D86.tmp\src\Services\project\SolutionPersistenceHandler.cs:line 173
>>
>>System.InvalidCastException: QueryInterface for interface EnvDTE._DTE
>> at EnvDTE._DTE.get_MainWindow()
>> at Shell.VS.VSShell.GetMainWindow() in
>>C:\temp\tmp3D86.tmp\src\Services\shell\vsImpl\VSShell.cs:line 521
>> at Util.Logger.LogException(Exception e) in
>> at ProjectModel.SolutionPersistenceHandler.LoadPersistentData() in
>>
>> at
>> at ProjectModel.Impl.StartupSolutionVisitor.VisitSolution(ISolution
>>C:\temp\tmp3D86.tmp\src\Services\project\impl\SolutionVisitor.cs:line 93
>> at ProjectModel.Impl.SolutionBase.Accept(ProjectVisitor visitor) in
>>C:\temp\tmp3D86.tmp\src\Services\project\impl\SolutionBase.cs:line 50
>> at ProjectModel.Impl.VisitSolutionAction.Run() in
>>C:\temp\tmp3D86.tmp\src\Services\project\impl\SolutionVisitor.cs:line 25
>>
>>System.InvalidCastException: QueryInterface for interface EnvDTE._DTE
>> at EnvDTE._DTE.get_MainWindow()
>> at Shell.VS.VSShell.GetMainWindow() in
>>C:\temp\tmp3D86.tmp\src\Services\shell\vsImpl\VSShell.cs:line 521
>> at Util.Logger.LogException(Exception e) in
>> at ProjectModel.Impl.VisitSolutionAction.Run() in
>>C:\temp\tmp3D86.tmp\src\Services\project\impl\SolutionVisitor.cs:line 29
>> at ReSharper.ActionExecutor.RunActionWithProgress() in
>>C:\temp\tmp3D86.tmp\src\ReSharper\ProgressManager.cs:line 82
>> at ReSharper.ProgressManager.Run(Action action, IProgressIndicator
>>C:\temp\tmp3D86.tmp\src\ReSharper\ProgressManager.cs:line 51
>> at ReSharper.ActionExecutor.ThreadFunc() in
>>C:\temp\tmp3D86.tmp\src\ReSharper\ProgressManager.cs:line 92
>>
>>System.ApplicationException: Event without adder/remover/raiser :
>>System.ApplicationException: Event without adder/remover/raiser :
>>System.ApplicationException: Event without adder/remover/raiser :
>>DataColumnCollection
>>
>>System.ApplicationException: Event without adder/remover/raiser :
>>DataColumnCollection
>>
>>System.ApplicationException: Event without adder/remover/raiser :
>>System.ApplicationException: Event without adder/remover/raiser :
>>DataRelationCollection
>>
>>System.ApplicationException: Event without adder/remover/raiser :
>>System.ApplicationException: Event without adder/remover/raiser :
>>System.ApplicationException: Event without adder/remover/raiser :
>>System.ApplicationException: Event without adder/remover/raiser :
>>System.ApplicationException: Event without adder/remover/raiser :
>>XmlTextReader
>>
>>System.ApplicationException: Event without adder/remover/raiser :
>>type XmlValidatingReader
>>
>>System.ApplicationException: Event without adder/remover/raiser :
>>System.ApplicationException: Event without adder/remover/raiser :
>>======================
>>
>>
>>
>>I hope this helps. Let me know if you need any more info.
>>
>>
>>Regards,
>>Corey.
>>
>>
>>
>>Dmitry Shaporenkov(JetBrains) wrote:
>>
>>>Hi Corey,
>>>
>>>"Corey Yeatman" <corey.yeatman@fifthweb.net> wrote in message
>>>news:c0osql$m5n$1@is.intellij.net...
>>>
>>>
>>>>The add-in seems to work (more or less) ok, but with code highlighting
>>>>turned on, every symbol/method which is in a Class Library shows up in
>>>>red, meaning Ctrl+B (where applicable) can't jump to the source in my
>>>>own class libraries, and of course it doesn't recognise methods/symbol
>>>>names within those classes.
>>>>
>>>>
>>>>My entire solution compiles ok, so I don't think any paths are
>>>>incorrect. I'm still a learner when it comes to the Visual Studio IDE,
>>>>so can anyone tell me what I've got wrong?
>>>>
>>>>
>>>
>>>
>>> Could you please outline the structure of your solution? In
>>>is important for us
>>> to know how your class libraries are referenced in your projects. That
>>>if you have a Class Library
>>> project and an application project, does the latter reference the
>>>thru an assembly reference or thru a project
>>> reference?
>>>
>>> Thanks in advance.
>>>
>>
>>
>>
>>--
>>___________________________________________________________________
>>Corey Yeatman 1st Floor, 66 Mandeville Street
>>Fifth Web Limited Christchurch
>>mailto:corey.yeatman@fifthweb.net Phone: +64-3-962-2751
>>
___________________________________________________________________
Corey Yeatman 1st Floor, 66 Mandeville Street
Fifth Web Limited Christchurch
mailto:corey.yeatman@fifthweb.net Phone: +64-3-962-2751