Rollback to 1.0.1 and launch settings

This commit is contained in:
Daniil Sokolyuk 2018-01-10 19:08:18 +03:00
Родитель 26fb1ece46
Коммит 8a665bd44e
3 изменённых файлов: 18 добавлений и 10 удалений

Просмотреть файл

@ -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/"
}
}
}