Tuesday, 21 October 2014

ReSharper Type Members Layout

Here's the custom layout I use with ReSharper to keep StyleCop (and me) happy.

Update the custom layout (ReSharper | Options | Code Editing | C# | Type Members Layout | Custom Layout) with the following and 'ReSharper | Tools | Cleanup Code...' to use it:

TeamCity NUnit + App.Config

WCF is hard enough without the NUnit tests in TeamCity throwing up:

SetUp method failed. SetUp : System.InvalidOperationException : Could not find endpoint element with name 'selfHostingClientEndpointFormat' and contract 'TestModelServerServiceReference.IModelServerService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this name could be found in the client element.

I wouldn't mind so much but the tests work fine within Visual Studio and using NUnit console/GUI.

It turns out that the JetBrains.BuildServer.NUnitLauncher.exe uses a different strategy to find the application config files to NUnit.

Throw a test Assembly at NUnit and it uses the assembly's config file (*.dll.config) BUT the JetBrains NUnitLauncher assumes an App.Config in the same folder instead ... why???