20

I prefer the VS2010 UI over VS2012 so I want to keep using it, but I would like to use the language features of C# 5 - particularly the caller information attributes - if not the features of the .NET framework 4.5. Is there a sensible way to do this that will maintain intellisense in VS?

I am aware that I could invoke the v5 compiler 'semi-manually' as a build action but I think that will be neither smooth nor productive. Is it possible to create a custom targetting pack, or is this a feature that only MS can create?

svick
  • 236,525
  • 50
  • 385
  • 514
Stephen Hewlett
  • 2,415
  • 1
  • 18
  • 31
  • I don't think you would be able to do that.. – techBeginner Oct 15 '12 at 05:20
  • 2
    Take a look at this: http://stackoverflow.com/questions/12014258/where-can-i-locate-themes-for-vs2012 If you can choose between 2010 and 2012, I would stick with the latter. Even if you do manage to get the compiler to work in 2010, you still have to deal with libraries etc. – Polity Oct 15 '12 at 06:08
  • 5
    I think you cannot do that. Please see [Can I develop application in Visual studio 2010 using C# 5.0](http://social.msdn.microsoft.com/Forums/en-US/async/thread/929ccd95-0ab1-4c2b-b153-091471965bc3) for reference. – Ekk Oct 15 '12 at 07:14
  • 1
    What in the UI is preferable? Have you looked at the Colour theme changer plugin? They have improved a lot with VS 2012 so it would seem a bit silly to not try and change the UI of 2012 instead of trying to implement 2012 features into 2010. – David Esteves Oct 22 '12 at 20:22
  • 1
    It would seem logical to try to change the UI. At the moment I don't think the patches are quite there. The combination of the registry setting for the menu text, the colour theme changer and an icon patcher from http://vsip.codeplex.com/ doesn't replace all of the 2012 bits - some icons are left out and some visual elements are still in the style formerly known as Metro. I am left with a UI that is still not as good as the old one, in my opinion. As the patches get better, this may change. – Stephen Hewlett Oct 23 '12 at 01:04

1 Answers1

4

VS2010 is unaware of the 5.0 compiler and language specifications nor does it support version 4.5 of the framework.

You can likely edit your solution within VS2010 and then build your solution externally but doing so you lose intelli sense and all the niceties that make VS what it is. So no.

andleer
  • 22,388
  • 8
  • 62
  • 82
  • 1
    ...but then VS2010 is also unaware of the XNA framework until you install the targetting pack, suggesting that customisation might be possible. – Stephen Hewlett Oct 23 '12 at 21:33
  • I don't use XNA so I can't really comment about that but it sounds like a case where Microsoft specifically targeted VS2010 with an update to allow development of XNA. Guessing that was quite a while before VS2012 shipped. They didn't target 2008? And you wont see any updates for VS2010 that allow for C# 5. – andleer Oct 23 '12 at 21:36
  • 1
    The XNA framework is one example of the multitargeting packs that are available. The concept of a targeting pack is built in to VS2010. I am aware that MS have not released one for what I want to do. My question is how to get around the fact that they are unlikely to do this. – Stephen Hewlett Oct 23 '12 at 21:39
  • Stephen, I am not trying to be argumentative but the XNA framework targeted VS2010 because that is what was available when it was released in 20010?. It does not target VS2008 and you can't get it to work with VS2008 and more than C# 5 fails to target VS2010 and you won't have success getting that going either. – andleer Oct 23 '12 at 21:50
  • I am aware of the general commercial nature of Microsoft in favouring the promotion of new versions over existing ones and I am aware that what I want to do is therefore unsupported. That does not per se mean that the task is impossible. Hence the question. – Stephen Hewlett Oct 23 '12 at 21:55