I have MVC4 project which I created with VS2010 and ReSharper 6. All Razor files were successfully parsed/recognized by ReSharper and I had full intellisense inside them, i.e. properties of the "Model" object, navigation to actions in controllers, etc.
However after updating to VS2012 with ReSharper 7.1 all Razor bits are highlighted in red and if I hover them I get "Cannot resolve symbol 'Model'" (or 'Html' for @Html, etc).
What would cause this?
Is it the same project working in VS2010 and non-working (in terms of resolving symbols) in VS2012?
Have you tried to clear the caches in ReSharper | Options | Environment | General dialog?
Unfortunately I have upgraded my VM to Windows 8 and had a clean install of OS & VS2012, so I don't have VS2010 anymore to confirm if it is still working fine there or not.
I have cleared Resharper caches the way you suggested, but problem is still there, Resharper shows "Cannot resolve symbol 'Model'" type of errors in my cshtml files. Other types of files are unaffected.
Have you got any other suggestions I can try?
Thanks for the info.
There's some more things to check:
1) Could you please specify the exact ReSharper version you use (ReSharper | Help | About JetBrains ReSharper)?
2) Could you please check if it affects all MVC4 solutions - please try to create new solution and check if symbols are resolved there fine.
Please let me know the results.
Here is the exact version of the ReSharper:
JetBrains ReSharper 7.1.1 Full Edition
Build 7.1.1000.900 on 2012-12-13T05:22:48
Visual Studio 11.0.50727.1.
I have created new MVC4 project and intellisense is working as expected in that project. So this indicates that something is not right in my project/solution...
Problem is that my project is deep customization of nopCommerce shopping cart, so re-creation is not an option for me
Have you had any other issues with nopCommerce customers? Is there something I can check?
I have found the problem. I upgraded my nopCommerce from 2.65 to 2.80. One of the changes is that they moved from MVC3 to MVC4. During upgrade (manual merge) I accidently left a couple of older packages including MS MVC packages in my solution. Visual Studio successfully ignored them, but Resharper picked them up..
After doing a comparison with vanilla nopCommerce 2.80 I have discovered and removed them. As result all problems with Resharper has disappeared.
Hopefully this might help someone with the similar issues.
Thanks for the information!
We were thinking about some migration issues here since you told us about upgrading from VS2010 to VS2012, but haven't thought about MVC3 to MVC4 yet. Thanks again for the description and it's great that it's now working fine for you!