Quantcast
Channel: Common Language Runtime Internals and Architecture forum
Viewing all articles
Browse latest Browse all 1710

Trying to understand solutions with multiple projects that target different .NET framework versions

$
0
0

I have a solution with 3 projects.  Two of the projects target .NET framework 4.0 and the other one targets .NET framework 3.5. 

The two that target .NET 4.0 have reports that get generated and exported when they are called by the one that targets .NET 3.5.  

I want to have a better understanding of when it's okay to use projects in the same solution that target different versions of the .NET framework and when it's not.  Using the example above, the calling project targets an older version while the ones being "called" target newer versions.  

I think this is fine in this scenario because the older "calling" one is just rendering the reports from the others programmatically and not trying to use a .NET feature that was added to the framework after 3.5.  I wonder if this would be true, if I was trying to use a .NET 4.0 feature in the older 3.5 project though.

When is it necessary to ensure all projects in the same solution target the same version of the .NET framework and when isn't it?  Can a project that targets an older version always call code from another project that targets a newer version?  I assume the answer to the second question is probably no, but I'm curious if anyone has any opinions on this.

 

Viewing all articles
Browse latest Browse all 1710

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>