Ever saw this error “Are you missing a using directive or an assembly reference”.
Even after adding the assembly?
Even when Visual studio Intellisense is not complaining.
But still compilation fails.
Ever heard of Output window? Visual Studio shortcut : Ctrl+W,O
Not keeping it open while compiling?
I did make this mistake. Guess what the Output window was trying to tell me all the time?
I will not post the whole output log. But here is what it was screaming at me.
1>C:\Program Files\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1697,5): warning MSB3274: The primary reference “StarkIndustries.Driver.IMissileSeeker” could not be resolved because it was built against the “.NETFramework,Version=v4.5.1” framework. This is a higher version than the currently targeted framework “.NETFramework,Version=v4.5”.
Yup. The referenced library was targeting .Net 4.5.1 while the project I was including it in was targeting .Net 4.5.
Lesson
Output window can be a live/timesaver. RESPECT ITS AUTHORITAH!!!