---
# System prepended metadata

title: ASP.NET Json套件版本衝突解法
tags: [ASP.NET, C#]

---

#### 遭遇錯誤訊息
`Could not load file or assembly 'Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependancies. The system cannot find the file specified.`

##### 找到你的.csproj 找到這段，直接把版本改成13或Nuget最新版本
 ```
 <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
      <HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
```

##### 這段要直接拿掉的 他不可以在去參考舊的了
  ```
<ItemGroup>
    <Reference Include="Newtonsoft.Json">
      <HintPath>..\packages\Newtonsoft.Json.11.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
    </Reference>
  </ItemGroup>
```