Box.V2 SDK deployment issue: Could not load file or assembly 'Nito.AsyncEx...' or one of its dependencies. A strongly-named assembly is required.

0

We've got the WCF project targeting .Net 4.0 under VS 2010 Win7 x64, please note that it is a signed assembly. The Box.V2 SDK has been installed through NuGet and the version we are using is 1.0.5.

The bad things started to happen once we tried to build the solution, the first issue was with the Box.V2 dll itself where we couldn't go forward due to the following error:

"Assembly generation failed -- Referenced assembly 'Box.V2' does not have a strong name".

We've managed to overcome this one by signing the assembly using the 'Brutal Developer .NET Assembly Strong-Name Signer (1.3.0.0)'.

After it got successfully built we bumped into the second problem whereas creating a BoxClient would throw an exception with the following message:

"Could not load file or assembly 'Nito.AsyncEx, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)".

We used the following code to instantiate the client:

var config = new BoxConfig(clientId, clientSecret, new Uri(redirectUri)); 
var client = new BoxClient(config); 

where clientId, clinetSecret and redirectUri are the parameters of our method.

Steps taken to resolve the issue:

  1. Nito.AsyncEx.dll was signed using the same aforementioned tool - same exception.
  2. Nito.AsyncEx assembly was upgraded to the latest version (2.1.3.0) where in fact they have tweaked it and used the strong name for their assemblies - still no luck.
  3. One of the issues submitted here (https://github.com/box/box-windows-sdk-v2/issues/3) had a similar problem and we tried to follow the suggested scenario however it did not help much.
  4. We tried to not sign our assembly at all but again in vain as same exception was thrown.
  5. We also tried to tweak and sign Box.V2.dll as described in here, but couldn't even build it afterwards as these errors were thrown:

The base class or interface 'System.Object' in assembly 'System.Runtime, Version=2.6.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' referenced by type 'Box.V2.BoxClient' could not be resolved

The base class or interface 'System.Object' in assembly 'System.Runtime, Version=2.6.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' referenced by type 'Box.V2.Config.BoxConfig' could not be resolved

So we are currently stuck deploying Box API in our product that is rather frustrating.

Any help is greatly appreciated.

c#
.net
wcf
strongname
signed-assembly
asked on Stack Overflow Jan 28, 2014 by Rodion Sychev • edited Jun 20, 2020 by Community

1 Answer

1

The Box team has provided us with the updates SDK that contained signed assemblies and that has worked out very well.

answered on Stack Overflow Jan 31, 2014 by Rodion Sychev

User contributions licensed under CC BY-SA 3.0