我已经在.net核心网络应用程序上工作了大约3个月了。随着VS2017的发布,我想我本周末将它拉下来试试它的自动迁移以及新的enviro。当我这样做时,除了System.Net.Http引用外,一切顺利。
我收到了错误消息;
/components/departments/:name
由于这是在dll中,我真的不知道如何解决这个问题。解决这个问题以利用VS17会很好。任何帮助是极大的赞赏! 下面是我的csproj(不再是project.json)配置。
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1956,5): warning MSB3243: No way to resolve conflict between "System.Net.Http, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Net.Http, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "System.Net.Http, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily.
1>Consider app.config remapping of assembly "System.Net.Http, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "1.5.0.0" [C:\Users\reamj\.nuget\packages\microsoft.net.http\2.2.22\lib\portable-net40+sl4+win8+wp71+wpa81\System.Net.Http.dll] to Version "4.1.1.0" [C:\Users\reamj\.nuget\packages\system.net.http\4.3.0\ref\netstandard1.3\System.Net.Http.dll] to solve conflict and get rid of warning.

答案 0 :(得分:1)
...试
(1)删除<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="5.2.3" />
(您不应该需要此程序包在.net核心上运行WebApi。)
(2)将SendGrid更改为<PackageReference Include="Sendgrid" Version="9.0.12" />