Resolving global variables
ReSharper highlights usages of undefined variables as warnings. There are cases, however, when these usages are valid. For instance, some variables can be defined directly in the markup.
One way to deal with this, is to disable or suppress the corresponding code inspection. However, you can define such variables using the
// global comment. In this case, the inspection will stay active and help you to find typos in variable names.
You can place these comments either at the top of the current file or use a single file for all global variables of the project. Each variable requires a new comment, for example:
// global variableName
Quick-fixes let you automatically resolve most of code issues found with code inspection. If one or more quick-fixes are available for a code issue, you will see the corresponding action indicator when your caret is on the highlighted code. Press Alt+Enter to see and apply the desired fix.
Create from usage
This is one of the most useful quick-fixes. Whenever you use anything that was not declared, ReSharper can help you create a valid declaration taking into account the usage and the surrounding context.
Specify qualifier explicitly
In case an explicit qualifier is missing, use this quick-fix to add a qualifier.
Declare local variable
When ReSharper finds out that a variable has been assigned without being declared, use this quick-fix to transform the assignment into a variable declaration.
Make ReSharper ignore specific code
To exclude parts of your solution's code from code analysis, navigation, and other features, ReSharper allows you to ignore specific files, folders and file masks in different ways.
To improve performance, ReSharper also automatically detects and starts ignoring large web files that have no references and were probably added to the solution by mistake.
If any of such files are detected, you will see a notification where you can stop ignoring any of those files if you need them. You can also find all automatically ignored files on the Alt+R, O).page of ReSharper options (
To stop auto-detection and ignoring large unused web files, clear the Search for web files that can affect performance and exclude them from indexing checkbox on the page of ReSharper options (Alt+R, O).