Making this repo consume the dotnet-sdk-internal zip and produce a full core-sdk by using sdk-internal, runtime, lzma, templates and store. Also deleted a bunch of now, unecessary code. I am sure there is more to be deleted though.

This commit is contained in:
Livar Cunha 2017-10-11 17:17:28 -07:00
parent 94eeedfc4c
commit 62ae014c37
1342 changed files with 229 additions and 99652 deletions

View file

@ -1,23 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), testAsset.props))\testAsset.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp2.0;net451</TargetFrameworks>
<OutputType>Exe</OutputType>
<AssetTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">$(AssetTargetFallback);portable-net45+win8;dnxcore50</AssetTargetFallback>
<RuntimeIdentifiers>win7-x64;win7-x86;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.24-x64;opensuse.42.1-x64</RuntimeIdentifiers>
<RestoreAdditionalProjectSources Condition="'$(TEST_PACKAGES)' != ''">$(TEST_PACKAGES)</RestoreAdditionalProjectSources>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="dotnet-desktop-and-portable" Version="1.0.0-*" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="dotnet-dependency-tool-invoker" Version="1.0.0-*" />
</ItemGroup>
</Project>

View file

@ -1,15 +0,0 @@
// 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;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}

View file

@ -1,30 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TargetFramework>net46</TargetFramework>
<AssemblyName>AppWithRedirectsAndConfig</AssemblyName>
<OutputType>Exe</OutputType>
<RuntimeIdentifiers>win7-x64;win7-x86</RuntimeIdentifiers>
<RestoreAdditionalProjectSources Condition="'$(TEST_PACKAGES)' != ''">$(TEST_PACKAGES)</RestoreAdditionalProjectSources>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\src\*.cs" Exclude="bin\**;obj\**;**\*.xproj;packages\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="8.0.3" />
<PackageReference Include="Microsoft.AspNet.Mvc" Version="3.0.50813.1" />
<PackageReference Include="Unity.Mvc" Version="3.0.1304" />
<PackageReference Include="dotnet-desktop-binding-redirects" Version="1.0.0-*" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net46' ">
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="dotnet-dependency-tool-invoker" Version="1.0.0-*" />
</ItemGroup>
</Project>

View file

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="3.5.0.0" newVersion="8.0.0.0" />
<bindingRedirect oldVersion="4.5.0.0" newVersion="8.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Some.Foo.Assembly" publicKeyToken="814f48568d36eed5" culture="neutral" />
<bindingRedirect oldVersion="3.0.0.0" newVersion="5.5.5.1" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<appSettings>
<add key="Setting1" value="Hello"/>
<add key="Setting2" value="World"/>
</appSettings>
</configuration>

View file

@ -1,30 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TargetFramework>net46</TargetFramework>
<AssemblyName>AppWithRedirectsNoConfig</AssemblyName>
<OutputType>Exe</OutputType>
<RuntimeIdentifiers>win7-x64;win7-x86</RuntimeIdentifiers>
<RestoreAdditionalProjectSources Condition="'$(TEST_PACKAGES)' != ''">$(TEST_PACKAGES)</RestoreAdditionalProjectSources>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\src\*.cs" Exclude="bin\**;obj\**;**\*.xproj;packages\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="8.0.3" />
<PackageReference Include="Microsoft.AspNet.Mvc" Version="3.0.50813.1" />
<PackageReference Include="Unity.Mvc" Version="3.0.1304" />
<PackageReference Include="dotnet-desktop-binding-redirects" Version="1.0.0-*" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net46' ">
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="dotnet-dependency-tool-invoker" Version="1.0.0-*" />
</ItemGroup>
</Project>

View file

@ -1,52 +0,0 @@
// 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;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
namespace BindingRedirects
{
public class Program
{
private const string ExpectedNewtonSoftVersion = "8.0.0.0";
public static int Main(string[] args)
{
return VerifyJsonLoad();
}
private static int VerifyJsonLoad()
{
WriteLine("=======Verifying Redirected Newtonsoft.Json assembly load=======");
int result = 0;
try
{
var jsonAsm = typeof(Newtonsoft.Json.JsonConvert).Assembly;
var version = jsonAsm.GetName().Version.ToString();
if (version != ExpectedNewtonSoftVersion)
{
WriteLine($"Failure - Newtonsoft.Json: ExpectedVersion - {ExpectedNewtonSoftVersion}, ActualVersion - {version}");
result = -1;
}
}
catch (Exception ex)
{
WriteLine($"Failed to load type 'Newtonsoft.Json.JsonConvert'");
throw ex;
}
return result;
}
private static void WriteLine(string str)
{
var currentAssembly = Assembly.GetExecutingAssembly().GetName().Name;
Console.WriteLine($"{currentAssembly}: {str}");
}
}
}

View file

@ -1,14 +0,0 @@
// 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;
namespace DesktopAppWithNativeDep
{
public static class Program
{
public static void Main(string[] args)
{
}
}
}

View file

@ -1,13 +0,0 @@
{
"version": "1.0.0-*",
"dependencies": {
"PackageWithFakeNativeDep": "1.0.0-*",
"Microsoft.NETCore.Platforms": "1.0.1"
},
"buildOptions": {
"emitEntryPoint": true
},
"frameworks": {
"net451": {}
}
}

View file

@ -1,14 +0,0 @@
// 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;
namespace DesktopAppWithRuntimes
{
public static class Program
{
public static void Main(string[] args)
{
}
}
}

View file

@ -1,15 +0,0 @@
{
"version": "1.0.0-*",
"dependencies": {
"Microsoft.NETCore.Windows.ApiSets": "1.0.1-rc3-24206-00"
},
"buildOptions": {
"emitEntryPoint": true
},
"frameworks": {
"net451": {}
},
"runtimes": {
"win7-x64": {}
}
}

View file

@ -1,20 +0,0 @@
{
"version": "1.0.0-*",
"dependencies": {
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-20113",
"Microsoft.AspNetCore.Hosting": "1.0.0-rc2-20113",
"Microsoft.Extensions.Logging.Console": "1.0.0-rc2-20254",
"Microsoft.NETCore.Platforms": "1.0.1"
},
"buildOptions": {
"emitEntryPoint": true,
"compile": {
"include": [
"../src/*.cs"
]
}
},
"frameworks": {
"net451": {}
}
}

View file

@ -1,21 +0,0 @@
{
"version": "1.0.0-*",
"dependencies": {
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-20113",
"Microsoft.AspNetCore.Hosting": "1.0.0-rc2-20113",
"Microsoft.Extensions.Logging.Console": "1.0.0-rc2-20254",
"Microsoft.NETCore.Platforms": "1.0.1"
},
"buildOptions": {
"platform": "anycpu32bitpreferred",
"emitEntryPoint": true,
"compile": {
"include": [
"../src/*.cs"
]
}
},
"frameworks": {
"net451": {}
}
}

View file

@ -1,25 +0,0 @@
{
"version": "1.0.0-*",
"dependencies": {
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-20113",
"Microsoft.AspNetCore.Hosting": "1.0.0-rc2-20113",
"Microsoft.Extensions.Logging.Console": "1.0.0-rc2-20254",
"Microsoft.NETCore.Platforms": "1.0.1"
},
"buildOptions": {
"emitEntryPoint": true,
"compile": {
"include": [
"../src/*.cs"
]
}
},
"frameworks": {
"net451": {}
},
"runtimes": {
"win7-x86": {},
"win7-x64": {},
"osx.10.11-x64": {}
}
}

View file

@ -1,88 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.IO;
using System.Security.Cryptography.X509Certificates;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Server.Kestrel;
using Microsoft.AspNetCore.Server.Kestrel.Filter;
using Microsoft.Extensions.Logging;
namespace SampleApp
{
public class Startup
{
private static string Args { get; set; }
private static CancellationTokenSource ServerCancellationTokenSource { get; set; }
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
{
var ksi = app.ServerFeatures.Get<IKestrelServerInformation>();
ksi.NoDelay = true;
loggerFactory.AddConsole(LogLevel.Error);
app.UseKestrelConnectionLogging();
app.Run(async context =>
{
Console.WriteLine("{0} {1}{2}{3}",
context.Request.Method,
context.Request.PathBase,
context.Request.Path,
context.Request.QueryString);
Console.WriteLine($"Method: {context.Request.Method}");
Console.WriteLine($"PathBase: {context.Request.PathBase}");
Console.WriteLine($"Path: {context.Request.Path}");
Console.WriteLine($"QueryString: {context.Request.QueryString}");
var connectionFeature = context.Connection;
Console.WriteLine($"Peer: {connectionFeature.RemoteIpAddress?.ToString()} {connectionFeature.RemotePort}");
Console.WriteLine($"Sock: {connectionFeature.LocalIpAddress?.ToString()} {connectionFeature.LocalPort}");
var content = $"Hello world!{Environment.NewLine}Received '{Args}' from command line.";
context.Response.ContentLength = content.Length;
context.Response.ContentType = "text/plain";
await context.Response.WriteAsync(content);
});
}
public static int Main(string[] args)
{
if (args.Length == 0)
{
Console.WriteLine("KestrelHelloWorld <url to host>");
return 1;
}
var url = new Uri(args[0]);
Args = string.Join(" ", args);
var host = new WebHostBuilder()
.UseServer("Microsoft.AspNetCore.Server.Kestrel")
.UseUrls(url.ToString())
.UseStartup<Startup>()
.Build();
ServerCancellationTokenSource = new CancellationTokenSource();
// shutdown server after 20s.
var shutdownTask = Task.Run(async () =>
{
await Task.Delay(20000);
ServerCancellationTokenSource.Cancel();
});
host.Run(ServerCancellationTokenSource.Token);
shutdownTask.Wait();
return 0;
}
}
}

View file

@ -1,20 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TargetFrameworks>netstandard1.6;net451</TargetFrameworks>
<OutputType>Library</OutputType>
<AssetTargetFallback Condition=" '$(TargetFramework)' == 'netstandard1.6' ">$(AssetTargetFallback);portable-net45+win8;dnxcore50;netcoreapp2.0</AssetTargetFallback>
<RestoreAdditionalProjectSources Condition="'$(TEST_PACKAGES)' != ''">$(TEST_PACKAGES)</RestoreAdditionalProjectSources>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="dotnet-desktop-and-portable" Version="1.0.0-*" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="dotnet-dependency-tool-invoker" Version="1.0.0-*" />
</ItemGroup>
</Project>

View file

@ -1,15 +0,0 @@
// 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;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}

View file

@ -1,24 +0,0 @@
// 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;
namespace TestLibrary
{
public static class Helper
{
/// <summary>
/// Gets the message from the helper. This comment is here to help test XML documentation file generation, please do not remove it.
/// </summary>
/// <returns>A message</returns>
public static string GetMessage()
{
return "This string came from the test library!";
}
public static void SayHi()
{
Console.WriteLine("Hello there!");
}
}
}

View file

@ -1,7 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
</Project>

View file

@ -1,24 +0,0 @@
// 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;
using TestLibrary;
using Xunit;
namespace TestNamespace
{
public class VSTestXunitTests
{
[Fact]
public void VSTestXunitPassTest()
{
Assert.Equal("This string came from the test library!", Helper.GetMessage());
}
[Fact]
public void VSTestXunitFailTest()
{
Assert.Equal(2, 2);
}
}
}

View file

@ -1,17 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), testAsset.props))\testAsset.props" />
<PropertyGroup>
<TargetFrameworks>net461;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../TestLibrary/TestLibrary.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(CLI_TestPlatform_Version)" />
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
</ItemGroup>
</Project>

View file

@ -1,19 +0,0 @@
// 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;
using System.Diagnostics;
using TestLibrary;
namespace TestApp
{
public class Program
{
public static int Main(string[] args)
{
Console.WriteLine("This string came from ProjectA");
Console.WriteLine($"{ProjectD.GetMessage()}");
return 0;
}
}
}

View file

@ -1,34 +0,0 @@
{
"version": "1.0.0-*",
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},
"dependencies": {
"ProjectB": {
"target": "project",
"version": "1.0.0-*"
}
},
"frameworks": {
"netcoreapp1.1": {
"dependencies": {
"Microsoft.NETCore.App": "1.1.0"
}
},
"net451": {}
},
"runtimes": {
"win7-x64": {},
"win7-x86": {},
"osx.10.10-x64": {},
"osx.10.11-x64": {},
"ubuntu.14.04-x64": {},
"ubuntu.16.04-x64": {},
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -1,15 +0,0 @@
// 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;
namespace TestLibrary
{
public static class ProjectB
{
public static string GetMessage()
{
return "This string came from ProjectB";
}
}
}

View file

@ -1,23 +0,0 @@
{
"version": "1.0.0-*",
"buildOptions": {
"nowarn": [
"CS1591"
],
"xmlDoc": true,
"additionalArguments": [
"-highentropyva+"
]
},
"dependencies": {
"NETStandard.Library": "1.6.0"
},
"frameworks": {
"netstandard1.5": {},
"net451": {
"frameworkAssemblies": {
"System.ComponentModel.DataAnnotations": ""
}
}
}
}