You've already forked linux-packaging-mono
Imported Upstream version 5.20.0.180
Former-commit-id: ff953ca879339fe1e1211f7220f563e1342e66cb
This commit is contained in:
parent
0e2d47d1c8
commit
0510252385
6
external/corert/samples/WebApi/Startup.cs
vendored
6
external/corert/samples/WebApi/Startup.cs
vendored
@ -8,6 +8,7 @@ using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Mvc.ApplicationParts;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
@ -27,6 +28,11 @@ namespace SampleWebApi
|
||||
// This method gets called by the runtime. Use this method to add services to the container.
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
// Override automatic discovery of Application parts done by MVC. It is not compatible with single file compilation.
|
||||
var applicationPartManager = new ApplicationPartManager();
|
||||
applicationPartManager.ApplicationParts.Add(new AssemblyPart(typeof(Startup).Assembly));
|
||||
services.Add(new ServiceDescriptor(typeof(ApplicationPartManager), applicationPartManager));
|
||||
|
||||
services.AddMvcCore().AddJsonFormatters();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user