danesparza / OWIN-WebAPI-Service

:white_check_mark: OWIN / WebAPI windows service example. Includes attribute based routing sample

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot start service: system.io.filenotfoundexception

jonayreyes opened this issue · comments

Hi! When I run the service via net start, I get an error on the Event Log stating "Could not load file or assembly 'Microsoft.Owin, Version=2.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'"

How do I set the required assemblies for the service to run?

Thanks in advance!

So if you just want to take a look at the sample project, you'll need to either grab the zip or clone the project in git (which it sounds like you did).

Before you build and install the service you'll need to do a 'Nuget package restore'. The easiest way to do this is probably to right-click on the solution in Visual Studio and select 'Manage Nuget packages for solution...'

You should see the 'Manage NuGet Packages' screen pop up. At the very top of the screen, you'll probably see a yellow message indicating that 'Some NuGet packages are missing from this solution. Click to restore from your online package sources.' with a Restore button. Go ahead and click Restore and then close the window once the missing packages have been downloaded.

Try your build again after that, and you should be good. Let me know if you continue to have issues!

OK, I'll let you know!

Cheers!