.NET Framework 4.5 and Windows 7

Using (or providing) Microsoft.NET Classes

.NET Framework 4.5 and Windows 7

Postby Dick Bowman on Fri Sep 21, 2012 1:48 pm

A recent DSS update mentions .NET Framework 4.5, which Vince told me (I paraphrase) is mostly targetted at Windows 8, but can be installed on Windows 7.

Has anyone tried it on Windows 7 and got any experiences to share? I'm tempted to give it a whirl (if only because it claims to have integrated the WPF Ribbon), but am deterred by the following in the Microsoft installation guide...

"The .NET Framework 4.5 replaces the .NET Framework 4. When you install the .NET Framework 4.5 on a system that has the .NET Framework 4 installed, the assemblies are replaced.

Uninstalling the .NET Framework 4.5 also removes pre-existing .NET Framework 4 files. If you want to go back to the .NET Framework 4, you must reinstall it and any updates to it."

Which, in my reading, suggests there is some risk of upsetting existing application code.

As an aside, I have installed Visual Studio Express 2012 - which claimed in the installation to have installed .NET 4.5, but I see no sign of it looking in the expected .NET Framework folders.
Visit http://apl.dickbowman.com to read more from Dick Bowman
User avatar
Dick Bowman
 
Posts: 235
Joined: Thu Jun 18, 2009 4:55 pm

Re: .NET Framework 4.5 and Windows 7

Postby StefanoLanzavecchia on Mon Sep 24, 2012 7:44 am

I have not tried to execute .NET 4.0 code from Dyalog APL, ever, but here's what I know.
.NET 4.5 is a strange beast: despite the fact that the version number is different than the older 4.0 and that they can coexist side by side, there's only one set of physical assemblies with executable bytecode. What happens is that when 4.5 is installed, it substitutes the 4.0 assemblies with shims for compatibility: this gives the IDEs a way to recognise types and methods not available in 4.0 when compared with 4.0. BUT, the executable code behind is only one, which means that a bug fixed in 4.5 will magically be fixed even for a program running against 4.0 on a machine with 4.5 installed.
User avatar
StefanoLanzavecchia
 
Posts: 64
Joined: Fri Oct 03, 2008 9:37 am

Re: .NET Framework 4.5 and Windows 7

Postby Dick Bowman on Mon Sep 24, 2012 12:54 pm

Thank you, I've done a little more poking around and saw some of what you've described.

Most crucially, since I was puzzled about how I could apparently download and install 600MB of files to see no trace, I noticed that they seem to have been put into the .NET 4.0 folders and I see registry entries telling me that Version is 4.5.50709 and InstallPath is c:\windows\Microsoft.Net\Framework64\v4.0.319.

And with this having been done, my existing application code continues to run.

My next step is to get Dyalog up and running on a clean machine and see what (if any) changes need to be made to the application code to access stuff new to 4.5 (like the Ribbon - previously an add-on).

I can't help wondering where these people were when the brains got handed out.
Visit http://apl.dickbowman.com to read more from Dick Bowman
User avatar
Dick Bowman
 
Posts: 235
Joined: Thu Jun 18, 2009 4:55 pm

Re: .NET Framework 4.5 and Windows 7

Postby Dick Bowman on Tue Sep 25, 2012 1:22 pm

Ok, my usual serenity has returned, I now seem to be able to run Dyalog 13.1 64-bit applications under Windows 7 hooking into .NET Framework 4.5. Here are some things I uncovered on the way...

If you install Visual Studio Express 2012 it brings .NET Framework 4.5 along with it.

.NET Framework 4.5 seems to have buried itself inside C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5 (even though I'm using Windows 7 64-bit).

Ribbon is now included as a "normal" control.

Although Visual Studio Express 2012 seems to start off including Ribbon in its design toolbox it seems quite happy to arbitrarily drop it - exercise for the reader - work out how to get it back again.

There's no need to change the dyalog.exe.config file from the version you used to access .NET Framework 4.0

The folder path needed for ⎕USING is...
progFiles←Environment.GetFolderPath Environment.SpecialFolder.ProgramFilesX86
path←progFiles,'\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\'

To access the Ribbon, include the following in your XAML...

xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=System.Windows.Controls.Ribbon"

and in ⎕USING...

'System.Windows.Controls.Ribbon,',path,'System.Windows.Controls.Ribbon.dll'

I've amended relevant pages in my WPF Tutorial (http://www.dogon.myzen.co.uk/APL/Tutorials/WPF/WPF.html) to reflect the above.

No claims about smartness in any of the above - I'd be pleased to see corrections and improvements. For now though, things seem to be working and I'm moving on to other stuff.
Visit http://apl.dickbowman.com to read more from Dick Bowman
User avatar
Dick Bowman
 
Posts: 235
Joined: Thu Jun 18, 2009 4:55 pm


Return to Microsoft.NET

Who is online

Users browsing this forum: No registered users and 1 guest