![](/img/trans.png)
[英]What NuGet package contains OptimisticConcurrencyException for DotNet Core?
[英]What causes a mismatch in a .net core nuget package that contains an abstract class requiring a dictionary
我已经设置了一个nuget包( https://www.nuget.org/packages/AlexaCore/ ),该文件是通过dotnet pack
通过参数/p:Version=%system.build.number%
从TeamCity变量中/p:Version=%system.build.number%
而创建的。
当我在另一个.netcore1.0应用程序中引用该程序包并创建新的AlexaIntent
Visual Studio 2017不会在GetResponseInternal
方法上保留正确的参数。 它应该是: Dictionary<string, Slot>
但默认为GetResponseInternal(System.Collections.Generic.Dictionary slots)
如果随后我正确签名,则Visual Studio指示该类未正确实现基类:
为什么会这样呢? 生成步骤无效还是某种程度上缺少必需的设置。
仅供参考, Slot
类存在于另一个包中:Alexa.Net( https://github.com/timheuer/alexa-skills-dotnet/tree/master/Alexa.NET ),应在我的项目csproj文件中的nuget定义中引用该类:
<ItemGroup>
<PackageReference Include="Alexa.NET" Version="1.0.2" />
<PackageReference Include="Amazon.Lambda.Core" Version="1.0.0" />
</ItemGroup>
如果我引用没有nuget的类库(即通过相同解决方案中的项目),则该问题不可见。
由于更新到最新版本的Resharper(2017.2),此问题不再可见。 我建议这样做。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.