.NETFramework,Version=v4.5 framework is a higher version than the currently targeted framework ".NETFramework,Version=v3.5"
Asked Answered
C

1

11

I created my first project in Framework 3.5 and i converted to framework 4.5 and its working perfectly. Secondly i tried to add the reference of this project to another project which is created in framework 4.5. while building my second project after adding the reference i am getting an error message:

1. The primary reference "xxx" could not be resolved because it was built against the ".NETFramework,Version=v4.5" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v3.5".
2. The type or namespace name 'xxx' could not be found (are you missing a using directive or an assembly reference?)

pls advice where i am missing something

Countryandwestern answered 7/11, 2013 at 6:4 Comment(4)
What you're seeing at Project Properties / Application / Target Framework of the converted (current) project?Reparable
Wrong .NET Framework version. Double check.Calorie
Also ensure you're refering to the newly built assemblyReparable
Its a perfect help.. Thanks.. I missed to change the framework version here : Project Properties / Application / Target FrameworkCountryandwestern
P
0

It appears that your second project is not targeting the .net 4.5 framework. You can right click your second project and go to properties ->Application.

It will say target framework is 3.5, change that to 4.5 and make sure this is also the case for your first project as well

Parsimonious answered 27/12, 2023 at 20:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.