Reference a .net framework 4.5.1 assembly in a 4.0 project

前端 未结 3 960
深忆病人
深忆病人 2020-12-09 16:52

How can i make a 4.0 project have a 4.5 reference. In the unit tests, i cant build the solution and it\'s giving me this warning.

Warning 2 The pr

3条回答
  •  旧时难觅i
    2020-12-09 17:47

    Sounds like you need to change the framework of the library. And since it is only a unit tests project, I don't see why you wouldn't.

    In Visual Studio:

    • Right-click on your project
    • Select Properties
    • Select the Application tab
    • Change the Target Framework to the desired framework

    If you are not seeing .NET Framework 4.5.1 as an option there, ensure you have it installed.

提交回复
热议问题