I have two C# Projects that I have linked via adding The second existing project to the first one, and then adding the second project as a reference. but when i run my first project im getting the following error:
Severity Code Description Project File Line Warning The primary reference "C:\Users\consultant10\Documents\Visual Studio 2015\Projects\dummyClientCare\dummyClientCare\bin\Debug\dummyClientCare.exe" could not be resolved because it was built against the ".NETFramework,Version=v4.5.2" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.5". insertIntoDataBase
and:
Severity Code Description Project File Line Warning The referenced project 'dummyClientCare' is targeting a higher framework version (4.5.2) than this project’s current target framework version (4.5). This may lead to build failures if types from assemblies outside this project’s target framework are used by any project in the dependency chain. insertIntoDataBase
how do i get over this hurdle? ..........the first project was created in visual studio 2012 band the referenced one in vs community 2015
You need to change the Target Framework to be the same on both project.
Click on Project - Properties - Application
.
Then in the dropdown, select .NET Framework 4.5.2.
The main issue is the compatbility between the versions of your projects. You should cannot use projects with upper version of your current project as a reference.
In Visual Studio 2015, in Solution Explorer, select your project. On the menu bar, open the Project menu and choose Unload project.
On the menu bar, select File, Open, File. In the Open File dialog box, navigate to your project folder, and then open the project (.vcxproj) file.
In the project file, locate the entry for the target Framework version. For example, if your project is designed to use the .NET Framework 4.5, locate <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
in the <PropertyGroup Label="Globals">
element of the <Project>
element. If the <TargetFrameworkVersion>
element isn't present, your project doesn't use the .NET Framework and no change is required.
Change the value to the Framework version you want, such as v3.5 or v4.6.
Save the changes and close the editor.
In Solution Explorer, open the shortcut menu for your project and then choose Reload Project.
;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With