Reputation: 31
I am folloing Shaun Wildermuth's instructions, in order to run my first basic ASPNet app. He refers to Microsift.AspNet.StaticFiles, but the closest I find is "Microsoft.Owin.StaticFile" thru "Manage NuGet Packages..." option in VisualStudio 2015. Thanks.
Upvotes: 3
Views: 643
Reputation: 3313
The Microsoft.AspNet.StaticFiles is the package for new the ASP.NET Core (formely ASP.NET 5 and ASP.NET vNext). The other package Microsoft.Owin.StaticFile is for the current ASP.NET 4.5. ASP.NET Core is still in prelease and thus the packages also. When you are developing a ASP.NET 5 application add the package as following:
Install-Package Microsoft.AspNet.StaticFiles -Pre
In order to use the static files configure the middleware to add static files. This can be done inside the Startup.Configure method.
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
...
// Add static files to the request pipeline.
app.UseStaticFiles();
...
Upvotes: 2