Skip to content

Commit

Permalink
Initial automated migration to latest 1.x SDK as part of #72
Browse files Browse the repository at this point in the history
* Latest, released SDK is 1.0.4
* Migrating from `project.json` to `*.csproj`
  • Loading branch information
ebekker committed Jun 22, 2017
1 parent 024c8c9 commit 2b5dbaa
Show file tree
Hide file tree
Showing 23 changed files with 509 additions and 657 deletions.
9 changes: 0 additions & 9 deletions global.json

This file was deleted.

28 changes: 28 additions & 0 deletions migrate-report.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

Project Tug.Base migration succeeded (C:\prj\zyborg\PowerShell-tug\tug\src\Tug.Base).

Project Tug.Client migration succeeded (C:\prj\zyborg\PowerShell-tug\tug\src\Tug.Client).

Project Tug.Ext-WORK migration succeeded (C:\prj\zyborg\PowerShell-tug\tug\src\Tug.Ext-WORK).

Project Tug.Server migration succeeded (C:\prj\zyborg\PowerShell-tug\tug\src\Tug.Server).

Project Tug.Server.Base migration succeeded (C:\prj\zyborg\PowerShell-tug\tug\src\Tug.Server.Base).

Project Tug.Server.FaaS.AwsLambda migration succeeded (C:\prj\zyborg\PowerShell-tug\tug\src\Tug.Server.FaaS.AwsLambda).

Project Tug.Server.Providers.Ps5DscHandler migration succeeded (C:\prj\zyborg\PowerShell-tug\tug\src\Tug.Server.Providers.Ps5DscHandler).

Project Tug.Ext-tests migration succeeded (C:\prj\zyborg\PowerShell-tug\tug\test\Tug.Ext-tests).

Project Tug.Ext-tests-aux migration succeeded (C:\prj\zyborg\PowerShell-tug\tug\test\Tug.Ext-tests-aux).

Project Tug.UnitTesting migration succeeded (C:\prj\zyborg\PowerShell-tug\tug\test\Tug.UnitTesting).
Summary
Total Projects: 10
Succeeded Projects: 10
Failed Projects: 0

##BEK: Also outputted:
# The project migration has finished. Please visit https://aka.ms/coremigration to report any issues you've encountered or ask for help.
# Files backed up to C:\prj\zyborg\PowerShell-tug\tug\backup\
29 changes: 29 additions & 0 deletions migrate.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
@REM
@REM C:\prj\zyborg\PowerShell-tug\tug\src\Tug.Client>dotnet migrate --help
@REM .NET Migrate Command
@REM
@REM Usage: dotnet migrate [arguments] [options]
@REM
@REM Arguments:
@REM <PROJECT_JSON/GLOBAL_JSON/SOLUTION_FILE/PROJECT_DIR> The path to one of the following:
@REM - a project.json file to migrate.
@REM - a global.json file, it will migrate the folders specified in global.json.
@REM - a solution.sln file, it will migrate the projects referenced in the solution.
@REM - a directory to migrate, it will recursively search for project.json files to migrate.
@REM Defaults to current directory if nothing is specified.
@REM
@REM Options:
@REM -h|--help Show help information
@REM -t|--template-file Base MSBuild template to use for migrated app. The default is the project included in dotnet new.
@REM -v|--sdk-package-version The version of the sdk package that will be referenced in the migrated app. The default is the version of the sdk in dotnet new.
@REM -x|--xproj-file The path to the xproj file to use. Required when there is more than one xproj in a project directory.
@REM -s|--skip-project-references Skip migrating project references. By default project references are migrated recursively.
@REM -r|--report-file Output migration report to the given file in addition to the console.
@REM --format-report-file-json Output migration report file as json rather than user messages.
@REM --skip-backup Skip moving project.json, global.json, and *.xproj to a `backup` directory after successful migration.
@REM

@SETLOCAL
@SET THIS_DIR=%~dp0

dotnet migrate "%THIS_DIR%global.json" --report-file "%THIS_DIR%migrate-report.out"
44 changes: 44 additions & 0 deletions src/Tug.Base/Tug.Base.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<Project Sdk="Microsoft.NET.Sdk">

<Import Project="..\shared\common.props" />
<Import Project="..\shared\shared-asm-manifest.props" />

<PropertyGroup>
<TargetFrameworks>netstandard1.6;net452</TargetFrameworks>
<!--<DebugType>portable</DebugType>-->
<AssemblyName>Tug.Base</AssemblyName>
<PackageId>Tug.Base</PackageId>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netstandard1.6' ">$(PackageTargetFallback);portable-net45+win8</PackageTargetFallback>
<NetStandardImplicitPackageVersion Condition=" '$(TargetFramework)' == 'netstandard1.6' ">1.6.1</NetStandardImplicitPackageVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Composition" Version="1.0.30" />
<PackageReference Include="Microsoft.Extensions.PlatformAbstractions" Version="1.1.0" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="1.1.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="1.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.2" />
</ItemGroup>

<!--netstandard1.6-->
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.6' ">
<DefineConstants>$(DefineConstants);DOTNET_CORE</DefineConstants>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.6' ">
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
<PackageReference Include="System.ComponentModel.Annotations" Version="4.3.0" />
</ItemGroup>

<!--net452-->
<PropertyGroup Condition=" '$(TargetFramework)' == 'net452' ">
<DefineConstants>$(DefineConstants);DOTNET_FRAMEWORK</DefineConstants>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net452' ">
<Reference Include="System.Numerics" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>

</Project>
70 changes: 0 additions & 70 deletions src/Tug.Base/project.json

This file was deleted.

66 changes: 66 additions & 0 deletions src/Tug.Client/Tug.Client.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<NeutralLanguage>en-US</NeutralLanguage>
<Authors>github.com/PowerShellOrg/tug/graphs/contributors</Authors>
<TargetFrameworks>netcoreapp1.0;net452</TargetFrameworks>
<NoWarn>$(NoWarn);CS0169;CS0649</NoWarn>
<DebugType>portable</DebugType>
<PreserveCompilationContext>true</PreserveCompilationContext>
<AssemblyName>Tug.Client</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>Tug.Client</PackageId>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">$(PackageTargetFallback);dnxcore50;portable-net45+win8</PackageTargetFallback>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">1.0.4</RuntimeFrameworkVersion>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
</PropertyGroup>

<ItemGroup>
<Compile Include="..\shared\SharedAssemblyInfo.cs;..\shared\SharedAssemblyVersionInfo.cs" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Tug.Base\Tug.Base.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.1" />
<PackageReference Include="NLog.Extensions.Logging" Version="1.0.0-rtm-alpha5" />
<PackageReference Include="Microsoft.Extensions.CommandLineUtils" Version="1.1.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="1.1.1" />
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
<PackageReference Include="System.Net.Primitives" Version="4.3.0" />
<PackageReference Include="System.Net.NameResolution" Version="4.3.0" />
<PackageReference Include="System.Net.NetworkInformation" Version="4.3.0" />
<PackageReference Include="System.Security.Cryptography.Algorithms" Version="4.3.0" />
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
<DefineConstants>$(DefineConstants);DOTNET_CORE</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net452' ">
<DefineConstants>$(DefineConstants);DOTNET_FRAMEWORK</DefineConstants>
</PropertyGroup>

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

</Project>
79 changes: 0 additions & 79 deletions src/Tug.Client/project.json

This file was deleted.

32 changes: 32 additions & 0 deletions src/Tug.Ext-WORK/Tug.Ext-WORK.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Copyright>Copyright © 2016 The DevOps Collective, Inc. All rights reserved. Licnesed under GNU GPL v3.</Copyright>
<AssemblyTitle>Tug Client</AssemblyTitle>
<NeutralLanguage>en-US</NeutralLanguage>
<VersionPrefix>0.5.1</VersionPrefix>
<TargetFrameworks>netcoreapp1.1;net462</TargetFrameworks>
<DebugType>portable</DebugType>
<PreserveCompilationContext>true</PreserveCompilationContext>
<AssemblyName>Tug.Ext</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>Tug.Ext-WORK</PackageId>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">$(PackageTargetFallback);dnxcore50;portable-net45+win8</PackageTargetFallback>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">1.0.4</RuntimeFrameworkVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
<PackageReference Include="Microsoft.Composition" Version="1.0.30" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="1.0.2" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="1.0.2" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
<Reference Include="System.Numerics" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>

</Project>
Loading

0 comments on commit 2b5dbaa

Please sign in to comment.