The reason @Saber works is because when you upgrade a project to a higher version of .NET, the project file does not update automatically. For example, if you are upgrading from .NET 4.0 to .NET 4.5 and editing a project file, you can see the following:
<Reference Include="EntityFramework"> <HintPath>..\packages\EntityFramework.6.1.3\lib\net40\EntityFramework.dll</HintPath> </Reference> <Reference Include="EntityFramework.SqlServer"> <HintPath>..\packages\EntityFramework.6.1.3\lib\net40\EntityFramework.SqlServer.dll</HintPath> </Reference>
You will need to change the link to net45 instead of net40 . When removing packages, this will lead to the same behavior.
source share