Use RuntimeFrameworkVersion instead for directory name (#82)
This commit is contained in:
parent
4f5727bb18
commit
08ec9a7e49
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -185,8 +185,14 @@
|
|||
<FullMetaPackageProjectReference Include="../Microsoft.AspNetCore/Microsoft.AspNetCore.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<HostingStartupPackageReference Include="Microsoft.AspNetCore.AzureAppServices.HostingStartup" Version="$(AspNetCoreVersion)" PrivateAssets="None" />
|
||||
<HostingStartupPackageReference Include="Microsoft.AspNetCore.ApplicationInsights.HostingStartup" Version="$(AspNetCoreVersion)" PrivateAssets="None" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<RuntimeStorePackageReference Include="@(FullMetaPackagePackageReference)" />
|
||||
<RuntimeStorePackageReference Include="@(HostingStartupPackageReference)" />
|
||||
<RuntimeStorePackageReference Include="Microsoft.AspNetCore" Version="$(AspNetCoreVersion)" PrivateAssets="None" />
|
||||
<RuntimeStorePackageReference Include="Microsoft.AspNetCore.AzureAppServices.HostingStartup" Version="$(AspNetCoreVersion)" PrivateAssets="None" />
|
||||
<RuntimeStorePackageReference Include="Microsoft.AspNetCore.AzureAppServicesIntegration" Version="$(AspNetCoreVersion)" PrivateAssets="None" />
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
<AspNetCoreIdentityServiceVersion>1.0.0-*</AspNetCoreIdentityServiceVersion>
|
||||
<CoreFxVersion>4.3.0</CoreFxVersion>
|
||||
<InternalAspNetCoreSdkVersion>2.0.0-*</InternalAspNetCoreSdkVersion>
|
||||
<NewtonsoftJsonVersion>10.0.1</NewtonsoftJsonVersion>
|
||||
<TestSdkVersion>15.0.0</TestSdkVersion>
|
||||
<XunitVersion>2.2.0</XunitVersion>
|
||||
</PropertyGroup>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@
|
|||
<MetaPackagePath>$(RepositoryRoot)src\Microsoft.AspNetCore.RuntimeStore\</MetaPackagePath>
|
||||
<MetaPackageFile>$(MetaPackagePath)Microsoft.AspNetCore.RuntimeStore.csproj</MetaPackageFile>
|
||||
|
||||
<HostingStartupTemplatePath>$(RepositoryRoot)tools\Microsoft.AspNetCore.HostingStartup.Template\</HostingStartupTemplatePath>
|
||||
<HostingStartupTemplateFile>$(HostingStartupTemplatePath)Microsoft.AspNetCore.HostingStartup.Template.csproj</HostingStartupTemplateFile>
|
||||
|
||||
<!-- Project for building the NuGet Fallback Archive (LZMA for CLI) -->
|
||||
<FallbackArchiveDir>$(RepositoryRoot)src\Archive.AspNetCore.All\</FallbackArchiveDir>
|
||||
<FallbackArchiveProj>$(FallbackArchiveDir)Archive.AspNetCore.All.csproj</FallbackArchiveProj>
|
||||
|
|
@ -14,9 +17,9 @@
|
|||
|
||||
<WorkingDirectory>$(MetaPackagePath)bin\work\</WorkingDirectory>
|
||||
<PackageCacheOutputPath>$(MetaPackagePath)bin\packageCache\</PackageCacheOutputPath>
|
||||
<DepsOutputPath>$(MetaPackagePath)bin\deps\</DepsOutputPath>
|
||||
<ArtifactsDir>$(RepositoryRoot)artifacts\</ArtifactsDir>
|
||||
<ArtifactsZipDir>$(ArtifactsDir)zip\</ArtifactsZipDir>
|
||||
<DepsOutputPath>$(ArtifactsDir)deps\</DepsOutputPath>
|
||||
<ArtifactsZipTimestampDir>$(ArtifactsZipDir)ts\</ArtifactsZipTimestampDir>
|
||||
<ArtifactsZipNoTimestampDir>$(ArtifactsZipDir)nt\</ArtifactsZipNoTimestampDir>
|
||||
<TempDir>$(ArtifactsDir)temp\</TempDir>
|
||||
|
|
@ -36,7 +39,7 @@
|
|||
Condition="Exists('$(DependencyBuildDirectory)')" />
|
||||
</Target>
|
||||
|
||||
<Target Name="BuildPackageCache" DependsOnTargets="UpdateNuGetConfig">
|
||||
<Target Name="BuildPackageCache" DependsOnTargets="UpdateNuGetConfig;Restore">
|
||||
<GetOSPlatform>
|
||||
<!-- Returns {Linux, macOS, Windows} -->
|
||||
<Output TaskParameter="PlatformName" PropertyName="OSPlatform" />
|
||||
|
|
@ -57,7 +60,9 @@
|
|||
<RemoveDir Directories="$(PackageCacheOutputPath)" />
|
||||
<RemoveDir Directories="$(WorkingDirectory)" />
|
||||
<Exec Command="dotnet store --manifest $(MetaPackageFile) --configuration Release --framework netcoreapp2.0 --runtime $(RID) --output $(PackageCacheOutputPath) --framework-version 2.0.0-* --working-dir $(WorkingDirectory)" />
|
||||
<MsBuild Projects="$(MetaPackageFile)" Targets="CollectDeps" Properties="DepsOutputPath=$(DepsOutputPath)"/>
|
||||
|
||||
<!--- MSBuild caches things if you run inproc so have to use Exec -->
|
||||
<Exec Command="dotnet msbuild /t:Restore;Rebuild;CollectDeps $(HostingStartupTemplateFile) /p:DepsOutputPath=$(DepsOutputPath);HostingStartupPackageName=%(HostingStartupPackageReference.Identity);HostingStartupPackageVersion=%(Version)"/>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageStoreManifestFiles Include="$(PackageCacheOutputPath)**\artifact.xml">
|
||||
|
|
|
|||
|
|
@ -9,14 +9,4 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="@(RuntimeStorePackageReference)" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="CollectDeps" DependsOnTargets="Restore;RunResolvePackageDependencies">
|
||||
<ItemGroup>
|
||||
<DepsFiles Include="%(FileDefinitions.ResolvedPath)" Condition="$([System.Text.RegularExpressions.Regex]::IsMatch('%(Identity)', '.*?\.HostingStartup\.deps\.json')) " >
|
||||
<PackageName>$([System.String]::Copy('%(Filename)').Replace('.deps',''))</PackageName>
|
||||
</DepsFiles>
|
||||
</ItemGroup>
|
||||
|
||||
<Copy SourceFiles="%(DepsFiles.FullPath)" DestinationFiles="$(DepsOutputPath)\%(DepsFiles.PackageName)\Microsoft.NETCore.App\2.0.0\deps.json" />
|
||||
</Target>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Import Project="..\..\build\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="$(HostingStartupPackageName)" Version="$(HostingStartupPackageVersion)" PrivateAssets="None" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="CollectDeps">
|
||||
<PropertyGroup>
|
||||
<DestinationDepsFile>$(DepsOutputPath)\$(HostingStartupPackageName)\shared\Microsoft.NETCore.App\$(RuntimeFrameworkVersion)\$(HostingStartupPackageName).deps.json</DestinationDepsFile>
|
||||
</PropertyGroup>
|
||||
<Copy SourceFiles="$(ProjectDepsFilePath)" DestinationFiles="$(DestinationDepsFile)" />
|
||||
<Exec Command="dotnet run --framework netcoreapp2.0 $([System.IO.Path]::GetFullPath('$(DestinationDepsFile)'))" WorkingDirectory="../TrimDeps/"/>
|
||||
</Target>
|
||||
</Project>
|
||||
|
|
@ -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() { }
|
||||
}
|
||||
|
|
@ -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<JProperty>().FirstOrDefault();
|
||||
if (targetLibrary == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
targetLibrary.Remove();
|
||||
}
|
||||
if (version != null)
|
||||
{
|
||||
var library = deps["libraries"].Children<JProperty>().First();
|
||||
library.Remove();
|
||||
|
||||
using (var file = File.CreateText(depsFile))
|
||||
using (var writer = new JsonTextWriter(file) { Formatting = Formatting.Indented })
|
||||
{
|
||||
deps.WriteTo(writer);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Import Project="..\..\build\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Loading…
Reference in New Issue