.net 版本问题解决

You must add a reference to assembly 'netstandard, Version=2.0.0.0

解决方式

中找到了解决方法,在 .csproj 中手工添加如下的配置:

<Reference Include="netstandard">
      <Private>True</Private>
    </Reference>

Could not load file or assembly 'Newtonsoft.Json, Version=11.0.0.0

解决方式

Could not load file or assembly 'Newtonsoft.Json, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b9a188c8922137c6' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

http://stackoverflow.com/questions/3374279/help-me-for-json-unknown-problem

That assembly either needs to be placed in your applications root directory or in your GAC.

ExtAspNet依赖于Newtonsoft.Json.dll
ExtAspNet.dll只有一个For Net2.0的版本,无论你的项目是2.0、3.5、4.0,都只需要引用同一个ExtAspNet.dll即可。
而Newtonsoft.Json.dll为在每个DotNet下都有自己的版本,比如你的项目是基于.Net 2.0的,就要引用json.net\Net20\Newtonsoft.Json.dll,如果你的项目是基于.Net 4.0的,就要引用json.net\Net40\Newtonsoft.Json.dl

程序集需要放到项目根目录下面 如图:

发布了144 篇原创文章 · 获赞 43 · 访问量 132万+

猜你喜欢

转载自blog.csdn.net/qq_25889465/article/details/103842909