Rollback to 1.0.1 and launch settings
This commit is contained in:
Родитель
26fb1ece46
Коммит
8a665bd44e
|
@ -4,13 +4,9 @@
|
|||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="wwwroot\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.5" />
|
||||
<PackageReference Include="Unity.Microsoft.DependencyInjection" Version="2.0.1" />
|
||||
<PackageReference Include="Unity.Microsoft.DependencyInjection" Version="1.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace AspNetCoreExample
|
|||
public class Program
|
||||
{
|
||||
// Optional root container.
|
||||
private static readonly IUnityContainer _container = new UnityContainer();
|
||||
private static readonly IUnityContainer _container = new UnityContainer();
|
||||
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
|
@ -20,9 +20,8 @@ namespace AspNetCoreExample
|
|||
|
||||
public static IWebHost BuildWebHost(string[] args) =>
|
||||
WebHost.CreateDefaultBuilder(args)
|
||||
//.UseUnityServiceProvider() // Could use either one of these
|
||||
.UseUnityServiceProvider(_container) // Could use either one of these
|
||||
.UseStartup<Startup>()
|
||||
.Build();
|
||||
.ConfigureServices(s => s.AddUnity())
|
||||
.UseStartup<Startup>()
|
||||
.Build();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"profiles": {
|
||||
"AspNetCoreExample": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "api/values",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
},
|
||||
"applicationUrl": "http://localhost:55484/"
|
||||
}
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче