[Asp.net] Running the project prompts "Failed to load file or assembly "Newtonsoft.Json" or one of its dependencies. The found assembly manifest definition does not match the assembly reference" solution (solved)

1. Open web.config and add it under <configuration>

	<runtime>
		<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
			<dependentAssembly>
				<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
				<bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="4.0.0.0" />
			</dependentAssembly>
		</assemblyBinding>
	</runtime>

2. Change the version number of newVersion="4.0.0.0" to the version number in your system. The search of the version number is very simple: you generate a project, and there is a prompt in the position in the figure below.

Guess you like

Origin blog.csdn.net/dxnn520/article/details/123256353