Skip to content

Commit

Permalink
Clean up residual net461 code
Browse files Browse the repository at this point in the history
Part of dotnet#15498
  • Loading branch information
bricelam committed May 18, 2019
1 parent baab073 commit 4b2e969
Show file tree
Hide file tree
Showing 34 changed files with 49 additions and 360 deletions.
4 changes: 0 additions & 4 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@

<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />

<Import
Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), AspNetCoreSettings.props))\AspNetCoreSettings.props"
Condition=" '$(CI)' != 'true' AND '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), AspNetCoreSettings.props))' != '' " />

<PropertyGroup Condition="'$(CopyrightMicrosoft)' != ''">
<Copyright>$(CopyrightMicrosoft)</Copyright>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
Expand Down
34 changes: 0 additions & 34 deletions src/EFCore.Design/Design/Internal/ForwardingProxy.cs

This file was deleted.

64 changes: 0 additions & 64 deletions src/EFCore.Design/Design/Internal/ForwardingProxy`.cs

This file was deleted.

30 changes: 14 additions & 16 deletions src/EFCore.Design/Design/OperationExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,12 @@ public class OperationExecutor : MarshalByRefObject
/// </summary>
/// <param name="reportHandler"> The <see cref="IOperationReportHandler" />. </param>
/// <param name="args"> The executor arguments. </param>
public OperationExecutor([NotNull] object reportHandler, [NotNull] IDictionary args)
public OperationExecutor([NotNull] IOperationReportHandler reportHandler, [NotNull] IDictionary args)
{
Check.NotNull(reportHandler, nameof(reportHandler));
Check.NotNull(args, nameof(args));

var unwrappedReportHandler = ForwardingProxy.Unwrap<IOperationReportHandler>(reportHandler);

_reporter = new OperationReporter(unwrappedReportHandler);
_reporter = new OperationReporter(reportHandler);
_targetName = (string)args["targetName"];
_startupTargetName = (string)args["startupTargetName"];
_projectDir = (string)args["projectDir"];
Expand Down Expand Up @@ -152,7 +150,7 @@ public class AddMigration : OperationBase
/// <param name="args"> The operation arguments. </param>
public AddMigration(
[NotNull] OperationExecutor executor,
[NotNull] object resultHandler,
[NotNull] IOperationResultHandler resultHandler,
[NotNull] IDictionary args)
: base(resultHandler)
{
Expand Down Expand Up @@ -200,7 +198,7 @@ public class GetContextInfo : OperationBase
/// <param name="executor"> The operation executor. </param>
/// <param name="resultHandler"> The <see cref="IOperationResultHandler" />. </param>
/// <param name="args"> The operation arguments. </param>
public GetContextInfo([NotNull] OperationExecutor executor, [NotNull] object resultHandler, [NotNull] IDictionary args)
public GetContextInfo([NotNull] OperationExecutor executor, [NotNull] IOperationResultHandler resultHandler, [NotNull] IDictionary args)
: base(resultHandler)
{
Check.NotNull(executor, nameof(executor));
Expand Down Expand Up @@ -240,7 +238,7 @@ public class UpdateDatabase : OperationBase
/// <param name="executor"> The operation executor. </param>
/// <param name="resultHandler"> The <see cref="IOperationResultHandler" />. </param>
/// <param name="args"> The operation arguments. </param>
public UpdateDatabase([NotNull] OperationExecutor executor, [NotNull] object resultHandler, [NotNull] IDictionary args)
public UpdateDatabase([NotNull] OperationExecutor executor, [NotNull] IOperationResultHandler resultHandler, [NotNull] IDictionary args)
: base(resultHandler)
{
Check.NotNull(executor, nameof(executor));
Expand Down Expand Up @@ -274,7 +272,7 @@ public class ScriptMigration : OperationBase
/// <param name="args"> The operation arguments. </param>
public ScriptMigration(
[NotNull] OperationExecutor executor,
[NotNull] object resultHandler,
[NotNull] IOperationResultHandler resultHandler,
[NotNull] IDictionary args)
: base(resultHandler)
{
Expand Down Expand Up @@ -317,7 +315,7 @@ public class RemoveMigration : OperationBase
/// <param name="args"> The operation arguments. </param>
public RemoveMigration(
[NotNull] OperationExecutor executor,
[NotNull] object resultHandler,
[NotNull] IOperationResultHandler resultHandler,
[NotNull] IDictionary args)
: base(resultHandler)
{
Expand Down Expand Up @@ -355,7 +353,7 @@ public class GetContextTypes : OperationBase
/// <param name="executor"> The operation executor. </param>
/// <param name="resultHandler"> The <see cref="IOperationResultHandler" />. </param>
/// <param name="args"> The operation arguments. </param>
public GetContextTypes([NotNull] OperationExecutor executor, [NotNull] object resultHandler, [NotNull] IDictionary args)
public GetContextTypes([NotNull] OperationExecutor executor, [NotNull] IOperationResultHandler resultHandler, [NotNull] IDictionary args)
: base(resultHandler)
{
Check.NotNull(executor, nameof(executor));
Expand Down Expand Up @@ -398,7 +396,7 @@ public class GetMigrations : OperationBase
/// <param name="executor"> The operation executor. </param>
/// <param name="resultHandler"> The <see cref="IOperationResultHandler" />. </param>
/// <param name="args"> The operation arguments. </param>
public GetMigrations([NotNull] OperationExecutor executor, [NotNull] object resultHandler, [NotNull] IDictionary args)
public GetMigrations([NotNull] OperationExecutor executor, [NotNull] IOperationResultHandler resultHandler, [NotNull] IDictionary args)
: base(resultHandler)
{
Check.NotNull(executor, nameof(executor));
Expand Down Expand Up @@ -448,7 +446,7 @@ public class ScaffoldContext : OperationBase
/// <param name="executor"> The operation executor. </param>
/// <param name="resultHandler"> The <see cref="IOperationResultHandler" />. </param>
/// <param name="args"> The operation arguments. </param>
public ScaffoldContext([NotNull] OperationExecutor executor, [NotNull] object resultHandler, [NotNull] IDictionary args)
public ScaffoldContext([NotNull] OperationExecutor executor, [NotNull] IOperationResultHandler resultHandler, [NotNull] IDictionary args)
: base(resultHandler)
{
Check.NotNull(executor, nameof(executor));
Expand Down Expand Up @@ -515,7 +513,7 @@ public class DropDatabase : OperationBase
/// <param name="args"> The operation arguments. </param>
public DropDatabase(
[NotNull] OperationExecutor executor,
[NotNull] object resultHandler,
[NotNull] IOperationResultHandler resultHandler,
[NotNull] IDictionary args)
: base(resultHandler)
{
Expand Down Expand Up @@ -546,7 +544,7 @@ public class ScriptDbContext : OperationBase
/// <param name="args"> The operation arguments. </param>
public ScriptDbContext(
[NotNull] OperationExecutor executor,
[NotNull] object resultHandler,
[NotNull] IOperationResultHandler resultHandler,
[NotNull] IDictionary args)
: base(resultHandler)
{
Expand All @@ -573,11 +571,11 @@ public abstract class OperationBase : MarshalByRefObject
/// Initializes a new instance of the <see cref="OperationBase" /> class.
/// </summary>
/// <param name="resultHandler"> The <see cref="IOperationResultHandler" />. </param>
protected OperationBase([NotNull] object resultHandler)
protected OperationBase([NotNull] IOperationResultHandler resultHandler)
{
Check.NotNull(resultHandler, nameof(resultHandler));

_resultHandler = ForwardingProxy.Unwrap<IOperationResultHandler>(resultHandler);
_resultHandler = resultHandler;
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/EFCore.Design/EFCore.Design.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Description>Shared design-time components for Entity Framework Core tools.</Description>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.EntityFrameworkCore.Design</AssemblyName>
<RootNamespace>Microsoft.EntityFrameworkCore</RootNamespace>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand Down
2 changes: 1 addition & 1 deletion src/ef/AppDomainOperationExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public AppDomainOperationExecutor(
string dataDirectory,
string rootNamespace,
string language)
: base(assembly, startupAssembly, projectDir, dataDirectory, rootNamespace, language)
: base(assembly, startupAssembly, projectDir, rootNamespace, language)
{
var info = new AppDomainSetup { ApplicationBase = AppBasePath };

Expand Down
1 change: 0 additions & 1 deletion src/ef/OperationExecutorBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ protected OperationExecutorBase(
string assembly,
string startupAssembly,
string projectDir,
string dataDirectory,
string rootNamespace,
string language)
{
Expand Down
9 changes: 8 additions & 1 deletion src/ef/ReflectionOperationExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using System.IO;
using System.Reflection;
using Microsoft.EntityFrameworkCore.Internal;
using Microsoft.EntityFrameworkCore.Tools.Properties;

namespace Microsoft.EntityFrameworkCore.Tools
{
Expand All @@ -25,8 +26,14 @@ public ReflectionOperationExecutor(
string dataDirectory,
string rootNamespace,
string language)
: base(assembly, startupAssembly, projectDir, dataDirectory, rootNamespace, language)
: base(assembly, startupAssembly, projectDir, rootNamespace, language)
{
if (dataDirectory != null)
{
Reporter.WriteVerbose(Resources.UsingDataDir(dataDirectory));
AppDomain.CurrentDomain.SetData("DataDirectory", dataDirectory);
}

AppDomain.CurrentDomain.AssemblyResolve += ResolveAssembly;

_commandsAssembly = Assembly.Load(new AssemblyName { Name = DesignAssemblyName });
Expand Down
8 changes: 0 additions & 8 deletions test/Directory.Build.props

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>$(StandardTestTfms)</TargetFrameworks>
<TargetFramework>netcoreapp3.0</TargetFramework>
<AssemblyName>Microsoft.EntityFrameworkCore.Cosmos.FunctionalTests</AssemblyName>
<RootNamespace>Microsoft.EntityFrameworkCore.Cosmos</RootNamespace>
<!-- Put this project into its own test group to avoid running parallel with other test projects. The test assembly is not loaded propertly on net461 otherwise. -->
<TestGroupName>Cosmos.FunctionalTests</TestGroupName>
<CodeAnalysisRuleSet>..\..\EFCore.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

Expand All @@ -26,10 +24,6 @@
<ProjectReference Include="..\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net461'">
<Reference Include="Microsoft.CSharp" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="$(MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion)" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="$(MicrosoftExtensionsConfigurationJsonPackageVersion)" />
Expand Down
2 changes: 1 addition & 1 deletion test/EFCore.Cosmos.Tests/EFCore.Cosmos.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>$(StandardTestTfms)</TargetFrameworks>
<TargetFramework>netcoreapp3.0</TargetFramework>
<AssemblyName>Microsoft.EntityFrameworkCore.Cosmos.Tests</AssemblyName>
<RootNamespace>Microsoft.EntityFrameworkCore.Cosmos</RootNamespace>
<CodeAnalysisRuleSet>..\..\EFCore.ruleset</CodeAnalysisRuleSet>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>$(StandardTestTfms)</TargetFrameworks>
<TargetFramework>netcoreapp3.0</TargetFramework>
<AssemblyName>Microsoft.EntityFrameworkCore.CrossStore.FunctionalTests</AssemblyName>
<RootNamespace>Microsoft.EntityFrameworkCore</RootNamespace>
<!-- Workaround https://github.com/Microsoft/vstest/issues/792. -->
Expand Down
Loading

0 comments on commit 4b2e969

Please sign in to comment.