How to target .Net 4.5 with version 14.1 ?

Using (or providing) Microsoft.NET Classes

How to target .Net 4.5 with version 14.1 ?

Postby PGilbert on Mon Jun 29, 2015 12:32 pm

How to use .Net version 4.5 with Dyalog 14.1 ? The Options -> Configure .NET Framework tab will offer v4 but not the version 4.5 even if installed on the computer. For example the SpeechSynthesizer is not working because available only in v4.5

Code: Select all
      ⎕using←'System.Speech.Synthesis,System.Speech.dll'
      speaker←⎕new SpeechSynthesizer
VALUE ERROR
      speaker←⎕NEW SpeechSynthesizer
              ∧


Instead you need to do the following to access the dll:

Code: Select all
      ⎕using←'System'
      progFiles←Environment.GetFolderPath Environment.SpecialFolder.ProgramFilesX86
      path←progFiles,'\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\'
      ⎕using←'System.Speech.Synthesis,',path,'System.Speech.dll'

      speaker←⎕new SpeechSynthesizer
      speaker.Speak(⊂'hello from APL')


Thanks in advance,

Pierre Gilbert
User avatar
PGilbert
 
Posts: 362
Joined: Sun Dec 13, 2009 8:46 pm
Location: Montréal, Québec, Canada

Re: How to target .Net 4.5 with version 14.1 ?

Postby AndyS|Dyalog on Tue Jun 30, 2015 8:14 am

Currently there is no better mechanism for specifying the location of the directory which contains .NET 4.5.

We're mulling over the possibilities, including adding support for the user to specify the assembly name, rather than the name of the file containing the assembly. However, that is some way off.
User avatar
AndyS|Dyalog
 
Posts: 198
Joined: Tue May 12, 2009 6:06 pm

Re: How to target .Net 4.5 with version 14.1 ?

Postby PGilbert on Tue Jun 30, 2015 11:33 am

Thanks Andy for the answer, I was hoping that it would be just a manual modification in the dyalog.exe.config file, but looks like its not possible that way from your answer. Hopefully Dyalog will be able to offer us a simple way to target .NET 4.5 soon since on this post from Dick Bowman of September 2012 it was requested the same thing.
User avatar
PGilbert
 
Posts: 362
Joined: Sun Dec 13, 2009 8:46 pm
Location: Montréal, Québec, Canada

Re: How to target .Net 4.5 with version 14.1 ?

Postby PGilbert on Tue Jul 28, 2015 5:50 pm

When you have a tentative date when Dyalog will support .Net 4.5 let us know since many dlls that we purchase now works with only .Net 4.5 or newer.
User avatar
PGilbert
 
Posts: 362
Joined: Sun Dec 13, 2009 8:46 pm
Location: Montréal, Québec, Canada

Re: How to target .Net 4.5 with version 14.1 ?

Postby PGilbert on Tue Aug 11, 2015 1:26 am

I am more confuse than ever. When you read this post it is explained that .Net 4.5 is taking the place of .Net 4.0 and there is no separate folder for .Net 4.5 and that you need to do nothing else to target .Net 4.5.

However you can find a separate folder for .Net 4.5 at: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\

Is somebody could explain why there is this apparent contradiction ?

Thanks in advance,
User avatar
PGilbert
 
Posts: 362
Joined: Sun Dec 13, 2009 8:46 pm
Location: Montréal, Québec, Canada

Re: How to target .Net 4.5 with version 14.1 ?

Postby PGilbert on Tue Aug 11, 2015 1:41 am

And also I found where was System.Speech.dll dll, it was hidden in the WPF folder. If I do the following it is working now:

Code: Select all
      ⎕using←'System.Speech.Synthesis,WPF/System.Speech.dll'
      speaker←⎕new SpeechSynthesizer
      speaker.Speak(⊂'hello from APL')
User avatar
PGilbert
 
Posts: 362
Joined: Sun Dec 13, 2009 8:46 pm
Location: Montréal, Québec, Canada

Re: How to target .Net 4.5 with version 14.1 ?

Postby Vince|Dyalog on Tue Aug 11, 2015 2:06 pm

Hi Pierre,

I searched for "reference assemblies purpose" and found these links:

http://blogs.msdn.com/b/msbuild/archive ... ation.aspx
http://stackoverflow.com/questions/9701 ... me-version

I think the purpose of the reference assemblies directories is just to have a copy of those assemblies for your reference while developing.

FYI, I have .NET framework 4.5 on my machine, but I don't have a 4.0 or 4.5 in my reference assemblies directory...

Regards,

Vince
Vince|Dyalog
 
Posts: 301
Joined: Wed Oct 01, 2008 9:39 am

Re: How to target .Net 4.5 with version 14.1 ?

Postby PGilbert on Tue Aug 11, 2015 2:28 pm

Thanks Vince, well done, this is answering my question.
User avatar
PGilbert
 
Posts: 362
Joined: Sun Dec 13, 2009 8:46 pm
Location: Montréal, Québec, Canada

Re: How to target .Net 4.5 with version 14.1 ?

Postby MikeBa on Wed Oct 07, 2015 2:21 pm

To add to the clarification or the confusion. I am using V14.0 64bit under Windows 10. During installation of VS 2015 Express, System.Speech.dll (v4.6) is put into folder WPF rather than the parent folder C:\Windows\Microsoft.NET\Framework64\v4.0.30319\ used prior to installing VS.
MikeBa
 
Posts: 27
Joined: Thu Mar 14, 2013 11:40 am


Return to Microsoft.NET

Who is online

Users browsing this forum: No registered users and 1 guest