Why Resharper not detect unused references in empty MSVS 2015 console app?

166 views Asked by At

If you try to create empty console app in MSVS 2013 and remove unused references, then only two of them remain: System and System.Core.

But if you preform same task in new MSVS 2015 Community (14.0.23107.0) then nothing except Microsoft.CSharp would be removed:

Removing unused references in MSVS 2015

I think that it is quite strange behavior. All that (actually unused) references used in some temp code file called .NETFramework,Version=v4.6.AssemblyAttributes.cs:

Only one unused reference detected

And it is fine if you remove unused references manually - project builds without problems.

The question is: what purpose of that temporary auto-generated file and why it has so many dependencies? It hasn't actually, that is why I suppose that it is bug or something...

2

There are 2 answers

4
Alexander Kurakin On BEST ANSWER

ReSharper Team will investigate it https://youtrack.jetbrains.com/issue/RSRP-446156

0
Tom Winter On

I was having this problem too. I deleted that temp file and generally cleaned up my temp folder. Then things worked as you'd expect.