2

In a Visual Studio 2012 MVC 4 project, all references I see are 4.0.0.0, not 4.5. Is that expected?

This is an old machine that has had all .NET versions (and corresponding VS versions) since VS 2008.

See screen grab: Add Reference Dialog

G. Stoynev
  • 7,389
  • 6
  • 38
  • 49

2 Answers2

0

.NET 4.5 is a replacement of .NET 4 and fully backwards compatible. To retain this property, the assembly versions had to remain at 4.0.

For a more in-depth explanation, see this answer and the blog posts it links to.

Community
  • 1
  • 1
Chris
  • 6,914
  • 5
  • 54
  • 80
  • i don't understand your answer , it does not seem right . i came across this issue as well . where on one environment using Windows 7 i am able to Reference .net 4.5 versions and in another i only see the 4.0 versions .. What have you men't by had to stay the same. V 4.5 should be accessible – eran otzap Oct 16 '14 at 22:05
  • @eranotzap Since .NET 4 applications are supposed to work with .NET 4.5 out of the box, the .NET developers did not change the assembly versions. This is required because the existing applications will look for assemblies with version 4. – Chris Oct 17 '14 at 10:06
  • I'm not sure that's correct . At work i can reference 4.5 in VS where it states 4.5 in the title and in my home computer i only see 4 version. From what your saying no one any where would see these mysterious and some what mystical 4.5 assemblies. – eran otzap Oct 18 '14 at 15:48
  • let me give you an example if i have an application that reference's Microsoft.Expression.Interaction 4.5 and i have System.Windows.Interactivity 4 they would not work together. You would get an exception clearly stating that you have to use a later version of System.Windows.Interactivity , frankly your answer makes me kind of mad since it seems very incorrect and kinda aloof yet some one accepted it for some reason. Additionally i am trying to use Caliburn.Micro and it can't satisfy it's dependencies because of this issue. – eran otzap Oct 18 '14 at 16:03
  • @eranotzap As I said in my answer, .NET 4.5 is completely backwards compatible, that means that .NET 4 applications will work with .NET 4.5 right away. However, .NET 4.5 applications will not necessarily work with .NET 4. Is this the point you are missing in my answer? – Chris Oct 18 '14 at 16:18
0

Installing Windows Visual Studio 2012 Update 4 did the trick for me .

I had to reference

      System.Windows.Interactivity 4.5 

in order to work with

      Microsoft.Expression.Interactions 4.5
eran otzap
  • 12,293
  • 20
  • 84
  • 139
  • 1
    Note that this is not part of the .NET framework but rather of the Expression Blend SDK. This is why the above answer does not apply to this DLL. – Chris Oct 20 '14 at 10:52
  • What about System.Windows.Interactivity ? – eran otzap Oct 20 '14 at 12:01
  • As I said, System.Windows.Interactivity and Microsoft.Expressions.Interactions are part of the Expression Blend SDK: http://msdn.microsoft.com/de-de/library/ff726403%28v=expression.40%29.aspx – Chris Oct 21 '14 at 19:57