cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Using .NET 4.5 features

Former Member
0 Likes
1,901

Hi,

is there a way to use the .NET 4.5 framework with PB.NET (12.5 or 12.6)?

My script:

System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12!

The system.dll in the references contains the Tls12 and it is also provided by autoscript.

But if I compile the app I get:

'System.Net.SecurityProtocolType' does not contain a definition for 'Tls12'


Tls12 is new in .NET 4.5. So I think that the compiler uses an older version of the framework.


What can I do?


Thanks.

View Entire Topic
Former Member
0 Likes

Also, I forgot to ask which version of the sdk is installed on you pc... But you probably allready checked that...

Former Member
0 Likes

I have installed:

.NET Framework 2.0 SDK

.NET Framework 4 Multi-Targeting Pack

.NET Framework 4.5.1

Windows SDK for Windows 7 (7.0)

Former Member
0 Likes

It seems that Powerbuilder uses not the compiler of .NET 4.5.

I have different versions of csc.exe installed. I have moved the directory with .NET 4.5 to the beginning of the PATH. But Powerbuilder still uses another compiler.

Is there a way to specify the compiler?

Former Member
0 Likes

You are right. But it may work if you import the appropriate references.

Take a look at the references... Select System.NET

After look at the properties for the selected references.

For me it always shows that it references .net framework 4.0.

But you can change that by manually removing the references and add them using Browse.

Don't know if it will work... But you can try... Attention... This should be done to all references, otherwise it may not work.

Andreas.

Former Member
0 Likes

The windows SDK 7 should have framework 4. I wonder if you need to install Windows SDK 8.0 to go with framework 4.5...

https://msdn.microsoft.com/en-us/vstudio/dn250998.aspx

(By the way for me it doesn't work in a windows 8.1 machine with visual studio 2013 and frameworks up to 4.5.2, but the windows sdk I installed on that machine is windows 7 SDK).

Andreas.

Former Member
0 Likes

It will all be fixed in Windows 10 ...