Missing inspections in one solution

Hi,

I have one ASP.NET MVC solution where I miss some inspections, for example I have a class which gets a IRepository injected via the constructor (with SimpleInjector).

This repository has a corresponding readonly field to store the injected value:

    public class MyClass
    {

        private readonly IMyRepository _myRepository;    // No unassigned warning here

        public MyClass (  /* IMyRepository myRepository */ )
        {
            // _myRepository = myRepository;
            /* Constructor */
        }
    }

If I comment out the constructor parameter and the assignment, I get a warning in my other solutions that _myRepository is uninitialized before usage, but not in this solution.

 

What can I do to fix this?

0
1 comment
Avatar
Permanently deleted user

I solved it myself the warning level (Project => Properties => Build => Errors and Warnings => Warning level) was changed.
(https://stackoverflow.com/questions/24831759/why-is-resharper-showing-unused-variables-as-an-error-in-only-one-of-my-projects)

0

Please sign in to leave a comment.