Skip to content
This repository has been archived by the owner on Jan 19, 2019. It is now read-only.

Update dotnet-ef #28

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions EntityFramework.Tools.sln
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.EntityFrameworkCo
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ef.FunctionalTests", "test\ef.FunctionalTests\ef.FunctionalTests.xproj", "{98E0021C-8333-4338-BF9C-B73F5DAAAA2E}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.EntityFrameworkCore.Tools.DotNet.FunctionalTests", "test\Microsoft.EntityFrameworkCore.Tools.DotNet.FunctionalTests\Microsoft.EntityFrameworkCore.Tools.DotNet.FunctionalTests.xproj", "{100C88C9-C14D-4B4D-ADE9-50FBC6A03B88}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.EntityFrameworkCore.Tools.Tests", "test\Microsoft.EntityFrameworkCore.Tools.Tests\Microsoft.EntityFrameworkCore.Tools.Tests.xproj", "{6B78CB0B-7B3D-4ED3-B584-F9FA7B16E41F}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.EntityFrameworkCore.Tools.DotNet.Tests", "test\Microsoft.EntityFrameworkCore.Tools.DotNet.Tests\Microsoft.EntityFrameworkCore.Tools.DotNet.Tests.xproj", "{203132D7-AE7F-49F0-8F4E-75E99A28E989}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug_x86|Any CPU = Debug_x86|Any CPU
Expand Down Expand Up @@ -59,14 +59,6 @@ Global
{98E0021C-8333-4338-BF9C-B73F5DAAAA2E}.Release_x86|Any CPU.Build.0 = Release|Any CPU
{98E0021C-8333-4338-BF9C-B73F5DAAAA2E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{98E0021C-8333-4338-BF9C-B73F5DAAAA2E}.Release|Any CPU.Build.0 = Release|Any CPU
{100C88C9-C14D-4B4D-ADE9-50FBC6A03B88}.Debug_x86|Any CPU.ActiveCfg = Debug|Any CPU
{100C88C9-C14D-4B4D-ADE9-50FBC6A03B88}.Debug_x86|Any CPU.Build.0 = Debug|Any CPU
{100C88C9-C14D-4B4D-ADE9-50FBC6A03B88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{100C88C9-C14D-4B4D-ADE9-50FBC6A03B88}.Debug|Any CPU.Build.0 = Debug|Any CPU
{100C88C9-C14D-4B4D-ADE9-50FBC6A03B88}.Release_x86|Any CPU.ActiveCfg = Release|Any CPU
{100C88C9-C14D-4B4D-ADE9-50FBC6A03B88}.Release_x86|Any CPU.Build.0 = Release|Any CPU
{100C88C9-C14D-4B4D-ADE9-50FBC6A03B88}.Release|Any CPU.ActiveCfg = Release|Any CPU
{100C88C9-C14D-4B4D-ADE9-50FBC6A03B88}.Release|Any CPU.Build.0 = Release|Any CPU
{6B78CB0B-7B3D-4ED3-B584-F9FA7B16E41F}.Debug_x86|Any CPU.ActiveCfg = Debug|Any CPU
{6B78CB0B-7B3D-4ED3-B584-F9FA7B16E41F}.Debug_x86|Any CPU.Build.0 = Debug|Any CPU
{6B78CB0B-7B3D-4ED3-B584-F9FA7B16E41F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
Expand All @@ -75,6 +67,14 @@ Global
{6B78CB0B-7B3D-4ED3-B584-F9FA7B16E41F}.Release_x86|Any CPU.Build.0 = Release|Any CPU
{6B78CB0B-7B3D-4ED3-B584-F9FA7B16E41F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6B78CB0B-7B3D-4ED3-B584-F9FA7B16E41F}.Release|Any CPU.Build.0 = Release|Any CPU
{203132D7-AE7F-49F0-8F4E-75E99A28E989}.Debug_x86|Any CPU.ActiveCfg = Debug|Any CPU
{203132D7-AE7F-49F0-8F4E-75E99A28E989}.Debug_x86|Any CPU.Build.0 = Debug|Any CPU
{203132D7-AE7F-49F0-8F4E-75E99A28E989}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{203132D7-AE7F-49F0-8F4E-75E99A28E989}.Debug|Any CPU.Build.0 = Debug|Any CPU
{203132D7-AE7F-49F0-8F4E-75E99A28E989}.Release_x86|Any CPU.ActiveCfg = Release|Any CPU
{203132D7-AE7F-49F0-8F4E-75E99A28E989}.Release_x86|Any CPU.Build.0 = Release|Any CPU
{203132D7-AE7F-49F0-8F4E-75E99A28E989}.Release|Any CPU.ActiveCfg = Release|Any CPU
{203132D7-AE7F-49F0-8F4E-75E99A28E989}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -84,7 +84,7 @@ Global
{31132653-55A2-4ADB-BABB-60F386D2A98E} = {0A0CB496-89D6-49CB-8C53-20B6580BFB83}
{61B63762-135C-4891-BD9C-7AC200DBE3EE} = {0A0CB496-89D6-49CB-8C53-20B6580BFB83}
{98E0021C-8333-4338-BF9C-B73F5DAAAA2E} = {74258BAD-FFED-4862-8E5E-D81DE377B284}
{100C88C9-C14D-4B4D-ADE9-50FBC6A03B88} = {74258BAD-FFED-4862-8E5E-D81DE377B284}
{6B78CB0B-7B3D-4ED3-B584-F9FA7B16E41F} = {74258BAD-FFED-4862-8E5E-D81DE377B284}
{203132D7-AE7F-49F0-8F4E-75E99A28E989} = {74258BAD-FFED-4862-8E5E-D81DE377B284}
EndGlobalSection
EndGlobal
2 changes: 0 additions & 2 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
<configuration>
<packageSources>
<clear />
<add key="dotnet-cli" value="https://dotnet.myget.org/F/dotnet-cli/api/v3/index.json" />
<add key="cli-deps" value="https://dotnet.myget.org/F/cli-deps/api/v3/index.json" />
<add key="AspNetCore" value="https://dotnet.myget.org/F/aspnetcore-master/api/v3/index.json" />
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
</packageSources>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This project is part of ASP.NET Core. You can find samples, documentation and ge


[1]: https://ci.appveyor.com/api/projects/status/8ccv5d730u6fd4fu/branch/dev?svg=true
[2]: https://ci.appveyor.com/project/aspnetci/EntityFramework.Tools/branch/dev
[2]: https://ci.appveyor.com/project/aspnetci/entityframework-tools/branch/dev
[3]: https://travis-ci.org/aspnet/EntityFramework.Tools.svg?branch=dev
[4]: https://travis-ci.org/aspnet/EntityFramework.Tools
[5]: https://github.com/aspnet/EntityFramework/issues
Expand Down
15 changes: 15 additions & 0 deletions src/Microsoft.EntityFrameworkCore.Tools.DotNet/CommandException.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;

namespace Microsoft.EntityFrameworkCore.Tools
{
internal class CommandException : Exception
{
public CommandException(string message)
: base(message)
{
}
}
}

This file was deleted.

97 changes: 97 additions & 0 deletions src/Microsoft.EntityFrameworkCore.Tools.DotNet/Exe.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System.Collections.Generic;
using System.Diagnostics;
using System.Text;

namespace Microsoft.EntityFrameworkCore.Tools
{
internal static class Exe
{
public static int Run(string executable, IReadOnlyList<string> args)
{
var arguments = ToArguments(args);

Reporter.WriteVerbose(executable + " " + arguments);

var build = Process.Start(
new ProcessStartInfo
{
FileName = executable,
Arguments = arguments,
UseShellExecute = false
});
build.WaitForExit();

return build.ExitCode;
}

private static string ToArguments(IReadOnlyList<string> args)
{
var builder = new StringBuilder();
for (var i = 0; i < args.Count; i++)
{
if (i != 0)
{
builder.Append(" ");
}

if ((args[i][0] == '"' && args[i][args[i].Length - 1] == '"') || args[i].IndexOf(' ') == -1)
{
builder.Append(args[i]);

continue;
}

builder.Append("\"");

var pendingBackslashs = 0;
for (var j = 0; j < args[i].Length; j++)
{
switch (args[i][j])
{
case '\"':
if (pendingBackslashs != 0)
{
builder.Append('\\', pendingBackslashs * 2);
pendingBackslashs = 0;
}
builder.Append("\\\"");
break;

case '\\':
pendingBackslashs++;
break;

default:
if (pendingBackslashs != 0)
{
if (pendingBackslashs == 1)
{
builder.Append('\\');
}
else
{
builder.Append('\\', pendingBackslashs * 2);
}

pendingBackslashs = 0;
}
builder.Append(args[i][j]);
break;
}
}

if (pendingBackslashs != 0)
{
builder.Append('\\', pendingBackslashs * 2);
}

builder.Append("\"");
}

return builder.ToString();
}
}
}

This file was deleted.

Loading