Introducing a new library to hold file system related abstractions. Making the E2E tests work with dotnet test
This commit is contained in:
parent
3048eb487c
commit
fd604355fe
10 changed files with 102 additions and 25 deletions
|
@ -63,6 +63,8 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "dotnet-projectmodel-server.
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "TestLibraryWithRunner", "test\TestProjects\TestLibraryWithRunner\TestLibraryWithRunner.xproj", "{B76591D6-D105-441D-AB40-AC7E78EAF84D}"
|
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "TestLibraryWithRunner", "test\TestProjects\TestLibraryWithRunner\TestLibraryWithRunner.xproj", "{B76591D6-D105-441D-AB40-AC7E78EAF84D}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.DotNet.Files", "src\Microsoft.DotNet.Files\Microsoft.DotNet.Files.xproj", "{D521DD9F-0614-4929-93B4-D8FA5682C174}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
@ -443,6 +445,22 @@ Global
|
||||||
{B76591D6-D105-441D-AB40-AC7E78EAF84D}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
{B76591D6-D105-441D-AB40-AC7E78EAF84D}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
||||||
{B76591D6-D105-441D-AB40-AC7E78EAF84D}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
|
{B76591D6-D105-441D-AB40-AC7E78EAF84D}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
|
||||||
{B76591D6-D105-441D-AB40-AC7E78EAF84D}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
|
{B76591D6-D105-441D-AB40-AC7E78EAF84D}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
|
||||||
|
{D521DD9F-0614-4929-93B4-D8FA5682C174}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{D521DD9F-0614-4929-93B4-D8FA5682C174}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{D521DD9F-0614-4929-93B4-D8FA5682C174}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{D521DD9F-0614-4929-93B4-D8FA5682C174}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{D521DD9F-0614-4929-93B4-D8FA5682C174}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{D521DD9F-0614-4929-93B4-D8FA5682C174}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{D521DD9F-0614-4929-93B4-D8FA5682C174}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{D521DD9F-0614-4929-93B4-D8FA5682C174}.MinSizeRel|x64.Build.0 = Debug|Any CPU
|
||||||
|
{D521DD9F-0614-4929-93B4-D8FA5682C174}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{D521DD9F-0614-4929-93B4-D8FA5682C174}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{D521DD9F-0614-4929-93B4-D8FA5682C174}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{D521DD9F-0614-4929-93B4-D8FA5682C174}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{D521DD9F-0614-4929-93B4-D8FA5682C174}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{D521DD9F-0614-4929-93B4-D8FA5682C174}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{D521DD9F-0614-4929-93B4-D8FA5682C174}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{D521DD9F-0614-4929-93B4-D8FA5682C174}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
@ -472,5 +490,6 @@ Global
|
||||||
{386D412C-003C-47B1-8258-0E35865CB7C4} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
{386D412C-003C-47B1-8258-0E35865CB7C4} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
||||||
{11C77123-E4DA-499F-8900-80C88C2C69F2} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
{11C77123-E4DA-499F-8900-80C88C2C69F2} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
|
||||||
{B76591D6-D105-441D-AB40-AC7E78EAF84D} = {713CBFBB-5392-438D-B766-A9A585EF1BB8}
|
{B76591D6-D105-441D-AB40-AC7E78EAF84D} = {713CBFBB-5392-438D-B766-A9A585EF1BB8}
|
||||||
|
{D521DD9F-0614-4929-93B4-D8FA5682C174} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
|
|
@ -9,7 +9,11 @@
|
||||||
"NETStandard.Library": "1.0.0-rc2-23728",
|
"NETStandard.Library": "1.0.0-rc2-23728",
|
||||||
"Microsoft.DotNet.ProjectModel": "1.0.0-*",
|
"Microsoft.DotNet.ProjectModel": "1.0.0-*",
|
||||||
"System.Reflection.Metadata": "1.2.0-rc2-23728",
|
"System.Reflection.Metadata": "1.2.0-rc2-23728",
|
||||||
"Microsoft.Extensions.PlatformAbstractions": "1.0.0-rc2-16537"
|
"Microsoft.Extensions.PlatformAbstractions": "1.0.0-rc2-16537",
|
||||||
|
"Microsoft.DotNet.Files": {
|
||||||
|
"type": "build",
|
||||||
|
"version": "1.0.0-*"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
|
@ -17,6 +21,7 @@
|
||||||
"imports": "portable-net45+win8"
|
"imports": "portable-net45+win8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@ using System.Linq;
|
||||||
using System.Xml.Linq;
|
using System.Xml.Linq;
|
||||||
using Microsoft.DotNet.Cli.Compiler.Common;
|
using Microsoft.DotNet.Cli.Compiler.Common;
|
||||||
using Microsoft.DotNet.Cli.Utils;
|
using Microsoft.DotNet.Cli.Utils;
|
||||||
|
using Microsoft.DotNet.Files;
|
||||||
using Microsoft.DotNet.ProjectModel;
|
using Microsoft.DotNet.ProjectModel;
|
||||||
using Microsoft.DotNet.ProjectModel.Compilation;
|
using Microsoft.DotNet.ProjectModel.Compilation;
|
||||||
using Microsoft.DotNet.ProjectModel.Graph;
|
using Microsoft.DotNet.ProjectModel.Graph;
|
||||||
|
|
|
@ -10,7 +10,8 @@
|
||||||
"System.CommandLine": "0.1.0-e160119-1",
|
"System.CommandLine": "0.1.0-e160119-1",
|
||||||
"Microsoft.CodeAnalysis.CSharp": "1.2.0-beta1-20160108-01",
|
"Microsoft.CodeAnalysis.CSharp": "1.2.0-beta1-20160108-01",
|
||||||
"Microsoft.DotNet.ProjectModel": "1.0.0-*",
|
"Microsoft.DotNet.ProjectModel": "1.0.0-*",
|
||||||
"Microsoft.DotNet.Cli.Utils": "1.0.0-*"
|
"Microsoft.DotNet.Cli.Utils": "1.0.0-*",
|
||||||
|
"Microsoft.DotNet.Files": {"version": "1.0.0-*", "type": "build"}
|
||||||
},
|
},
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
"dnxcore50": {
|
"dnxcore50": {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
// 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.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
@ -8,7 +8,7 @@ using System.Linq;
|
||||||
using Microsoft.DotNet.ProjectModel;
|
using Microsoft.DotNet.ProjectModel;
|
||||||
using Microsoft.DotNet.Tools.Common;
|
using Microsoft.DotNet.Tools.Common;
|
||||||
|
|
||||||
namespace Microsoft.Dotnet.Cli.Compiler.Common
|
namespace Microsoft.DotNet.Files
|
||||||
{
|
{
|
||||||
public class ContentFiles
|
public class ContentFiles
|
||||||
{
|
{
|
18
src/Microsoft.DotNet.Files/Microsoft.DotNet.Files.xproj
Normal file
18
src/Microsoft.DotNet.Files/Microsoft.DotNet.Files.xproj
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
|
||||||
|
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGuid>d521dd9f-0614-4929-93b4-d8fa5682c174</ProjectGuid>
|
||||||
|
<RootNamespace>Microsoft.DotNet.Files</RootNamespace>
|
||||||
|
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
|
||||||
|
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin\$(MSBuildProjectName)\</OutputPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||||
|
</Project>
|
31
src/Microsoft.DotNet.Files/project.json
Normal file
31
src/Microsoft.DotNet.Files/project.json
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
{
|
||||||
|
"version": "1.0.0-*",
|
||||||
|
"compilationOptions": {
|
||||||
|
"keyFile": "../../tools/Key.snk"
|
||||||
|
},
|
||||||
|
"description": "Abstraction to interact with the file system and file paths.",
|
||||||
|
"dependencies": {
|
||||||
|
"NETStandard.Library": "1.0.0-rc2-23727",
|
||||||
|
"System.Linq.Expressions": "4.0.11-rc2-23727",
|
||||||
|
|
||||||
|
"Microsoft.Extensions.FileSystemGlobbing": "1.0.0-rc2-15975",
|
||||||
|
|
||||||
|
"Microsoft.DotNet.Cli.Utils": {
|
||||||
|
"type": "build",
|
||||||
|
"version": "1.0.0-*"
|
||||||
|
},
|
||||||
|
|
||||||
|
"Microsoft.DotNet.ProjectModel": {
|
||||||
|
"type": "build",
|
||||||
|
"version": "1.0.0-*"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"frameworks": {
|
||||||
|
"dnxcore50": {
|
||||||
|
"imports": "portable-net45+win8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
}
|
||||||
|
}
|
|
@ -10,6 +10,7 @@ using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Microsoft.Extensions.PlatformAbstractions;
|
using Microsoft.Extensions.PlatformAbstractions;
|
||||||
|
using Microsoft.DotNet.Files;
|
||||||
using Microsoft.DotNet.Tools.Common;
|
using Microsoft.DotNet.Tools.Common;
|
||||||
using Microsoft.DotNet.ProjectModel.Utilities;
|
using Microsoft.DotNet.ProjectModel.Utilities;
|
||||||
|
|
||||||
|
@ -141,7 +142,8 @@ namespace Microsoft.DotNet.Tools.Publish
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CopyContents(context, outputPath);
|
var contentFiles = new ContentFiles(context);
|
||||||
|
contentFiles.StructuredCopyTo(outputPath);
|
||||||
|
|
||||||
// Publish a host if this is an application
|
// Publish a host if this is an application
|
||||||
if (options.EmitEntryPoint.GetValueOrDefault())
|
if (options.EmitEntryPoint.GetValueOrDefault())
|
||||||
|
|
|
@ -1,25 +1,26 @@
|
||||||
{
|
{
|
||||||
"version": "1.0.0-*",
|
"version": "1.0.0-*",
|
||||||
"compilationOptions": {
|
"compilationOptions": {
|
||||||
"emitEntryPoint": true
|
"emitEntryPoint": true
|
||||||
},
|
},
|
||||||
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"NETStandard.Library" : "1.0.0-rc2-23728",
|
"NETStandard.Library": "1.0.0-rc2-23728",
|
||||||
|
|
||||||
"xunit": "2.1.0",
|
"Microsoft.DotNet.ProjectModel": { "target": "project" },
|
||||||
"xunit.console.netcore": "1.0.2-prerelease-00101",
|
"Microsoft.DotNet.Cli.Utils": { "target": "project" },
|
||||||
"xunit.netcore.extensions": "1.0.0-prerelease-00153",
|
"Microsoft.DotNet.Tools.Tests.Utilities": { "target": "project" },
|
||||||
"xunit.runner.utility": "2.1.0",
|
|
||||||
|
|
||||||
"Microsoft.DotNet.ProjectModel": {"target":"project"},
|
"xunit": "2.1.0",
|
||||||
"Microsoft.DotNet.Cli.Utils": {"target":"project"},
|
"xunit.netcore.extensions": "1.0.0-prerelease-*",
|
||||||
"Microsoft.DotNet.Tools.Tests.Utilities": {"target":"project"}
|
"dotnet-test-xunit": "1.0.0-dev-45337-57"
|
||||||
},
|
},
|
||||||
|
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
"dnxcore50": {
|
"dnxcore50": {
|
||||||
"imports": "portable-net45+win8"
|
"imports": "portable-net45+win8"
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"testRunner": "xunit"
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,8 +27,7 @@
|
||||||
"../TestProjects/CompileFail/**/*",
|
"../TestProjects/CompileFail/**/*",
|
||||||
"../TestProjects/TestBindingRedirectGeneration/**/*",
|
"../TestProjects/TestBindingRedirectGeneration/**/*",
|
||||||
"../TestProjects/TestAppCompilationContext/**/*",
|
"../TestProjects/TestAppCompilationContext/**/*",
|
||||||
"../TestProjects/TestAppWithContents/**/*",
|
"../TestProjects/TestAppWithContents/**/*"
|
||||||
"../TestProjects/global.json"
|
|
||||||
],
|
],
|
||||||
|
|
||||||
"testRunner": "xunit"
|
"testRunner": "xunit"
|
||||||
|
|
Loading…
Add table
Reference in a new issue