D'Arcy from Winnipeg
Solution Architecture, Business & Entrepreneurship, Microsoft, and Adoption

Mystery of the Uncooperative EF Model and the Missing Target Frameworks

Wednesday, July 14, 2010 12:21 PM

I’m prepping this week for the 70-515 exam I’m taking on Friday, and I thought I’d go through some VS.NET 2010 labs as part of my prep. One of them has to do with setting up a WCF service, where you create a web application and then add an Entity Framework model file to the project.

Right click, Add New Item, Entity Framework file, and…

image 

Huh. Well that’s weird, considering that this is a .NET 4.0 web application project in Visual Studio.NET 2010…how can it not resolve to the target framework?

So I check to see what framework is being targeted in my web project…maybe its set to the wrong one somehow. To my shock and horror though, I’m greeted to an empty drop list:

image

What is going on?! I look online, trying to figure out what could be the cause of this bedlam but to no avail. Twitter provided me some input (like the .NET 4 Client Framework, which is a slimmed down version of the full framework and the default for certain projects. See the articles here and here for more info), but nothing to solve my issue specifically.

After doing the uninstall/reinstall dance with .NET 4 (which didn’t fix it), I decided to do it for VS.NET 2010. This time I installed everything but the C++ libraries (I had removed a bunch of stuff from my initial install, but nothing that I thought would cause this…like F# for instance).

I loaded up VS.NET, created a new web project, tried to add an EF file and SAD TUBA! Same error message I got initially about mscorlib not resolving for target .NET 4. Now during my Twitter conversations, it came up about which projects are defaulted to the .NET 4 Client Framework I mentioned above. I tried an experiment: I added a Winform project to the solution.

Loaded it up, tried to add the EF file, and got the SAME ERROR! This time I checked the properties of the Winform project and saw not only a full Target Framework drop down list but that it was defaulted to the .NET 4 Client Framework. So I tried setting it to the full .NET 4 Framework. Guess what happened?

All the frameworks disappeared from the Target Framework drop list!

This is all getting funky…for those reading this blog post hoping that I was going to provide a solution, sorry to disappoint. I’m blogging  this as a cry for help because I have NO idea WTF is going on. The fact that a full uninstall/reinstall didn’t fix this is troubling also. If I come to a solution, I’ll add it…but if anyone has some thoughts/insight, please comment below!

D




Feedback

# re: Mystery of the Uncooperative EF Model and the Missing Target Frameworks

Hi D'Arcy,

This seems to be a problem with the .NET Framework install as well as the VS2010 installation, since if you can't see the target frameworks, is because VS didn't correctely identified that they were installed, and so the best option is to try a new install, and I'd suggest you to uninstall everything and afterwards reinstall all again, since this seems to be a real install issue. I've had some problems, and I solve them all with clean installs.

Sorry for not helping you more. 7/14/2010 4:55 PM | Nuno Godinho

# re: Mystery of the Uncooperative EF Model and the Missing Target Frameworks

Hey Nuno, the thing is that I've already *done* this from a clean install. I just had my work laptop reformatted, and after I installed VS.NET 2010 on that machine I still had the same problems.

On my personal laptop, I uninstalled and reinstalled and still have the same issue. The thing is, that drop list *will* be populated, but only for certain projects it seems.

D 7/14/2010 4:57 PM | D'Arcy from Winnipeg

# re: Mystery of the Uncooperative EF Model and the Missing Target Frameworks

how you can hide advertisement from your blog 7/18/2010 2:04 AM | anirudha

# re: Mystery of the Uncooperative EF Model and the Missing Target Frameworks

Well,this really helps me a lot! Thank you very much to share such a useful information!
If u dont mind,here u can have a good look,maybe it can give u a fantastic challenge, just come to http://www.mbtshoesoutlet.org mbt shoes.
7/30/2010 1:42 AM | salenics

# re: Mystery of the Uncooperative EF Model and the Missing Target Frameworks

Hello D'Arcy,

Did you ever find a solution to this issue. I tried all the steps of clean install and all other tricks available on google but still do not see .net 4.0
5/19/2016 4:37 PM | Manish

Post a comment