Reputation: 14470
I have a windows-form
application which consists of three sub projects.
Project A - Classes
Project B - Classes
Project C – view (win forms)
When I try to add reference to of project B to project C it adds the reference fine. But when I build the project is comes with the error message saying that I am missing the reference to the Project B.
But later I found that Project C was set to target framework - .net framework 4 client profile
and project B .net framework 4.
When I changed the target framework to .net framework 4 in project c it all started work fine.
What is the reason behind that?
Is it necessary that all projects needs to be in same target framework if they reference each other?
Thanks
Upvotes: 1
Views: 470
Reputation: 1506
According to MSDN:
"If you create a project that targets an earlier version of the .NET Framework, you cannot set a reference in that project to a project or assembly that targets the .NET Framework 4 Client Profile or .NET Framework version 4."
Upvotes: 1