5

I'm attempting to setup a self-hosted OWin app (using VS2012) - I think it's close since I can run OwinHost.exe from the directory containing the .csproj and application serves from localhost:5000 correctly. I created a default nuspec file and added the following

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

in AssemblyInfo.cs

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

When I install the package ( nuget install mypackage ) I get the following error...

Starting with the default port: 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

Let me know if you would like more info

Cheers!

MikeW
  • 4,749
  • 9
  • 42
  • 83

2 Answers2

5

Go into Manage Nuget Packages for Solution... on the solution, choose Updates and click Update All (or select the owin related ones as applicable).

This fixed it for me.

Original Error:

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

After Updating Nuget Packages:

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

Luke
  • 22,826
  • 31
  • 110
  • 193
  • 1
    For anyone that still has the problem, take a look at this answer: http://stackoverflow.com/a/31675238/205859 – Ufuk Hacıoğulları Jul 28 '15 at 11:41
  • updated all installed "Owin" related NuGet packages to the current version (as of today: v3.1.0) seems to have worked for me. Thanks for the tip – bkwdesign Apr 20 '17 at 17:16
-1

Solved with some old school beyond comparing - folder structure was incorrect, I set nuspec targets for views/* and web.config under "content" instead of "" - now all works.

MikeW
  • 4,749
  • 9
  • 42
  • 83