Resharper complains with a "Path Error" when using extensionless links - resharper

We have set up extensionless URLs on our site, but Resharper complains that paths are broken. Is there some way to set up some type of wildcard mapping to add .cshtml to all of the links?
For example, Resharper complains about the following:
<li>App Store</li>
But, if we add the extension, it stops complaining:
<li>App Store</li>
We have hundreds of links, so setting up a mapping per link is not a manageable solution.

It is possible to suppress the error.
ReSharper -> Options -> Code Inspection -> Inspection Severity -> HTML -> Potential Code Quality Issues -> Path error
I don't think that a wildcard mapping possible is.
But maybe the Resharper Community Forum can help you.

Related

Why do Visual Studio 2012 and ReSharper 7 forget to display Intellisense tooltips?

I noticed a strange behaviour in my VS2012 installation. I use VS2012 Pro and ReSharper 7. Intellisense is just not showing code suggestions anymore. I found a few related questions in my research but they always had a slightly different setup going and none could solve my problem:
Intellisense is working but, it's not showing the tooltip about selected member functions/Properties anymore.
If I take a look at the C# Text Editor Settings in
Tools -> Options -> Text Editor -> C# -> General
Most of the times the two necessary boxes Auto List Members and Parameter Information are selected. However, code suggestions in Intellisense don't work. Sometimes, when I look at the described settings, they are unselected.
Selecting them will make code suggestions work as in VS2010 but, only once. When I check the settings afterwards, they are most likely still selected, but code suggestions are not working anymore.
Some people suggested deleting the %AppData%\Roaming\Microsoft\VisualStudio\11.0 Folder, which did not work for me. I also tried to reset all changes, which also didn't help at all.
Tools -> Import and Export Settings -> Reset
What in the world could make Visual Studio to just forget its settings and trigger such an irrational behavior?
-edit-
I display the code suggestions by pressing CTRL+Alt+Space. However, I have to press that shortcut every time I want to see the suggestions. It has to be possible to automatically display them every time, when possible?
I was having a similar problem, but I kept overlooking one small ReSharper Intellisense setting. I would double check that you have Symbol completion on in
ReSharper | Options | Intellisense | Completion Characters
Check out the answer with screenshots.
Thanks for all the tips, I figured out what I had missing:
I had to enable "Completion Appearance" -> "Show Summary".
I also accepted Anthonys answer because he linked to a detailed post with screenshots that shows all steps necessary. (Although the thing I had missing is not mentioned there)
ReSharper uses it's own code suggestions that override Visual Studio ones, that could be the reason why the ones in the Visual Studio settings may be disabled. Please check ReSharper options at ReSharper -> Options -> Environment -> IntelliSense. Maybe they are turned off there. If your ReSharper options are turned on but you still have no intellisense, then please ReSharper's support at http://www.jetbrains.com/support/

ReSharper - how to disable generation of rubbish documentation headers in Code Cleanup

We're using ReSharper 6.0 with StyleCop for ReSharper.
Although we use the StyleCop rule that members must have documentation headers, we don't want ReSharper's code cleanup facility to generate documentation headers for us, because they're inevitably rubbish. Bad doc headers are worse than none at all because they're less likely to be updated than added in the first place.
We tried turning off the setting 'Insert text into documentation and file headers' in ReSharper => Options => Tools => StyleCop but it bloody resets itself when you restart visual studio.
Any ideas how we can stop Code Cleanup creating documentation headers for us?
ReSharper -> Options -> Tools section -> Code Cleanup -> select StyleCop profile -> Documentation section -> untick 1600.
Will prevent default documentation headers being created but StyleCop will still enforce that they should be there.
The second step, after blocking code generation is Removing the rubbish.
I used a regex Search/Replace through visual studio.
Regex is for header :
// ---.*\r\n\/\/.*\r\n\/\/.*\r\n\/\/.*\r\n\/\/.*\r\n\/\/.*\r\n.*\r\n\/\/.-{116}
Regex to remove Generated summaries
\s{4}\/\/\/\s<summary>(.*)\r\n.*\r\n.*</summary>
Caution : it will remove ALL summaries, even the good ones, so check the replacement scope before launching it. (git checkout might be your friend...)

Automate disabling ReSharper per project

I want to be able to be able to disable R# for several projects. There is quite a large number of them to be excluded which means doing it per project in VS is not ideal (Menu: R# -> Options -> Code Inspections -> Settings -> Edit items to skip).
Does anyone know have any clever suggestions? I was hoping that excluded projects/folders were stored in a R# config file I could manipulate but I haven't come across one.
Unfortunately there's currently no way to turn off ReSharper on a per-project basis. There's a request for this functionality but we can't commit to any specific deadline right now.

How to get resharper to skip generated files

Resharper really complains about files such as reference.cs that is generated by things like WCF service reference. How do I get Resharper to skip such files entirely?
menu ReSharper -> Options
Code inspection -> Settings item
button Edit items to skip
I got this to work by entering Referen?e.cs into the ReSharper Generated file masks list. Apparently the presence of the ? wildcard tricked it into applying to all Reference.cs files (well, remember that it will get files named Referente.cs too, but I can live with that.

How to add custom code analysis in ReSharper

I'm new to ReSharper.
For those who uses Resharper, is there a way I can add custom code analysis rules?
For example I might have a rule say All private variables should start with letter "m". How can I add this to Resharper so if I violate this, it can shows as a warning or an error?
I know the question is old, but for all folks coming from google like me:
Resharper -> Options -> Code inspections -> Custom Patterns
There you can create your own rules for highlighting patterns or offering substitutions. This is for ReSharper 8. I'm not sure from which version this option is there.
Just to expand on what #AakashM notes above: this can be specified in ReSharper Options | Languages | (either Common or C# or whatever) | Naming Style.
If you click on Advanced Settings, and then double-click on one of the "entity descriptions", there is a far larger selection of possible entities (including events, namespaces etc) , together with access rights (private, protected, etc) and so on, for which you can define prefix, suffix and casing rules.
You can write your own plugins for ReSharper. Take a look at here:
http://stylecopforresharper.codeplex.com/
This is similar to what you're asking for. It might even do what you want. Not sure since I'm not a big StyleCop user.
Also take a look at the first in my series of blog posts coming on ReSharper plugins:
http://hadihariri.com/2010/01/12/writing-plug-ins-for-resharper-part-1-of-undefined/

Resources