Gemini Community Support Site

This Gemini community support site can be used to find solutions to product issues. You can log in using Open Id, Google Profile and even Facebook. Feel free to ask a question or browse FAQs and documentation. Product tour videos are also available along with how-to videos demonstrating key Gemini capabilities.




JSON

api

I get the following message when using a copy of the API .dlls that I downloaded today.  I think I need to include a reference to JSON, but I cannot determine which version--I've tried three, and all give me a public key token mismatch.

How do I handle it?

Exception information follows.

Without JSON:

System.IO.FileNotFoundException was unhandled
  Message="Could not load file or assembly 'Newtonsoft.Json, Version=3.5.0.0, Culture=neutral, PublicKeyToken=0e17ff0349390ca9' or one of its dependencies. The system cannot find the file specified."
  Source="CounterSoft.Gemini.WebServices"
  FileName="Newtonsoft.Json, Version=3.5.0.0, Culture=neutral, PublicKeyToken=0e17ff0349390ca9"
  FusionLog="=== Pre-bind state information ===\r\nLOG: User = [Redacted]
\r\nLOG: DisplayName = Newtonsoft.Json, Version=3.5.0.0, Culture=neutral, PublicKeyToken=0e17ff0349390ca9\n (Fully-specified)\r\nLOG: Appbase = file:///C:/Documents and Settings/jmccormick/My Documents/Visual Studio 2008/Projects/geminiTests/geminiTests/bin/Debug/\r\nLOG: Initial PrivatePath = NULL\r\nCalling assembly : CounterSoft.Gemini.WebServices, Version=3.6.1.2571, Culture=neutral, PublicKeyToken=0e17ff0349390ca9.\r\n===\r\nLOG: This bind starts in default load context.\r\nLOG: No application configuration file found.\r\nLOG: Using machine configuration file from c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.\r\nLOG: Post-policy reference: Newtonsoft.Json, Version=3.5.0.0, Culture=neutral, PublicKeyToken=0e17ff0349390ca9\r\nLOG: The same bind was seen before, and was failed with hr = 0x80070002.\r\n"
  StackTrace:
       at CounterSoft.Gemini.WebServices.BaseService.GetObjectFromResponse[T](Stream stream)
       at CounterSoft.Gemini.WebServices.BaseService.ThrowResponseException(WebResponse response)
       at CounterSoft.Gemini.WebServices.BaseService.ProcessResponse[T](String url, Object obj, RequestType requestType)
       at CounterSoft.Gemini.WebServices.BaseService.GetResponse[T](String url, Object o, RequestType r)
       at CounterSoft.Gemini.WebServices.BaseService.WhoAmI()
       at geminiTests.Program.Main(String[] args) in C:\Documents and Settings\jmccormick\My Documents\Visual Studio 2008\Projects\geminiTests\geminiTests\Program.cs:line 21
       at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart
Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:

With JSON referenced:

System.IO.FileLoadException was unhandled
  Message="Could not load file or assembly 'Newtonsoft.Json, Version=3.5.0.0, Culture=neutral, PublicKeyToken=0e17ff0349390ca9' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"
  Source="CounterSoft.Gemini.WebServices"
  FileName="Newtonsoft.Json, Version=3.5.0.0, Culture=neutral, PublicKeyToken=0e17ff0349390ca9"
  FusionLog="=== Pre-bind state information ===\r\nLOG: User = [Redacted]\r\nLOG: DisplayName = Newtonsoft.Json, Version=3.5.0.0, Culture=neutral, PublicKeyToken=0e17ff0349390ca9\n (Fully-specified)\r\nLOG: Appbase = file:///C:/Documents and Settings/jmccormick/My Documents/Visual Studio 2008/Projects/geminiTests/geminiTests/bin/Debug/\r\nLOG: Initial PrivatePath = NULL\r\nCalling assembly : CounterSoft.Gemini.WebServices, Version=3.6.1.2571, Culture=neutral, PublicKeyToken=0e17ff0349390ca9.\r\n===\r\nLOG: This bind starts in default load context.\r\nLOG: No application configuration file found.\r\nLOG: Using machine configuration file from c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.\r\nLOG: Post-policy reference: Newtonsoft.Json, Version=3.5.0.0, Culture=neutral, PublicKeyToken=0e17ff0349390ca9\r\nLOG: Attempting download of new URL file:///C:/Documents and Settings/jmccormick/My Documents/Visual Studio 2008/Projects/geminiTests/geminiTests/bin/Debug/Newtonsoft.Json.DLL.\r\nWRN: Comparing the assembly name resulted in the mismatch: PUBLIC KEY TOKEN\r\nERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.\r\n"
  StackTrace:
       at CounterSoft.Gemini.WebServices.BaseService.GetObjectFromResponse[T](Stream stream)
       at CounterSoft.Gemini.WebServices.BaseService.ThrowResponseException(WebResponse response)
       at CounterSoft.Gemini.WebServices.BaseService.ProcessResponse[T](String url, Object obj, RequestType requestType)
       at CounterSoft.Gemini.WebServices.BaseService.GetResponse[T](String url, Object o, RequestType r)
       at CounterSoft.Gemini.WebServices.BaseService.WhoAmI()
       at geminiTests.Program.Main(String[] args) in C:\Documents and Settings\jmccormick\My Documents\Visual Studio 2008\Projects\geminiTests\geminiTests\Program.cs:line 21
       at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart
Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:

photosinensis
· 1
photosinensis
Replies (1)
helpful
0
not helpful

It seems like the file is missing from the API download.
Please download the Gemini API test harness: http://www.countersoft.com/downloads/v36/CounterSoftGeminiAPITestHarnessv360.zip and use the DLLs from the Lib folder.


Mark Wing
· 9108
Mark Wing