diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000..2a46104677 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,22 @@ +language: csharp +sudo: false +dist: trusty +env: + global: + - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true + - DOTNET_CLI_TELEMETRY_OPTOUT: 1 +mono: none +os: + - linux + - osx +osx_image: xcode8.2 +branches: + only: + - master + - release + - dev + - /^(.*\/)?ci-.*$/ +before_install: + - if test "$TRAVIS_OS_NAME" == "osx"; then brew update; brew install openssl; ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/; ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/; fi +script: + - ./build.sh diff --git a/MetaPackages.sln b/MetaPackages.sln index 95ab066bb5..19e46291d0 100644 --- a/MetaPackages.sln +++ b/MetaPackages.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26424.2 +VisualStudioVersion = 15.0.26412.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{ED834E68-51C3-4ADE-ACC8-6BA6D4207C09}" EndProject @@ -49,6 +49,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-archive", "src\dotne EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Archive", "src\Microsoft.DotNet.Archive\Microsoft.DotNet.Archive.csproj", "{302400A0-98BB-4C04-88D4-C32DC2D4B945}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TrimDeps", "tools\TrimDeps\TrimDeps.csproj", "{67E4C92F-6D12-4C52-BB79-B8D11BFC6B82}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -99,6 +101,10 @@ Global {302400A0-98BB-4C04-88D4-C32DC2D4B945}.Debug|Any CPU.Build.0 = Debug|Any CPU {302400A0-98BB-4C04-88D4-C32DC2D4B945}.Release|Any CPU.ActiveCfg = Release|Any CPU {302400A0-98BB-4C04-88D4-C32DC2D4B945}.Release|Any CPU.Build.0 = Release|Any CPU + {67E4C92F-6D12-4C52-BB79-B8D11BFC6B82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {67E4C92F-6D12-4C52-BB79-B8D11BFC6B82}.Debug|Any CPU.Build.0 = Debug|Any CPU + {67E4C92F-6D12-4C52-BB79-B8D11BFC6B82}.Release|Any CPU.ActiveCfg = Release|Any CPU + {67E4C92F-6D12-4C52-BB79-B8D11BFC6B82}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -118,5 +124,6 @@ Global {9BBA7A0A-109A-4AC8-B6EF-A52EA7CF1D90} = {9E49B5B9-9E72-42FB-B684-90CA1B1BCF9C} {AE4216BF-D471-471B-82F3-6B6D004F7D17} = {ED834E68-51C3-4ADE-ACC8-6BA6D4207C09} {302400A0-98BB-4C04-88D4-C32DC2D4B945} = {ED834E68-51C3-4ADE-ACC8-6BA6D4207C09} + {67E4C92F-6D12-4C52-BB79-B8D11BFC6B82} = {ED834E68-51C3-4ADE-ACC8-6BA6D4207C09} EndGlobalSection EndGlobal diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000000..1041615c68 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,14 @@ +init: + - git config --global core.autocrlf true +branches: + only: + - master + - release + - dev + - /^(.*\/)?ci-.*$/ +build_script: + - ps: .\build.ps1 +clone_depth: 1 +test: off +deploy: off +os: Visual Studio 2017 diff --git a/build/common.props b/build/common.props index 6718ac85dd..23cc402e92 100644 --- a/build/common.props +++ b/build/common.props @@ -185,8 +185,14 @@ + + + + + + diff --git a/build/dependencies.props b/build/dependencies.props index c2c1448f9a..440a49b3d6 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -5,6 +5,7 @@ 1.0.0-* 4.3.0 2.0.0-* + 10.0.1 15.0.0 2.2.0 diff --git a/build/repo.targets b/build/repo.targets index 9511356ec3..54067bb6c8 100644 --- a/build/repo.targets +++ b/build/repo.targets @@ -6,6 +6,9 @@ $(RepositoryRoot)src\Microsoft.AspNetCore.RuntimeStore\ $(MetaPackagePath)Microsoft.AspNetCore.RuntimeStore.csproj + $(RepositoryRoot)tools\Microsoft.AspNetCore.HostingStartup.Template\ + $(HostingStartupTemplatePath)Microsoft.AspNetCore.HostingStartup.Template.csproj + $(RepositoryRoot)src\Archive.AspNetCore.All\ $(FallbackArchiveDir)Archive.AspNetCore.All.csproj @@ -14,9 +17,9 @@ $(MetaPackagePath)bin\work\ $(MetaPackagePath)bin\packageCache\ - $(MetaPackagePath)bin\deps\ $(RepositoryRoot)artifacts\ $(ArtifactsDir)zip\ + $(ArtifactsDir)deps\ $(ArtifactsZipDir)ts\ $(ArtifactsZipDir)nt\ $(ArtifactsDir)temp\ @@ -36,7 +39,7 @@ Condition="Exists('$(DependencyBuildDirectory)')" /> - + @@ -57,7 +60,9 @@ - + + + diff --git a/src/Microsoft.AspNetCore.RuntimeStore/Microsoft.AspNetCore.RuntimeStore.csproj b/src/Microsoft.AspNetCore.RuntimeStore/Microsoft.AspNetCore.RuntimeStore.csproj index 0fbcd07cd7..3cce763f2b 100644 --- a/src/Microsoft.AspNetCore.RuntimeStore/Microsoft.AspNetCore.RuntimeStore.csproj +++ b/src/Microsoft.AspNetCore.RuntimeStore/Microsoft.AspNetCore.RuntimeStore.csproj @@ -9,14 +9,4 @@ - - - - - $([System.String]::Copy('%(Filename)').Replace('.deps','')) - - - - - diff --git a/tools/Microsoft.AspNetCore.HostingStartup.Template/Microsoft.AspNetCore.HostingStartup.Template.csproj b/tools/Microsoft.AspNetCore.HostingStartup.Template/Microsoft.AspNetCore.HostingStartup.Template.csproj new file mode 100644 index 0000000000..c3e6a50687 --- /dev/null +++ b/tools/Microsoft.AspNetCore.HostingStartup.Template/Microsoft.AspNetCore.HostingStartup.Template.csproj @@ -0,0 +1,22 @@ + + + + + + + netcoreapp2.0 + Exe + + + + + + + + + $(DepsOutputPath)\$(HostingStartupPackageName)\shared\Microsoft.NETCore.App\$(RuntimeFrameworkVersion)\$(HostingStartupPackageName).deps.json + + + + + diff --git a/tools/Microsoft.AspNetCore.HostingStartup.Template/Program.cs b/tools/Microsoft.AspNetCore.HostingStartup.Template/Program.cs new file mode 100644 index 0000000000..8cd3c0026c --- /dev/null +++ b/tools/Microsoft.AspNetCore.HostingStartup.Template/Program.cs @@ -0,0 +1,7 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +public class Program +{ + public static void Main() { } +} \ No newline at end of file diff --git a/tools/TrimDeps/Program.cs b/tools/TrimDeps/Program.cs new file mode 100644 index 0000000000..639c620f52 --- /dev/null +++ b/tools/TrimDeps/Program.cs @@ -0,0 +1,48 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System.IO; +using System.Linq; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; + +public class Program +{ + public static void Main(string[] args) + { + ChangeEntryPointLibraryName(args[0]); + } + + private static void ChangeEntryPointLibraryName(string depsFile) + { + JToken deps; + using (var file = File.OpenText(depsFile)) + using (JsonTextReader reader = new JsonTextReader(file)) + { + deps = JObject.ReadFrom(reader); + } + + string version = null; + foreach (JProperty target in deps["targets"]) + { + var targetLibrary = target.Value.Children().FirstOrDefault(); + if (targetLibrary == null) + { + continue; + } + + targetLibrary.Remove(); + } + if (version != null) + { + var library = deps["libraries"].Children().First(); + library.Remove(); + + using (var file = File.CreateText(depsFile)) + using (var writer = new JsonTextWriter(file) { Formatting = Formatting.Indented }) + { + deps.WriteTo(writer); + } + } + } +} \ No newline at end of file diff --git a/tools/TrimDeps/TrimDeps.csproj b/tools/TrimDeps/TrimDeps.csproj new file mode 100644 index 0000000000..2c7bcd5e41 --- /dev/null +++ b/tools/TrimDeps/TrimDeps.csproj @@ -0,0 +1,15 @@ + + + + + + + netcoreapp2.0 + Exe + + + + + + +