diff --git a/Microsoft.DotNet.Cli.sln b/Microsoft.DotNet.Cli.sln index 040cf93cf..d574fb21e 100644 --- a/Microsoft.DotNet.Cli.sln +++ b/Microsoft.DotNet.Cli.sln @@ -148,8 +148,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{FF498306-2 build\test\TestProjects.targets = build\test\TestProjects.targets EndProjectSection EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.DotNet.Core.Build.Tasks", "src\Microsoft.DotNet.Core.Build.Tasks\Microsoft.DotNet.Core.Build.Tasks.xproj", "{E8E7D24B-4830-4662-80A8-255D6FE3B0BE}" -EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.DotNet.Tools.Tests.Utilities", "test\Microsoft.DotNet.Tools.Tests.Utilities\Microsoft.DotNet.Tools.Tests.Utilities.xproj", "{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}" EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.DotNet.Core.Build.Tasks.Tests", "test\Microsoft.DotNet.Core.Build.Tasks.Tests\Microsoft.DotNet.Core.Build.Tasks.Tests.xproj", "{EDD6C92D-0A58-4FCB-A0E9-9D0FFC045177}" @@ -860,22 +858,6 @@ Global {49D7318E-D198-4E2B-BBEA-3A24D805F88D}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU {49D7318E-D198-4E2B-BBEA-3A24D805F88D}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU {49D7318E-D198-4E2B-BBEA-3A24D805F88D}.RelWithDebInfo|x64.Build.0 = Release|Any CPU - {E8E7D24B-4830-4662-80A8-255D6FE3B0BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E8E7D24B-4830-4662-80A8-255D6FE3B0BE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E8E7D24B-4830-4662-80A8-255D6FE3B0BE}.Debug|x64.ActiveCfg = Debug|Any CPU - {E8E7D24B-4830-4662-80A8-255D6FE3B0BE}.Debug|x64.Build.0 = Debug|Any CPU - {E8E7D24B-4830-4662-80A8-255D6FE3B0BE}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU - {E8E7D24B-4830-4662-80A8-255D6FE3B0BE}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU - {E8E7D24B-4830-4662-80A8-255D6FE3B0BE}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU - {E8E7D24B-4830-4662-80A8-255D6FE3B0BE}.MinSizeRel|x64.Build.0 = Debug|Any CPU - {E8E7D24B-4830-4662-80A8-255D6FE3B0BE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E8E7D24B-4830-4662-80A8-255D6FE3B0BE}.Release|Any CPU.Build.0 = Release|Any CPU - {E8E7D24B-4830-4662-80A8-255D6FE3B0BE}.Release|x64.ActiveCfg = Release|Any CPU - {E8E7D24B-4830-4662-80A8-255D6FE3B0BE}.Release|x64.Build.0 = Release|Any CPU - {E8E7D24B-4830-4662-80A8-255D6FE3B0BE}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU - {E8E7D24B-4830-4662-80A8-255D6FE3B0BE}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU - {E8E7D24B-4830-4662-80A8-255D6FE3B0BE}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU - {E8E7D24B-4830-4662-80A8-255D6FE3B0BE}.RelWithDebInfo|x64.Build.0 = Release|Any CPU {E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.Debug|Any CPU.Build.0 = Debug|Any CPU {E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -964,7 +946,6 @@ Global {FD7D515A-D10F-4F49-B8AE-21CF7ED071AE} = {89905EC4-BC0F-443B-8ADF-691321F10108} {8E3354BD-827F-41B7-9EE6-6BE1F1EDD8E9} = {89905EC4-BC0F-443B-8ADF-691321F10108} {FF498306-2DE2-47F6-8C35-3CF0589CF2B8} = {89905EC4-BC0F-443B-8ADF-691321F10108} - {E8E7D24B-4830-4662-80A8-255D6FE3B0BE} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F} {E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7} {EDD6C92D-0A58-4FCB-A0E9-9D0FFC045177} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7} {27B12960-ABB0-4903-9C60-5E9157E659C8} = {89905EC4-BC0F-443B-8ADF-691321F10108} diff --git a/resources/MSBuildImports/15.0/Imports/Microsoft.Common.props/ImportBefore/Microsoft.NETCore.ImportBefore.props b/resources/MSBuildImports/15.0/Imports/Microsoft.Common.props/ImportBefore/Microsoft.NETCore.ImportBefore.props deleted file mode 100644 index 8d4b59d14..000000000 --- a/resources/MSBuildImports/15.0/Imports/Microsoft.Common.props/ImportBefore/Microsoft.NETCore.ImportBefore.props +++ /dev/null @@ -1,17 +0,0 @@ - - - - $(MSBuildExtensionsPath)\Microsoft.DotNet.Core.Sdk.props - - - diff --git a/resources/MSBuildImports/15.0/Microsoft.Common.targets/ImportAfter/Microsoft.NETCore.ImportAfter.targets b/resources/MSBuildImports/15.0/Microsoft.Common.targets/ImportAfter/Microsoft.NETCore.ImportAfter.targets deleted file mode 100644 index 7f2fab3de..000000000 --- a/resources/MSBuildImports/15.0/Microsoft.Common.targets/ImportAfter/Microsoft.NETCore.ImportAfter.targets +++ /dev/null @@ -1,17 +0,0 @@ - - - - $(MSBuildExtensionsPath)\Microsoft.DotNet.Core.Sdk.targets - - - diff --git a/resources/MSBuildImports/Microsoft.DotNet.Core.Sdk.props b/resources/MSBuildImports/Microsoft.DotNet.Core.Sdk.props deleted file mode 100644 index 0a1824c45..000000000 --- a/resources/MSBuildImports/Microsoft.DotNet.Core.Sdk.props +++ /dev/null @@ -1,68 +0,0 @@ - - - - $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - - - - - Debug - AnyCPU - - 512 - bin\**;obj\**; - - - - - - - prompt - 4 - $(NoWarn);1701 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - - - pdbonly - true - bin\Release\ - TRACE - - - - - true - - - - - - - true - - - - - - - - true - - - portable - - - $(DotnetHostPath) - - - diff --git a/resources/MSBuildImports/Microsoft.DotNet.Core.Sdk.targets b/resources/MSBuildImports/Microsoft.DotNet.Core.Sdk.targets deleted file mode 100644 index 0a08997a5..000000000 --- a/resources/MSBuildImports/Microsoft.DotNet.Core.Sdk.targets +++ /dev/null @@ -1,120 +0,0 @@ - - - $(MSBuildThisFileDirectory)../../lib/ - netstandard1.6 - net451 - $(MicrosoftDotNetCoreBuildTasksDirectoryRoot)$(MicrosoftDotNetCoreBuildTasksTFM)/ - - - $(MSBuildToolsPath)/ - - - - - <_TargetFrameworkDirectories>$(MSBuildThisFileDirectory) - <_FullFrameworkReferenceAssemblyPaths>$(MSBuildThisFileDirectory) - - - - true - $(MSBuildProjectDirectory)/runtimeconfig.template.json - 1.0.0 - - $(VersionPrefix)-$(VersionSuffix) - $(VersionPrefix) - - - - - - - - $(CoreBuildDependsOn); - GenerateDependencyFile; - GenerateRuntimeConfigurationFiles - - - - - - - - - - - - - - - - - - - - - - - - - - - - dotnet - exec;$(TargetDir)/$(AssemblyName).dll - - - - - - - - - Build; - CopyPublishArtifacts - - - $(OutDir)publish\ - - - - - - - - diff --git a/src/Microsoft.DotNet.Core.Build.Tasks/DependencyContextBuilder.cs b/src/Microsoft.DotNet.Core.Build.Tasks/DependencyContextBuilder.cs deleted file mode 100644 index 757a2c08a..000000000 --- a/src/Microsoft.DotNet.Core.Build.Tasks/DependencyContextBuilder.cs +++ /dev/null @@ -1,270 +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.Linq; -using System.Security.Cryptography; -using System.Text; -using Microsoft.Extensions.DependencyModel; -using NuGet.Frameworks; -using NuGet.Packaging.Core; -using NuGet.ProjectModel; - -namespace Microsoft.DotNet.Core.Build.Tasks -{ - public class DependencyContextBuilder - { - public DependencyContextBuilder() - { - } - - public DependencyContext Build( - string projectName, - string projectVersion, - CompilationOptions compilerOptions, - LockFile lockFile, - NuGetFramework framework, - string runtime) - { - LockFileTarget lockFileTarget = lockFile.GetTarget(framework, runtime); - IEnumerable runtimeExports = lockFileTarget.Libraries; - - // TODO: get this from the lock file once https://github.com/NuGet/Home/issues/2695 is fixed. - var platformPackageName = "Microsoft.NETCore.App"; - var platformExport = lockFileTarget - .Libraries - .FirstOrDefault(e => e.Name.Equals(platformPackageName, StringComparison.OrdinalIgnoreCase)); - - bool portable = platformExport != null; - if (portable) - { - runtimeExports = FilterPlatformDependencies(runtimeExports, platformExport); - } - - var dependencyLookup = runtimeExports - .Select(identity => new Dependency(identity.Name, identity.Version.ToString())) - .ToDictionary(dependency => dependency.Name, StringComparer.OrdinalIgnoreCase); - - var libraryLookup = lockFile.Libraries.ToDictionary(l => l.Name, StringComparer.OrdinalIgnoreCase); - - var runtimeSignature = GenerateRuntimeSignature(runtimeExports); - - IEnumerable runtimeLibraries = - new[] { GetProjectLibrary(projectName, projectVersion, lockFile, lockFileTarget, dependencyLookup) } - .Concat(GetLibraries(runtimeExports, libraryLookup, dependencyLookup, runtime: true).Cast()); - - return new DependencyContext( - new TargetInfo(framework.DotNetFrameworkName, runtime, runtimeSignature, portable), - compilerOptions ?? CompilationOptions.Default, - Enumerable.Empty(), //GetLibraries(compilationExports, dependencyLookup, runtime: false).Cast(), - runtimeLibraries, - new RuntimeFallbacks[] { }); - } - - private static IEnumerable FilterPlatformDependencies( - IEnumerable runtimeExports, - LockFileTargetLibrary platformExport) - { - var exportsLookup = runtimeExports.ToDictionary(e => e.Name, StringComparer.OrdinalIgnoreCase); - - HashSet exclusionList = GetPlatformExclusionList(platformExport, exportsLookup); - - return runtimeExports.Where(e => !exclusionList.Contains(e.Name)); - } - - private static HashSet GetPlatformExclusionList( - LockFileTargetLibrary platformExport, - IDictionary exportsLookup) - { - var exclusionList = new HashSet(); - - exclusionList.Add(platformExport.Name); - CollectDependencies(exportsLookup, platformExport.Dependencies, exclusionList); - - return exclusionList; - } - - private static void CollectDependencies( - IDictionary exportsLookup, - IEnumerable dependencies, - HashSet exclusionList) - { - foreach (PackageDependency dependency in dependencies) - { - LockFileTargetLibrary export = exportsLookup[dependency.Id]; - if (export.Version.Equals(dependency.VersionRange.MinVersion)) - { - exclusionList.Add(export.Name); - CollectDependencies(exportsLookup, export.Dependencies, exclusionList); - } - } - } - - private static string GenerateRuntimeSignature(IEnumerable runtimeExports) - { - var sha1 = SHA1.Create(); - var builder = new StringBuilder(); - var packages = runtimeExports - .Where(libraryExport => libraryExport.Type == "package"); - var separator = "|"; - foreach (var libraryExport in packages) - { - builder.Append(libraryExport.Name); - builder.Append(separator); - builder.Append(libraryExport.Version.ToString()); - builder.Append(separator); - } - var hash = sha1.ComputeHash(Encoding.UTF8.GetBytes(builder.ToString())); - - builder.Clear(); - foreach (var hashByte in hash) - { - builder.AppendFormat("{0:x2}", hashByte); - } - return builder.ToString(); - } - - private RuntimeLibrary GetProjectLibrary( - string projectName, - string projectVersion, - LockFile lockFile, - LockFileTarget lockFileTarget, - Dictionary dependencyLookup) - { - RuntimeAssetGroup[] runtimeAssemblyGroups = new[] { new RuntimeAssetGroup(string.Empty, $"{projectName}.dll") }; - - List dependencies = new List(); - - IEnumerable projectFileDependencies = lockFile - .ProjectFileDependencyGroups - .Where(dg => dg.FrameworkName == string.Empty || - dg.FrameworkName == lockFileTarget.TargetFramework.DotNetFrameworkName); - - foreach (string projectFileDependency in projectFileDependencies.SelectMany(dg => dg.Dependencies)) - { - int separatorIndex = projectFileDependency.IndexOf(' '); - string dependencyName = separatorIndex > 0 ? - projectFileDependency.Substring(0, separatorIndex) : - projectFileDependency; - - Dependency dependency; - if (dependencyLookup.TryGetValue(dependencyName, out dependency)) - { - dependencies.Add(dependency); - } - } - - return new RuntimeLibrary( - type: "project", - name: projectName, - version: projectVersion, - hash: string.Empty, - runtimeAssemblyGroups: runtimeAssemblyGroups, - nativeLibraryGroups: new RuntimeAssetGroup[] { }, - resourceAssemblies: new ResourceAssembly[] { }, - dependencies: dependencies.ToArray(), - serviceable: false); - } - - private IEnumerable GetLibraries( - IEnumerable exports, - IDictionary libraryLookup, - IDictionary dependencyLookup, - bool runtime) - { - return exports.Select(export => GetLibrary(export, libraryLookup, dependencyLookup, runtime)); - } - - private Library GetLibrary( - LockFileTargetLibrary export, - IDictionary libraryLookup, - IDictionary dependencyLookup, - bool runtime) - { - var type = export.Type; - - // TEMPORARY: All packages are serviceable in RC2 - // See https://github.com/dotnet/cli/issues/2569 - var serviceable = export.Type == "package"; - var libraryDependencies = new HashSet(); - - foreach (PackageDependency libraryDependency in export.Dependencies) - { - Dependency dependency; - if (dependencyLookup.TryGetValue(libraryDependency.Id, out dependency)) - { - libraryDependencies.Add(dependency); - } - } - - string hash = string.Empty; - LockFileLibrary library; - if (libraryLookup.TryGetValue(export.Name, out library)) - { - hash = "sha512-" + library.Sha512; - } - - if (runtime) - { - return new RuntimeLibrary( - type.ToLowerInvariant(), - export.Name, - export.Version.ToString(), - hash, - CreateRuntimeAssemblyGroups(export), - CreateNativeLibraryGroups(export), - export.ResourceAssemblies.Select(CreateResourceAssembly), - libraryDependencies, - serviceable - ); - } - //else - //{ - // IEnumerable assemblies = export - // .CompilationAssemblies - // .Select(libraryAsset => libraryAsset.RelativePath); - - // return new CompilationLibrary( - // type.ToString().ToLowerInvariant(), - // export.Library.Identity.Name, - // export.Library.Identity.Version.ToString(), - // export.Library.Hash, - // assemblies, - // libraryDependencies, - // serviceable); - //} - return null; - } - - private IReadOnlyList CreateRuntimeAssemblyGroups(LockFileTargetLibrary export) - { - List assemblyGroups = new List(); - - assemblyGroups.Add( - new RuntimeAssetGroup(string.Empty, export.RuntimeAssemblies.Select(a => a.Path))); - - // TODO RuntimeTargets - //export.RuntimeTargets.GroupBy(l => l.) - - return assemblyGroups; - } - - private IReadOnlyList CreateNativeLibraryGroups(LockFileTargetLibrary export) - { - return new[] { new RuntimeAssetGroup(string.Empty, export.NativeLibraries.Select(a => a.Path)) }; - } - - - private ResourceAssembly CreateResourceAssembly(LockFileItem resourceAssembly) - { - // TODO: implement - return null; - - //return new ResourceAssembly( - // path: resourceAssembly.Path, - // locale: resourceAssembly.Locale - // ); - } - } -} \ No newline at end of file diff --git a/src/Microsoft.DotNet.Core.Build.Tasks/GenerateDepsFile.cs b/src/Microsoft.DotNet.Core.Build.Tasks/GenerateDepsFile.cs deleted file mode 100644 index e5b700832..000000000 --- a/src/Microsoft.DotNet.Core.Build.Tasks/GenerateDepsFile.cs +++ /dev/null @@ -1,57 +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.IO; -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using Microsoft.Extensions.DependencyModel; -using Newtonsoft.Json; -using NuGet.Frameworks; -using NuGet.ProjectModel; - -namespace Microsoft.DotNet.Core.Build.Tasks -{ - /// - /// Generates the $(project).deps.json file. - /// - public class GenerateDepsFile : Task - { - [Required] - public string LockFilePath { get; set; } - - [Required] - public string DepsFilePath { get; set; } - - [Required] - public string TargetFramework { get; set; } - - public string RuntimeIdentifier { get; set; } - - [Required] - public string AssemblyName { get; set; } - - [Required] - public string AssemblyVersion { get; set; } - - public override bool Execute() - { - LockFile lockFile = LockFileCache.Instance.GetLockFile(LockFilePath); - - DependencyContext dependencyContext = new DependencyContextBuilder().Build( - projectName: AssemblyName, - projectVersion: AssemblyVersion, - compilerOptions: null, // TODO: PreservceCompliationContext - lockFile: lockFile, - framework: TargetFramework == null ? null : NuGetFramework.Parse(TargetFramework), - runtime: RuntimeIdentifier); - - var writer = new DependencyContextWriter(); - using (var fileStream = File.Create(DepsFilePath)) - { - writer.Write(dependencyContext, fileStream); - } - - return true; - } - } -} diff --git a/src/Microsoft.DotNet.Core.Build.Tasks/GenerateRuntimeConfigurationFiles.cs b/src/Microsoft.DotNet.Core.Build.Tasks/GenerateRuntimeConfigurationFiles.cs deleted file mode 100644 index 277eb277c..000000000 --- a/src/Microsoft.DotNet.Core.Build.Tasks/GenerateRuntimeConfigurationFiles.cs +++ /dev/null @@ -1,146 +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.IO; -using System.Linq; -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using Newtonsoft.Json.Serialization; -using NuGet.ProjectModel; - -namespace Microsoft.DotNet.Core.Build.Tasks -{ - /// - /// Generates the $(project).runtimeconfig.json and optionally $(project).runtimeconfig.dev.json files - /// for a project. - /// - public class GenerateRuntimeConfigurationFiles : Task - { - [Required] - public string LockFilePath { get; set; } - - [Required] - public string RuntimeConfigPath { get; set; } - - public string RuntimeConfigDevPath { get; set; } - - public string UserRuntimeConfig { get; set; } - - private LockFile LockFile { get; set; } - - public override bool Execute() - { - LockFile = LockFileCache.Instance.GetLockFile(LockFilePath); - - WriteRuntimeConfig(); - - if (!string.IsNullOrEmpty(RuntimeConfigDevPath)) - { - WriteDevRuntimeConfig(); - } - - return true; - } - - private void WriteRuntimeConfig() - { - RuntimeConfig config = new RuntimeConfig(); - config.RuntimeOptions = new RuntimeOptions(); - - AddFramework(config.RuntimeOptions); - AddUserRuntimeOptions(config.RuntimeOptions); - - WriteToJsonFile(RuntimeConfigPath, config); - } - - private void AddFramework(RuntimeOptions runtimeOptions) - { - // TODO: get this from the lock file once https://github.com/NuGet/Home/issues/2695 is fixed. - var packageName = "Microsoft.NETCore.App"; - - var redistExport = LockFile - .Libraries - .FirstOrDefault(e => e.Name.Equals(packageName, StringComparison.OrdinalIgnoreCase)); - - if (redistExport != null) - { - RuntimeConfigFramework framework = new RuntimeConfigFramework(); - framework.Name = redistExport.Name; - framework.Version = redistExport.Version.ToNormalizedString(); - - runtimeOptions.Framework = framework; - } - } - - private void AddUserRuntimeOptions(RuntimeOptions runtimeOptions) - { - if (string.IsNullOrEmpty(UserRuntimeConfig) || !File.Exists(UserRuntimeConfig)) - { - return; - } - - var rawRuntimeOptions = File.ReadAllText(UserRuntimeConfig); - - var runtimeOptionsFromProject = JObject.Parse(rawRuntimeOptions); - foreach (var runtimeOption in runtimeOptionsFromProject) - { - runtimeOptions.RawOptions.Add(runtimeOption.Key, runtimeOption.Value); - } - } - - private void WriteDevRuntimeConfig() - { - RuntimeConfig devConfig = new RuntimeConfig(); - devConfig.RuntimeOptions = new RuntimeOptions(); - - AddAdditionalProbingPaths(devConfig.RuntimeOptions); - - WriteToJsonFile(RuntimeConfigDevPath, devConfig); - } - - private void AddAdditionalProbingPaths(RuntimeOptions runtimeOptions) - { - foreach (var packageFolder in LockFile.PackageFolders) - { - if (runtimeOptions.AdditionalProbingPaths == null) - { - runtimeOptions.AdditionalProbingPaths = new List(); - } - - // DotNetHost doesn't handle additional probing paths with a trailing slash - runtimeOptions.AdditionalProbingPaths.Add(EnsureNoTrailingDirectorySeparator(packageFolder.Path)); - } - } - - private static string EnsureNoTrailingDirectorySeparator(string path) - { - if (!string.IsNullOrEmpty(path)) - { - char lastChar = path[path.Length - 1]; - if (lastChar == Path.DirectorySeparatorChar) - { - path = path.Substring(0, path.Length - 1); - } - } - - return path; - } - - private static void WriteToJsonFile(string fileName, object value) - { - JsonSerializer serializer = new JsonSerializer(); - serializer.ContractResolver = new CamelCasePropertyNamesContractResolver(); - serializer.Formatting = Formatting.Indented; - serializer.DefaultValueHandling = DefaultValueHandling.Ignore; - - using (JsonTextWriter writer = new JsonTextWriter(new StreamWriter(File.Create(fileName)))) - { - serializer.Serialize(writer, value); - } - } - } -} diff --git a/src/Microsoft.DotNet.Core.Build.Tasks/LockFileCache.cs b/src/Microsoft.DotNet.Core.Build.Tasks/LockFileCache.cs deleted file mode 100644 index a352fb643..000000000 --- a/src/Microsoft.DotNet.Core.Build.Tasks/LockFileCache.cs +++ /dev/null @@ -1,37 +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.Collections.Concurrent; -using NuGet.Common; -using NuGet.ProjectModel; - -namespace Microsoft.DotNet.Core.Build.Tasks -{ - internal class LockFileCache - { - public static LockFileCache Instance { get; } = new LockFileCache(); - - private ConcurrentDictionary _cache = new ConcurrentDictionary(); - - private LockFileCache() - { - } - - public LockFile GetLockFile(string path) - { - LockFile result; - if (!_cache.TryGetValue(path, out result)) - { - result = LoadLockFile(path); - _cache[path] = result; - } - return result; - } - - private LockFile LoadLockFile(string path) - { - // TODO adapt task logger to Nuget Logger - return LockFileUtilities.GetLockFile(path, NullLogger.Instance); - } - } -} diff --git a/src/Microsoft.DotNet.Core.Build.Tasks/Microsoft.DotNet.Core.Build.Tasks.xproj b/src/Microsoft.DotNet.Core.Build.Tasks/Microsoft.DotNet.Core.Build.Tasks.xproj deleted file mode 100644 index 91bee27d0..000000000 --- a/src/Microsoft.DotNet.Core.Build.Tasks/Microsoft.DotNet.Core.Build.Tasks.xproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - 14.0.25420 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - e8e7d24b-4830-4662-80a8-255d6fe3b0be - Microsoft.DotNet.Core.Build.Tasks - ..\..\artifacts\obj\$(MSBuildProjectName) - ..\..\artifacts\bin - - - 2.0 - - - \ No newline at end of file diff --git a/src/Microsoft.DotNet.Core.Build.Tasks/Properties/AssemblyInfo.cs b/src/Microsoft.DotNet.Core.Build.Tasks/Properties/AssemblyInfo.cs deleted file mode 100644 index bd44bced5..000000000 --- a/src/Microsoft.DotNet.Core.Build.Tasks/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,3 +0,0 @@ -using System.Reflection; - -[assembly: AssemblyMetadataAttribute("Serviceable", "True")] diff --git a/src/Microsoft.DotNet.Core.Build.Tasks/RuntimeConfig.cs b/src/Microsoft.DotNet.Core.Build.Tasks/RuntimeConfig.cs deleted file mode 100644 index f28e77f94..000000000 --- a/src/Microsoft.DotNet.Core.Build.Tasks/RuntimeConfig.cs +++ /dev/null @@ -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. - -namespace Microsoft.DotNet.Core.Build.Tasks -{ - internal class RuntimeConfig - { - public RuntimeOptions RuntimeOptions { get; set; } - - public RuntimeConfig() - { - } - } -} \ No newline at end of file diff --git a/src/Microsoft.DotNet.Core.Build.Tasks/RuntimeConfigFramework.cs b/src/Microsoft.DotNet.Core.Build.Tasks/RuntimeConfigFramework.cs deleted file mode 100644 index 28d19a006..000000000 --- a/src/Microsoft.DotNet.Core.Build.Tasks/RuntimeConfigFramework.cs +++ /dev/null @@ -1,16 +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. - -namespace Microsoft.DotNet.Core.Build.Tasks -{ - internal class RuntimeConfigFramework - { - public string Name { get; set; } - - public string Version { get; set; } - - public RuntimeConfigFramework() - { - } - } -} \ No newline at end of file diff --git a/src/Microsoft.DotNet.Core.Build.Tasks/RuntimeOptions.cs b/src/Microsoft.DotNet.Core.Build.Tasks/RuntimeOptions.cs deleted file mode 100644 index 618ee1c4f..000000000 --- a/src/Microsoft.DotNet.Core.Build.Tasks/RuntimeOptions.cs +++ /dev/null @@ -1,23 +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.Collections.Generic; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; - -namespace Microsoft.DotNet.Core.Build.Tasks -{ - internal class RuntimeOptions - { - public RuntimeConfigFramework Framework { get; set; } - - public List AdditionalProbingPaths { get; set; } - - [JsonExtensionData] - public IDictionary RawOptions { get; } = new Dictionary(); - - public RuntimeOptions() - { - } - } -} \ No newline at end of file diff --git a/src/Microsoft.DotNet.Core.Build.Tasks/project.json b/src/Microsoft.DotNet.Core.Build.Tasks/project.json deleted file mode 100644 index cd63f2b35..000000000 --- a/src/Microsoft.DotNet.Core.Build.Tasks/project.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "version": "1.0.0-featmsbuild-*", - "buildOptions": { - "keyFile": "../../tools/Key.snk", - "warningsAsErrors": true - }, - "dependencies": { - "NuGet.ProjectModel": "3.5.0-rc1-1697", - "Microsoft.Extensions.DependencyModel": "1.0.1-beta-000914" - }, - "frameworks": { - "net451": { - "frameworkAssemblies": { - "Microsoft.Build.Utilities.v4.0": { - "type": "build" - }, - "Microsoft.Build.Framework": { - "type": "build" - } - } - }, - "netstandard1.6": { - "imports": [ - "portable-net45+wp80+win8+wpa81+dnxcore50" - ], - "dependencies": { - "Microsoft.Build.Framework": "0.1.0-preview-00029-160805", - "Microsoft.Build.Tasks.Core": "0.1.0-preview-00029-160805", - "Microsoft.Build.Utilities.Core": "0.1.0-preview-00029-160805" - } - } - } -} diff --git a/src/dotnet/project.json b/src/dotnet/project.json index 7ae5a4825..f189edb7d 100644 --- a/src/dotnet/project.json +++ b/src/dotnet/project.json @@ -63,9 +63,6 @@ "Microsoft.Build": "0.1.0-preview-00029-160805", "Microsoft.Build.Framework": "0.1.0-preview-00029-160805", - "Microsoft.DotNet.Core.Build.Tasks": { - "target": "project" - }, "Microsoft.DotNet.PlatformAbstractions": "1.0.1-beta-000914" }, "frameworks": {