Page 1 of 1

How to target .Net 4.5 with version 14.1 ?

Posted: Mon Jun 29, 2015 12:32 pm
by PGilbert
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

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

Posted: Tue Jun 30, 2015 8:14 am
by AndyS|Dyalog
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.

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

Posted: Tue Jun 30, 2015 11:33 am
by PGilbert
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.

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

Posted: Tue Jul 28, 2015 5:50 pm
by PGilbert
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.

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

Posted: Tue Aug 11, 2015 1:26 am
by PGilbert
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,

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

Posted: Tue Aug 11, 2015 1:41 am
by PGilbert
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')

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

Posted: Tue Aug 11, 2015 2:06 pm
by Vince|Dyalog
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

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

Posted: Tue Aug 11, 2015 2:28 pm
by PGilbert
Thanks Vince, well done, this is answering my question.

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

Posted: Wed Oct 07, 2015 2:21 pm
by MikeBa
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.