How do we get the ReSharper Test Runner 9.2 to target .Net 4.6, so it supports TLS 1.2 by default?

We have some Manual Integration tests that hit a Salesforce WebService Endpoint that requires TLS 1.1.   We have upgraded our projects to use .Net 4.6 which resolves to TLS 1.2 by default.  However, when we use the ReSharper 9.2 TestRunner to invoke the manual integration tests (which are using NUnit 2.6.4), Salesforce throws and error saying we're using TLS 1.0 and that we need to be using TLS 1.1 or higher.  Now, we can use ServicePointManager to force TLS 1.2, but we're trying to also test that our .Net 4.6 projects are resolving to TLS 1.2 as well.  We have also tried setting the targetFramework to .Net 4.6 in JetBrains.ReSharper.TaskRunner.CLR4.x64.exe.config, but it still resolves to TLS 1.0 (so we're guessing it's targeting .Net 4.5 or under).  When we run the same code under the context of a website or a windows form app, we have no issues and don't need the ServicePointManager to force TLS 1.2.  What are we missing here?  Is ReSharper 9.2 not able to target .Net 4.6? 

 

How do we get the ReSharper Test Runner to target .Net 4.6, so it supports TLS 1.2 by default? 

 

Salesforce Error:

System.Web.Services.Protocols.SoapException : UNSUPPORTED_CLIENT: TLS 1.0 has been disabled in this organization. Please use TLS 1.1 or higher when connecting to Salesforce using https.

Forcing to TLS 1.2 does work: 

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

2
1 comment
Avatar
Permanently deleted user

Is there already a solution?

We have a similar problem. If we are running tests then the ServicePointManager.SecurityProtocol has an other configuration than running the wpf application. If I use a nunit compiled using .net 4.6.1 then everything works fine. 

 

 

0

Please sign in to leave a comment.