Problem with error highlighting/intellisense
Hi I am currenly evaluating resharper 2.0 build 249 and I have a problem getting error highlighting and intellisense to work with some code generated files. We have some code files (.cs) that we generate and compile externally. The types contained in the resulting assembly are all show with red because resharper can't find them and intellisense doesn't work. Visual studio have no trouble compiling and showing intellisense for types.
Is there a way to get this to work e.g. an option to specify additional assemblies to look for ?
Please sign in to leave a comment.
Hello Sune,
could you please clarify how the assemblies containing the generated code
are referenced in your solution and how are they built? An
outline of the solution structure would be useful. Also, please note that
ReSharper only synchronizes with external changes when
you leave VS for another application and then activate VS again (the assumption
is that the user goes to an external program,
makes changes there and then returns to the IDE), so ReSharper may not be
able to see external changes until you do that. Thanks in advance.
Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Hi Dmitry
The structure is like this:
- Capabilities
- Project A
- Project B
etc.
All the projects (A, B etc) reference the capabilities assembly and after build they are copied to the same folder.
If there is a change in a database a command called CapabillityGenerator.exe is run which generates new .cs files under Capabilities/Autogenerated these are included in the build. This is done by the target tag below which is specified in Capabilities.csproj:
]]>
So the source files are not part of any project (in the normal sense :)) and the types are contained in capabilities.dll after compilation. Hope this makes it clearer
Sune
Does switching to another application and returning to VS helps to update
ReSharper's view of the generated assembly?
Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Nope
The database is updated maybe once per week and generated source code and the assembly is only compiled once after an update so visual studio is opened and closed many times. Switching to another application after a compile doesn't help either - it never works.
Sune
Hello Sune,
could you please clarify if you have ever seen ReSharper recognizing types
from the compiled assembly? In other words, doesn't ReSharper see
any type from it at all or just doesn't react to changes made to that assembly?
Also please attach ReSharper's log captured (ReSharper|Show Log) during opening
the
problematic solution (you can also send the log file to me - dsha at jetbrains.com).
Thanks.
Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Hi Dmitry
Resharper does infact always recognize the other types in the project (those who are not generated). Unfortunately my evaluation copy expired today so I am not able to send you the log :(
Sune
Hello Sune,
if you provide a contact informaiton, we'll send you a prolonged evaluation
license - there's no problem.
Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Sorry for jumping in, but that is what I call 'support'.
Over and out, Uwe.
Yes I am very gratefull for all the support
Dmitry - I just sent you my contact information by email.
Sune
Hello Sune,
thanks, I've replied you with a license information.
Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
>>> if you provide a contact informaiton, we'll send
>>>
>> you a prolonged
>>
>>> evaluation license - there's no problem.
>>>
>> Sorry for jumping in, but that is what I call
>> 'support'.
>> Over and out, Uwe.
>>