Unit test calling WCF by basicHttpsBinding not working in Resharper 8.2

Hi!
I have a unit test which calls a WCF service, using basicHttpsBinding (new in .NET 4.5). If I run the unit test with the built in test engine in Visual Studio 2013 all works fine, but trying to do the same with Resharper 8.2 gets the following exception:

A first chance exception of type 'System.Configuration.ConfigurationErrorsException' occurred in System.Configuration.dll
Additional information: Configuration binding extension 'system.serviceModel/bindings/basicHttpsBinding' could not be found. Verify that this binding extension is properly registered in system.serviceModel/extensions/bindingExtensions and that it is spelled correctly.


I guess the reason is that Resharper starts up the test session running .NET 4.0 instead of 4.5. Am I right and can I do anything about it? Changing the framwork to CLR4 instead of Automatic doesn't change anything.

All assemblies are compiled for .NET 4.5. In the app.config file for the test project the bindings are declared:

  <system.serviceModel>
    <protocolMapping>
      <add binding="basicHttpsBinding" scheme="https" />
    </protocolMapping>
        <bindings>
      <basicHttpsBinding>
        <binding name="BasicHttpsBinding_IVanService" ... >
          ...
                </binding>
      </basicHttpsBinding>
    </bindings>
    <client>
           <endpoint address="..." binding="basicHttpsBinding" contract="Hogia.Business.Common.Van.Facades.ServiceContracts.IVanService" name="BasicHttpsBinding_IVanService" />
    </client>
  </system.serviceModel>



Best regards

Daniel Bengtsson
Hogia Business Products, Sweden

3 comments
Comment actions Permalink

Hello Daniel,

  Did you try to tick ReSharper | Options | Tools | Unit Testing | Use separate AppDomain for each assembly with tests?

Thanks!

0
Comment actions Permalink

Yes, I have tried to use separate AppDomain for each assembly. It unfortunally does not change anything.

Best regards

Daniel Bengtsson
Hogia Business Products, Sweden

0
Comment actions Permalink

In this case, are you able to reproduce the issue in a sample solution and then send me it?

0

Please sign in to leave a comment.