gpt4 book ai didi

c# - OWIN Webapi 应用程序在与 nuget 捆绑时收到 "System.ArgumentException no conversion available..."

转载 作者:太空狗 更新时间:2023-10-29 23:23:09 25 4
gpt4 key购买 nike

我正在尝试设置一个自托管的 OWin 应用程序(使用 VS2012)——我认为它已经接近于我可以从包含 .csproj 的目录运行 OwinHost.exe,应用程序从 localhost:5000 正确服务。我创建了一个默认的 nuspec 文件并添加了以下内容

<files>
<file src="bin\*.dll" target="bin" />
<file src="views\home\home.html" target="content" />
<file src="web.config" target="content" />
</files>

在 AssemblyInfo.cs 中

[assembly: OwinStartup(typeof(TestA.Startup))]

当我安装包 ( nuget install mypackage ) 时,出现以下错误...

从默认端口开始:5000...

Error:  System.ArgumentException
No conversion available between
System.Func`2[System.Collections.Generic.IDictionary`2[System.String,System.Object],
System.Threading.Tasks.Task] and Microsoft.Owin.OwinMiddleware.
Parameter name: signature

如果您想了解更多信息,请告诉我

干杯!

最佳答案

进入 Manage Nuget Packages for Solution... 在解决方案上,选择 Updates 并单击 Update All(或选择 owin 相关适用的)。

这为我解决了问题。

原始错误:

Error: System.ArgumentException No conversion available between System.Func2[System.Collections.Generic.IDict
ionary
2[System.String,System.Object],System.Threading.Tasks.Task] and Microsoft .Owin.OwinMiddleware. Parameter name: signature

更新 Nuget 包后:

Starting with the default port: 5000 (http://localhost:5000/) Started successfully Press Enter to exit

关于c# - OWIN Webapi 应用程序在与 nuget 捆绑时收到 "System.ArgumentException no conversion available...",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20114434/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com