Visual studio 2012-Projekt - Nicht in der Lage zu laden " Newtonsoft.Json'

Läuft auf einem windows phone-Projekt in VS 2012, war ich immer dieser Fehler:

    {System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.
File name: 'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'
   at MobileConnection.SSCClient.SSCConnection.GetHostNameAndPort()
   at MobileConnection.SSCClient.SSCConnection.InitializeSSCConnection(Boolean runningState)}

Den entsprechenden Einträgen .csproj-Datei ist:

    <Reference Include="Newtonsoft.Json">
  <HintPath>..\packages\Newtonsoft.Json.4.5.11\lib\sl4-windowsphone71\Newtonsoft.Json.dll</HintPath>
</Reference>

Und, in Pakete.config:

  <package id="Newtonsoft.Json" version="4.5.11" targetFramework="wp80" />

Ich ausgetestet, es für eine Weile, neu installiert, das newtonsoft.json-Paket über nuget.
Aber die Lösung, die bei mir funktioniert ist die Einstellung der 'private' - Eigenschaft auf 'True'.

Aktualisierten Eintrag .csproj Datei:

<Reference Include="Newtonsoft.Json">
  <HintPath>..\packages\Newtonsoft.Json.4.5.11\lib\sl4-windowsphone71\Newtonsoft.Json.dll</HintPath>
   <Private>True</Private>
</Reference>

Ich bin nicht in der Lage zu verstehen, wie es funktioniert oder was das Problem war. Die Beschreibung auf der msdn-Dokumentation nicht viel helfen, entweder http://msdn.microsoft.com/en-us/library/vstudio/bb629388.aspx.

InformationsquelleAutor db42 | 2013-06-08

Schreibe einen Kommentar