Make dotnet-ef a global tool
This commit is contained in:
Родитель
ff51e1dc15
Коммит
c87fc69d4b
|
@ -54,8 +54,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.SqlServer", "src\EFC
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.Tools", "src\EFCore.Tools\EFCore.Tools.csproj", "{87ADBDB5-CA57-4EAB-9A8A-5E89480C9C6D}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.Tools.DotNet", "src\EFCore.Tools.DotNet\EFCore.Tools.DotNet.csproj", "{31ED3EA7-8270-478D-935D-0067BD7935B7}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{258D5057-81B9-40EC-A872-D21E27452749}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
test\Directory.Build.props = test\Directory.Build.props
|
||||
|
@ -165,10 +163,6 @@ Global
|
|||
{87ADBDB5-CA57-4EAB-9A8A-5E89480C9C6D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{87ADBDB5-CA57-4EAB-9A8A-5E89480C9C6D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{87ADBDB5-CA57-4EAB-9A8A-5E89480C9C6D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{31ED3EA7-8270-478D-935D-0067BD7935B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{31ED3EA7-8270-478D-935D-0067BD7935B7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{31ED3EA7-8270-478D-935D-0067BD7935B7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{31ED3EA7-8270-478D-935D-0067BD7935B7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{27018CE2-C235-439C-80F2-C573C8904892}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{27018CE2-C235-439C-80F2-C573C8904892}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{27018CE2-C235-439C-80F2-C573C8904892}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
|
@ -268,7 +262,6 @@ Global
|
|||
{A257C01B-BB91-44BA-831C-1E04F7800AC8} = {CE6B50B2-34AE-44C9-940A-4E48C3E1B3BC}
|
||||
{99595B81-D47C-40BA-8C61-5328A5A0E4AB} = {CE6B50B2-34AE-44C9-940A-4E48C3E1B3BC}
|
||||
{87ADBDB5-CA57-4EAB-9A8A-5E89480C9C6D} = {CE6B50B2-34AE-44C9-940A-4E48C3E1B3BC}
|
||||
{31ED3EA7-8270-478D-935D-0067BD7935B7} = {CE6B50B2-34AE-44C9-940A-4E48C3E1B3BC}
|
||||
{27018CE2-C235-439C-80F2-C573C8904892} = {258D5057-81B9-40EC-A872-D21E27452749}
|
||||
{935B51B9-A9B9-4DA2-93A2-663D3BCEAA83} = {258D5057-81B9-40EC-A872-D21E27452749}
|
||||
{7EAC2B8E-4AF6-40D2-95C0-A6662762A7E0} = {258D5057-81B9-40EC-A872-D21E27452749}
|
||||
|
|
|
@ -4,17 +4,34 @@
|
|||
"AdxVerificationCompositeRule"
|
||||
],
|
||||
"packages": {
|
||||
"dotnet-ef": {
|
||||
"packageTypes": [
|
||||
"DotnetTool"
|
||||
],
|
||||
"Exclusions": {
|
||||
"NEUTRAL_RESOURCES_LANGUAGE": {
|
||||
"tools/netcoreapp2.0/any/Newtonsoft.Json.dll": "External"
|
||||
},
|
||||
"SERVICING_ATTRIBUTE": {
|
||||
"tools/netcoreapp2.0/any/Newtonsoft.Json.dll": "External"
|
||||
},
|
||||
"VERSION_INFORMATIONALVERSION": {
|
||||
"tools/netcoreapp2.0/any/Newtonsoft.Json.dll": "External"
|
||||
},
|
||||
"WRONG_PUBLICKEYTOKEN": {
|
||||
"tools/netcoreapp2.0/any/Newtonsoft.Json.dll": "External"
|
||||
},
|
||||
"ASSEMBLY_INFORMATIONAL_VERSION_MISMATCH": {
|
||||
"tools/netcoreapp2.0/any/Newtonsoft.Json.dll": "External"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.EntityFrameworkCore.Design": {
|
||||
"Exclusions": {
|
||||
"BUILD_ITEMS_FRAMEWORK": {
|
||||
"*": "False negative. aspnet/BuildTools#554"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.EntityFrameworkCore.Tools.DotNet": {
|
||||
"packageTypes": [
|
||||
"DotnetCliTool"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
<Project>
|
||||
|
||||
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
|
||||
|
||||
<UsingTask TaskName="Microsoft.NET.Build.Tasks.ResolvePackageDependencies" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<PackageId>Microsoft.EntityFrameworkCore.Tools.DotNet</PackageId>
|
||||
<NuspecFile>$(MSBuildThisFileDirectory)$(MSBuildProjectName).nuspec</NuspecFile>
|
||||
<NoPackageAnalysis>true</NoPackageAnalysis>
|
||||
<IncludeBuildOutput>false</IncludeBuildOutput>
|
||||
<IncludeSource>false</IncludeSource>
|
||||
<IncludeSymbols>false</IncludeSymbols>
|
||||
<EnableApiCheck>false</EnableApiCheck>
|
||||
<PackageType>DotnetCliTool</PackageType>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\dotnet-ef\dotnet-ef.csproj" />
|
||||
<ProjectReference Include="..\ef\ef.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="SetPackageProperties" BeforeTargets="GenerateNuspec">
|
||||
<ResolvePackageDependencies ProjectPath="$(MSBuildProjectFullPath)" ProjectAssetsFile="$(ProjectAssetsFile)" ProjectLanguage="$(Language)">
|
||||
<Output TaskParameter="PackageDefinitions" ItemName="_PackageDefinitions" />
|
||||
</ResolvePackageDependencies>
|
||||
<PropertyGroup>
|
||||
<NuspecProperties>
|
||||
id=$(PackageId);
|
||||
version=$(PackageVersion);
|
||||
configuration=$(Configuration);
|
||||
runtimeFrameworkVersion=@(_PackageDefinitions->WithMetadataValue('Name', 'Microsoft.NETCore.App')->Metadata('Version'));
|
||||
jsonNetVersion=@(_PackageDefinitions->WithMetadataValue('Name', 'Newtonsoft.Json')->Metadata('Version'))
|
||||
</NuspecProperties>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
||||
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
|
||||
|
||||
<Target Name="Compile" />
|
||||
<Target Name="CopyFilesToOutputDirectory" />
|
||||
|
||||
</Project>
|
|
@ -1,35 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>$id$</id>
|
||||
<version>$version$</version>
|
||||
<authors>Microsoft</authors>
|
||||
<copyright>Copyright © Microsoft Corporation</copyright>
|
||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||
<description>Entity Framework Core .NET Command-line Tools. Includes dotnet-ef.</description>
|
||||
<tags>Entity Framework Core entity-framework-core EF Data O/RM EntityFramework EntityFrameworkCore EFCore</tags>
|
||||
<repository type="git" url="https://github.com/aspnet/EntityFramework.Tools.git" />
|
||||
<serviceable>true</serviceable>
|
||||
<licenseUrl>https://raw.githubusercontent.com/aspnet/Home/2.0.0/LICENSE.txt</licenseUrl>
|
||||
<iconUrl>https://go.microsoft.com/fwlink/?LinkID=288859</iconUrl>
|
||||
<projectUrl>https://asp.net</projectUrl>
|
||||
<packageTypes>
|
||||
<packageType name="DotnetCliTool" />
|
||||
</packageTypes>
|
||||
<dependencies>
|
||||
<group targetFramework=".NETCoreApp2.0">
|
||||
<dependency id="Microsoft.NETCore.App" version="$runtimeFrameworkVersion$" exclude="Build,Analyzers" />
|
||||
<dependency id="Newtonsoft.Json" version="$jsonNetVersion$" exclude="Build,Analyzers" />
|
||||
</group>
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="../dotnet-ef/bin/$configuration$/netcoreapp2.0/dotnet-ef.dll" target="lib/netcoreapp2.0/" />
|
||||
<file src="../dotnet-ef/bin/$configuration$/netcoreapp2.0/dotnet-ef.runtimeconfig.json" target="lib/netcoreapp2.0/" />
|
||||
<file src="../ef/bin/$configuration$/net461/ef.exe" target="tools/net461/" />
|
||||
<file src="../ef/bin/x86/$configuration$/net461/ef.x86.exe" target="tools/net461/" />
|
||||
<file src="../ef/bin/$configuration$/netcoreapp2.0/ef.dll" target="tools/netcoreapp2.0/" />
|
||||
<file src="../ef/bin/$configuration$/netcoreapp2.0/ef.runtimeconfig.json" target="tools/netcoreapp2.0/" />
|
||||
<file src="prefercliruntime" target="prefercliruntime" />
|
||||
</files>
|
||||
</package>
|
|
@ -92,11 +92,7 @@ namespace Microsoft.EntityFrameworkCore.Tools
|
|||
var args = new List<string>();
|
||||
|
||||
var toolsPath = Path.GetFullPath(
|
||||
Path.Combine(
|
||||
Path.GetDirectoryName(typeof(Program).GetTypeInfo().Assembly.Location),
|
||||
"..",
|
||||
"..",
|
||||
"tools"));
|
||||
Path.Combine(Path.GetDirectoryName(typeof(Program).GetTypeInfo().Assembly.Location), "..", ".."));
|
||||
|
||||
var targetDir = Path.GetFullPath(Path.Combine(startupProject.ProjectDir, startupProject.OutputPath));
|
||||
var targetPath = Path.Combine(targetDir, project.TargetFileName);
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<Description>Entity Framework Core .NET Command-line Tools</Description>
|
||||
<Description>Entity Framework Core .NET Command-line Tools. Includes dotnet-ef.</Description>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
<IsPackable>false</IsPackable>
|
||||
<PackAsTool>true</PackAsTool>
|
||||
<RootNamespace>Microsoft.EntityFrameworkCore.Tools</RootNamespace>
|
||||
<IncludeSource>false</IncludeSource>
|
||||
<IncludeSymbols>false</IncludeSymbols>
|
||||
<EnableApiCheck>false</EnableApiCheck>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -27,6 +30,10 @@
|
|||
<Compile Include="..\ef\Commands\**\*.Configure.cs" />
|
||||
<Compile Include="..\Shared\CodeAnnotations.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ef\ef.csproj" ReferenceOutputAssembly="false" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\EntityFrameworkCore.targets" />
|
||||
|
@ -54,5 +61,24 @@
|
|||
<DependentUpon>Resources.Designer.tt</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="..\ef\bin\$(Configuration)\net461\ef.exe">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath>tools\net461</PackagePath>
|
||||
</None>
|
||||
<None Include="..\ef\bin\x86\$(Configuration)\net461\ef.x86.exe">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath>tools\net461</PackagePath>
|
||||
</None>
|
||||
<None Include="..\ef\bin\$(Configuration)\netcoreapp2.0\ef.dll">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath>tools\netcoreapp2.0</PackagePath>
|
||||
</None>
|
||||
<None Include="..\ef\bin\$(Configuration)\netcoreapp2.0\ef.runtimeconfig.json">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath>tools\netcoreapp2.0</PackagePath>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -10,4 +10,8 @@
|
|||
<ProjectReference Include="..\..\src\dotnet-ef\dotnet-ef.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
Загрузка…
Ссылка в новой задаче