Resharper 7 plugin fails to explore solution

已查看 88 次
跳至第一个未读帖子

Johan Appelgren

未读,
2012年10月1日 04:42:552012/10/1
收件人 galli...@googlegroups.com
Tried a nightly build with Resharper 7 and ran into two issues. 

1. It looks like R# uses MetadataAttributeValue differently in 7. The plugin code assumes that only the MetadataAttributeValue.Value property is used and is never null, but now the ValuesArray property is used instead for params parameters. Caused a NullReferenceException. 

2. Might be an old issue, but attributes with params parameters doesn't work. An example of this is the MultipleCulture attribute. Removing the special handling of params parameters from the plugin seems to fix this. 

I've attached two patches where I've attempted to fix these two issues, no idea if they break something else. But with them applied the R# plugin works for me at least. 

//Johan
MetadataReflectionPolicy.cs.patch
PsiReflectionPolicy.cs.patch

Johan Appelgren

未读,
2012年10月3日 11:51:472012/10/3
收件人 galli...@googlegroups.com
Found another problem. It looks like you must reuse the same instances of GallioTestElement to avoid a problem where R# removes all found tests when refreshing. 

R# sets State to Pending on all existing GallioTestElement instances and then does not replace the old instances with new ones and after Gallio is done it removes all GallioTestElement instances with State Pending. Ensuring GallioTestElement instances are always reused if in the R# cache seems to fix this. 

There's still a problem with ProcessCancelledExceptions that causes the test tree not to be populated or only partially populated when opening a solution, and sometimes after a test project has been built. Don't know what to do about that. Looks like R# has logic that ensures it does not retry to explore a project after a ProcessCancelledException unless the output assembly has a new timestamp. 

Espen Albrektsen

未读,
2012年10月26日 02:32:542012/10/26
收件人 galli...@googlegroups.com
Hmm - never saw this post you made. I have been struggling with the resharper 7 plugin for the last couple of days - see my post https://groups.google.com/forum/?fromgroups=#!topic/gallio-dev/FV9Ee93GHPQ

I have a patch that is much better than the trunk - although the issues with GetDeclaredElement mentioned by JetBrains in http://devnet.jetbrains.net/thread/439267 are still not addressed. (I.E. Code edits (renames etc) are not stable.


Espen

Johan Appelgren

未读,
2012年10月27日 04:49:272012/10/27
收件人 galli...@googlegroups.com
I resorted to reflection to reset the timestamp when a ProcessCancelledException occurs to make R# try again. Didn't publish a patch with that workaround since it is just a quick hack but we haven't noticed any problems with it.

Espen Albrektsen

未读,
2012年10月28日 08:04:222012/10/28
收件人 galli...@googlegroups.com
Could you share the patch? Preferably on the MbUnit Issue 900
回复全部
回复作者
转发
0 个新帖子