duncansmart/LessCoffee

Won't load NUnit

Closed this issue · 5 comments

I get the following error:

Could not load file or assembly 'nunit.framework, Version=2.6.2.12296, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77' or one of its dependencies. The system cannot find the file specified.

My project uses NUnit 2.6.3.

Add an assemblyBinding to your config file:

<configuration>
    ...
    <runtime>
        <assemblyBinding>
            <dependentAssembly>
                <assemblyIdentity name="nunit.framework" publicKeyToken="96d09a1eb7f44a77" culture="neutral" />
                <bindingRedirect oldVersion="0.0.0.0-2.6.3.xxxx" newVersion="2.6.3.xxxx" />
            </dependentAssembly>
            ...
        </assemblyBinding>
    ...
    <runtime>
    ...
<configuration>

Where 2.6.3.xxxx is the actual version of NUnit 2.6.3

OK, had to install NUnit to the Web project for this to work. Is this really necessary? :)

Ah just realised I must have Nuget-ed a Debug build that has the tests. I'll do a release build that doesn't have the tests (or the NUnit dependency)...

OK latest version on Nuget removes the NUnit dependecy - also updated to less.js 2.5.0

Awesome, thanks!