Bug 3101 - Cannot use System.Json.dll with nUnit due to "Strong name validation failed."
Summary: Cannot use System.Json.dll with nUnit due to "Strong name validation failed."
Alias: None
Product: Android
Classification: Xamarin
Component: BCL Class Libraries ()
Version: 4.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2012-01-26 21:56 UTC by Chris Hardy [MSFT]
Modified: 2012-04-18 05:14 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Chris Hardy [MSFT] 2012-01-26 21:56:48 UTC
Steps to reproduce the error:

* Create a MFA Class Library
* Add nUnit (I'm using latest version from NuGet)
* Add reference to System.Json.dll

In Class1,

* Add the usings for nUnit.Framework and System.Json
* Add the TestFixture attribute
* Create a Test method

var json = @"{""id"":1};
var primitive= new JsonPrimitive(json);

If the CopyLocal property of the reference to System.Json.dll is false, the error will be "The system cannot find the file specified."

If CopyLocal is true, the error will be "Strong name validation failed."
Comment 2 Atsushi Eno 2012-02-07 05:53:51 UTC
How could this application or library or whatever be built with Mono for Android and run NUnit on VS? To my understanding, they reside in different framework and hence it shouldn't work.

Unlike other System.* assemblies, System.Json.dll is not available in the .NET full profile, so it is likely that it failed to resolve it as a full .NET library.
Comment 3 Atsushi Eno 2012-04-18 05:14:21 UTC
Resolving as invalid as per my comment above.