diff --git a/global.json b/global.json index 38c762a32d..281c9c59b3 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "projects": [ "src", "test" ], "sdk": { - "version": "1.0.0-rc1-final" + "version": "1.0.0-preview1-002702" } } diff --git a/src/Vault/Program.cs b/src/Vault/Program.cs new file mode 100644 index 0000000000..ab4f3553d5 --- /dev/null +++ b/src/Vault/Program.cs @@ -0,0 +1,20 @@ +using System.IO; +using Microsoft.AspNetCore.Hosting; + +namespace Bit.Vault +{ + public class Program + { + public static void Main(string[] args) + { + var host = new WebHostBuilder() + .UseKestrel() + .UseContentRoot(Directory.GetCurrentDirectory()) + .UseIISIntegration() + .UseStartup() + .Build(); + + host.Run(); + } + } +} diff --git a/src/Vault/Properties/launchSettings.json b/src/Vault/Properties/launchSettings.json index 323b7c6677..556917029c 100644 --- a/src/Vault/Properties/launchSettings.json +++ b/src/Vault/Properties/launchSettings.json @@ -12,14 +12,16 @@ "commandName": "IISExpress", "launchBrowser": true, "environmentVariables": { - "Hosting:Environment": "Development" + "ASPNETCORE_ENVIRONMENT": "Development" } }, - "web": { - "commandName": "web", + "Web": { + "commandName": "Project", + "launchBrowser": true, + "launchUrl": "http://localhost:5001", "environmentVariables": { - "Hosting:Environment": "Development" + "ASPNETCORE_ENVIRONMENT": "Development" } } } -} \ No newline at end of file +} diff --git a/src/Vault/Startup.cs b/src/Vault/Startup.cs index ea5f2bb964..44bc9ce696 100644 --- a/src/Vault/Startup.cs +++ b/src/Vault/Startup.cs @@ -1,6 +1,5 @@ using System; -using Microsoft.AspNet.Builder; -using Microsoft.AspNet.Hosting; +using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.DependencyInjection; namespace Bit.Vault @@ -11,11 +10,7 @@ namespace Bit.Vault public void Configure(IApplicationBuilder app) { - app.UseIISPlatformHandler(); app.UseFileServer(); } - - // Entry point for the application. - public static void Main(string[] args) => WebApplication.Run(args); } } diff --git a/src/Vault/Vault.xproj b/src/Vault/Vault.xproj index a890f7f5a5..08d3201095 100644 --- a/src/Vault/Vault.xproj +++ b/src/Vault/Vault.xproj @@ -4,16 +4,17 @@ 14.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - + 0bebf47c-ba0b-48ac-b48c-718f94084ad5 Bit.Vault - ..\..\artifacts\obj\$(MSBuildProjectName) - ..\..\artifacts\bin\$(MSBuildProjectName)\ + .\obj + .\bin\ + v4.6 2.0 4001 - + \ No newline at end of file diff --git a/src/Vault/project.json b/src/Vault/project.json index 26ec0c3b60..c57fbdda66 100644 --- a/src/Vault/project.json +++ b/src/Vault/project.json @@ -1,27 +1,49 @@ { "version": "0.0.1", - "environment": "Development", + "environment": "Development", "dependencies": { - "Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final", - "Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final", - "Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final" + "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-rc2-final", + "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-final", + "Microsoft.AspNetCore.StaticFiles": "1.0.0-rc2-final" }, - "commands": { - "web": "Microsoft.AspNet.Server.Kestrel" + "tools": { + "Microsoft.AspNetCore.Server.IISIntegration.Tools": { + "version": "1.0.0-preview1-final", + "imports": "portable-net45+win8+dnxcore50" + } }, "frameworks": { - "dnx451": { } + "net46": { } }, - "exclude": [ - "wwwroot", - "node_modules" - ], - "publishExclude": [ - "**.user", - "**.vspscc" - ] + "buildOptions": { + "emitEntryPoint": true, + "preserveCompilationContext": true + }, + + "runtimeOptions": { + "gcServer": false, + "gcConcurrent": true + }, + + "publishOptions": { + "include": [ + "wwwroot", + "Views", + "settings.json", + "settings.Development.json", + "settings.Production.json", + "settings.Staging.json", + "web.config" + ] + }, + + "scripts": { + "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ] + }, + + "userSecretsId": "aspnet-Vault-20160519103145" } diff --git a/src/Vault/web.config b/src/Vault/web.config new file mode 100644 index 0000000000..7b3cb2073a --- /dev/null +++ b/src/Vault/web.config @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/Vault/wwwroot/_references.js b/src/Vault/wwwroot/_references.js index 7a03e08e2e..f6998200c6 100644 --- a/src/Vault/wwwroot/_references.js +++ b/src/Vault/wwwroot/_references.js @@ -47,24 +47,3 @@ /// /// /// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// diff --git a/src/Vault/wwwroot/web.config b/src/Vault/wwwroot/web.config deleted file mode 100644 index e780518bcd..0000000000 --- a/src/Vault/wwwroot/web.config +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - -