Skip to content

Commit 2b5dbaa

Browse files
committed
Initial automated migration to latest 1.x SDK as part of #72
* Latest, released SDK is 1.0.4 * Migrating from `project.json` to `*.csproj`
1 parent 024c8c9 commit 2b5dbaa

File tree

23 files changed

+509
-657
lines changed

23 files changed

+509
-657
lines changed

global.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

migrate-report.out

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
Project Tug.Base migration succeeded (C:\prj\zyborg\PowerShell-tug\tug\src\Tug.Base).
3+
4+
Project Tug.Client migration succeeded (C:\prj\zyborg\PowerShell-tug\tug\src\Tug.Client).
5+
6+
Project Tug.Ext-WORK migration succeeded (C:\prj\zyborg\PowerShell-tug\tug\src\Tug.Ext-WORK).
7+
8+
Project Tug.Server migration succeeded (C:\prj\zyborg\PowerShell-tug\tug\src\Tug.Server).
9+
10+
Project Tug.Server.Base migration succeeded (C:\prj\zyborg\PowerShell-tug\tug\src\Tug.Server.Base).
11+
12+
Project Tug.Server.FaaS.AwsLambda migration succeeded (C:\prj\zyborg\PowerShell-tug\tug\src\Tug.Server.FaaS.AwsLambda).
13+
14+
Project Tug.Server.Providers.Ps5DscHandler migration succeeded (C:\prj\zyborg\PowerShell-tug\tug\src\Tug.Server.Providers.Ps5DscHandler).
15+
16+
Project Tug.Ext-tests migration succeeded (C:\prj\zyborg\PowerShell-tug\tug\test\Tug.Ext-tests).
17+
18+
Project Tug.Ext-tests-aux migration succeeded (C:\prj\zyborg\PowerShell-tug\tug\test\Tug.Ext-tests-aux).
19+
20+
Project Tug.UnitTesting migration succeeded (C:\prj\zyborg\PowerShell-tug\tug\test\Tug.UnitTesting).
21+
Summary
22+
Total Projects: 10
23+
Succeeded Projects: 10
24+
Failed Projects: 0
25+
26+
##BEK: Also outputted:
27+
# The project migration has finished. Please visit https://aka.ms/coremigration to report any issues you've encountered or ask for help.
28+
# Files backed up to C:\prj\zyborg\PowerShell-tug\tug\backup\

migrate.cmd

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
@REM
2+
@REM C:\prj\zyborg\PowerShell-tug\tug\src\Tug.Client>dotnet migrate --help
3+
@REM .NET Migrate Command
4+
@REM
5+
@REM Usage: dotnet migrate [arguments] [options]
6+
@REM
7+
@REM Arguments:
8+
@REM <PROJECT_JSON/GLOBAL_JSON/SOLUTION_FILE/PROJECT_DIR> The path to one of the following:
9+
@REM - a project.json file to migrate.
10+
@REM - a global.json file, it will migrate the folders specified in global.json.
11+
@REM - a solution.sln file, it will migrate the projects referenced in the solution.
12+
@REM - a directory to migrate, it will recursively search for project.json files to migrate.
13+
@REM Defaults to current directory if nothing is specified.
14+
@REM
15+
@REM Options:
16+
@REM -h|--help Show help information
17+
@REM -t|--template-file Base MSBuild template to use for migrated app. The default is the project included in dotnet new.
18+
@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.
19+
@REM -x|--xproj-file The path to the xproj file to use. Required when there is more than one xproj in a project directory.
20+
@REM -s|--skip-project-references Skip migrating project references. By default project references are migrated recursively.
21+
@REM -r|--report-file Output migration report to the given file in addition to the console.
22+
@REM --format-report-file-json Output migration report file as json rather than user messages.
23+
@REM --skip-backup Skip moving project.json, global.json, and *.xproj to a `backup` directory after successful migration.
24+
@REM
25+
26+
@SETLOCAL
27+
@SET THIS_DIR=%~dp0
28+
29+
dotnet migrate "%THIS_DIR%global.json" --report-file "%THIS_DIR%migrate-report.out"

src/Tug.Base/Tug.Base.csproj

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<Import Project="..\shared\common.props" />
4+
<Import Project="..\shared\shared-asm-manifest.props" />
5+
6+
<PropertyGroup>
7+
<TargetFrameworks>netstandard1.6;net452</TargetFrameworks>
8+
<!--<DebugType>portable</DebugType>-->
9+
<AssemblyName>Tug.Base</AssemblyName>
10+
<PackageId>Tug.Base</PackageId>
11+
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netstandard1.6' ">$(PackageTargetFallback);portable-net45+win8</PackageTargetFallback>
12+
<NetStandardImplicitPackageVersion Condition=" '$(TargetFramework)' == 'netstandard1.6' ">1.6.1</NetStandardImplicitPackageVersion>
13+
</PropertyGroup>
14+
15+
<ItemGroup>
16+
<PackageReference Include="Microsoft.Composition" Version="1.0.30" />
17+
<PackageReference Include="Microsoft.Extensions.PlatformAbstractions" Version="1.1.0" />
18+
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="1.1.0" />
19+
<PackageReference Include="Microsoft.Extensions.Logging" Version="1.1.1" />
20+
<PackageReference Include="Microsoft.Extensions.Configuration" Version="1.1.1" />
21+
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.2" />
22+
</ItemGroup>
23+
24+
<!--netstandard1.6-->
25+
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.6' ">
26+
<DefineConstants>$(DefineConstants);DOTNET_CORE</DefineConstants>
27+
</PropertyGroup>
28+
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.6' ">
29+
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
30+
<PackageReference Include="System.ComponentModel.Annotations" Version="4.3.0" />
31+
</ItemGroup>
32+
33+
<!--net452-->
34+
<PropertyGroup Condition=" '$(TargetFramework)' == 'net452' ">
35+
<DefineConstants>$(DefineConstants);DOTNET_FRAMEWORK</DefineConstants>
36+
</PropertyGroup>
37+
<ItemGroup Condition=" '$(TargetFramework)' == 'net452' ">
38+
<Reference Include="System.Numerics" />
39+
<Reference Include="System.ComponentModel.DataAnnotations" />
40+
<Reference Include="System" />
41+
<Reference Include="Microsoft.CSharp" />
42+
</ItemGroup>
43+
44+
</Project>

src/Tug.Base/project.json

Lines changed: 0 additions & 70 deletions
This file was deleted.

src/Tug.Client/Tug.Client.csproj

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<NeutralLanguage>en-US</NeutralLanguage>
5+
<Authors>github.com/PowerShellOrg/tug/graphs/contributors</Authors>
6+
<TargetFrameworks>netcoreapp1.0;net452</TargetFrameworks>
7+
<NoWarn>$(NoWarn);CS0169;CS0649</NoWarn>
8+
<DebugType>portable</DebugType>
9+
<PreserveCompilationContext>true</PreserveCompilationContext>
10+
<AssemblyName>Tug.Client</AssemblyName>
11+
<OutputType>Exe</OutputType>
12+
<PackageId>Tug.Client</PackageId>
13+
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">$(PackageTargetFallback);dnxcore50;portable-net45+win8</PackageTargetFallback>
14+
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">1.0.4</RuntimeFrameworkVersion>
15+
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
16+
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
17+
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
18+
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
19+
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
20+
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
21+
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
22+
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
23+
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
24+
</PropertyGroup>
25+
26+
<ItemGroup>
27+
<Compile Include="..\shared\SharedAssemblyInfo.cs;..\shared\SharedAssemblyVersionInfo.cs" />
28+
</ItemGroup>
29+
30+
<ItemGroup>
31+
<ProjectReference Include="..\Tug.Base\Tug.Base.csproj" />
32+
</ItemGroup>
33+
34+
<ItemGroup>
35+
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.1" />
36+
<PackageReference Include="NLog.Extensions.Logging" Version="1.0.0-rtm-alpha5" />
37+
<PackageReference Include="Microsoft.Extensions.CommandLineUtils" Version="1.1.0" />
38+
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.1.1" />
39+
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="1.1.1" />
40+
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="1.1.1" />
41+
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="1.1.1" />
42+
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="1.1.1" />
43+
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
44+
</ItemGroup>
45+
46+
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
47+
<PackageReference Include="System.Net.Primitives" Version="4.3.0" />
48+
<PackageReference Include="System.Net.NameResolution" Version="4.3.0" />
49+
<PackageReference Include="System.Net.NetworkInformation" Version="4.3.0" />
50+
<PackageReference Include="System.Security.Cryptography.Algorithms" Version="4.3.0" />
51+
</ItemGroup>
52+
53+
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
54+
<DefineConstants>$(DefineConstants);DOTNET_CORE</DefineConstants>
55+
</PropertyGroup>
56+
57+
<PropertyGroup Condition=" '$(TargetFramework)' == 'net452' ">
58+
<DefineConstants>$(DefineConstants);DOTNET_FRAMEWORK</DefineConstants>
59+
</PropertyGroup>
60+
61+
<ItemGroup Condition=" '$(TargetFramework)' == 'net452' ">
62+
<Reference Include="System" />
63+
<Reference Include="Microsoft.CSharp" />
64+
</ItemGroup>
65+
66+
</Project>

src/Tug.Client/project.json

Lines changed: 0 additions & 79 deletions
This file was deleted.

src/Tug.Ext-WORK/Tug.Ext-WORK.csproj

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<Copyright>Copyright © 2016 The DevOps Collective, Inc. All rights reserved. Licnesed under GNU GPL v3.</Copyright>
5+
<AssemblyTitle>Tug Client</AssemblyTitle>
6+
<NeutralLanguage>en-US</NeutralLanguage>
7+
<VersionPrefix>0.5.1</VersionPrefix>
8+
<TargetFrameworks>netcoreapp1.1;net462</TargetFrameworks>
9+
<DebugType>portable</DebugType>
10+
<PreserveCompilationContext>true</PreserveCompilationContext>
11+
<AssemblyName>Tug.Ext</AssemblyName>
12+
<OutputType>Exe</OutputType>
13+
<PackageId>Tug.Ext-WORK</PackageId>
14+
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">$(PackageTargetFallback);dnxcore50;portable-net45+win8</PackageTargetFallback>
15+
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">1.0.4</RuntimeFrameworkVersion>
16+
</PropertyGroup>
17+
18+
<ItemGroup>
19+
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
20+
<PackageReference Include="Microsoft.Composition" Version="1.0.30" />
21+
<PackageReference Include="Microsoft.Extensions.Logging" Version="1.0.2" />
22+
<PackageReference Include="Microsoft.Extensions.Configuration" Version="1.0.2" />
23+
</ItemGroup>
24+
25+
<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
26+
<Reference Include="System.Numerics" />
27+
<Reference Include="System.ComponentModel.DataAnnotations" />
28+
<Reference Include="System" />
29+
<Reference Include="Microsoft.CSharp" />
30+
</ItemGroup>
31+
32+
</Project>

0 commit comments

Comments
 (0)