Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
Migrate to .NET SDK projects
Browse files Browse the repository at this point in the history
  • Loading branch information
AArnott committed Dec 11, 2017
1 parent 79bbce8 commit 0506f07
Show file tree
Hide file tree
Showing 18 changed files with 88 additions and 462 deletions.
17 changes: 17 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<BaseIntermediateOutputPath>$(MSBuildThisFileDirectory)..\obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
<BaseOutputPath Condition=" '$(BaseOutputPath)' == '' ">$(MSBuildThisFileDirectory)..\bin\$(MSBuildProjectName)\</BaseOutputPath>

<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugType>full</DebugType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DebugType>pdbonly</DebugType>
</PropertyGroup>
</Project>
12 changes: 12 additions & 0 deletions src/EnlistmentInfo.targets → src/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,20 @@
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>

<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)GitLink.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Catel.Core" Version="4.5.3" PrivateAssets="all" />
<PackageReference Include="StyleCop.Analyzers" Version="1.0.2" PrivateAssets="all" />
<PackageReference Include="LibGit2Sharp" Version="0.21.0.176" PrivateAssets="all" />
<PackageReference Include="GitTools.Core" Version="1.0.0-unstable0021" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json" />
</ItemGroup>

<Target Name="GetDeployableOutputs"
DependsOnTargets="ResolveReferences;GetCopyToOutputDirectoryItems;BuiltProjectOutputGroup;SatelliteDllsProjectOutputGroup;SatelliteDllsProjectOutputGroupDependencies"
Returns="@(DeployableOutputs)">
Expand Down
121 changes: 6 additions & 115 deletions src/GitLink.Tests/GitLink.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,139 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{ED2B9579-59D2-40F2-BC5E-F4DC3DAB9A56}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>GitLink.Tests</RootNamespace>
<AssemblyName>GitLink.Tests</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
<IsCodedUITest>False</IsCodedUITest>
<TestProjectType>UnitTest</TestProjectType>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\output\debug\GitLink.Tests\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>..\..\bin\Debug\GitLink.Tests\GitLink.Tests.XML</DocumentationFile>
<NoWarn>CS1591</NoWarn>
<CodeAnalysisRuleSet>GitLink.Tests.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\output\release\GitLink.Tests\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>..\..\bin\Release\GitLink.Tests\GitLink.Tests.XML</DocumentationFile>
<NoWarn>CS1591</NoWarn>
<CodeAnalysisRuleSet>GitLink.Tests.ruleset</CodeAnalysisRuleSet>
<TargetFramework>net45</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Build" />
<Reference Include="System" />
<Reference Include="System.Net" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ApprovalTests" Version="3.0.8" />
<PackageReference Include="ApprovalUtilities" Version="3.0.8" />
<PackageReference Include="NUnit" Version="3.5.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.4.1" />
</ItemGroup>
<Choose>
<When Condition="('$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == '') and '$(TargetFrameworkVersion)' == 'v3.5'">
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
</ItemGroup>
</When>
<Otherwise />
</Choose>
<ItemGroup>
<Compile Include="..\GitLink\Extensions\RepositoryExtensions.cs">
<Link>Extensions\RepositoryExtensions.cs</Link>
</Compile>
<Compile Include="ApprovalTestsConfig.cs" />
<Compile Include="Extensions\RepositoryExtensionFacts.cs" />
<Compile Include="IntegrationTests\BitBucketIntegration.cs" />
<Compile Include="IntegrationTests\GitHubIntegration.cs" />
<Compile Include="IntegrationTests\IntegrationTestBase.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="GlobalInitialization.cs" />
<Compile Include="Providers\BitBucketProviderFacts.cs" />
<Compile Include="Providers\CustomRawUrlProviderFacts.cs" />
<Compile Include="Providers\CustomUrlProviderFacts.cs" />
<Compile Include="Providers\GitHubProviderFacts.cs" />
<Compile Include="Providers\ProviderManagerFacts.cs" />
<Compile Include="Providers\UncProviderFacts.cs" />
<Compile Include="Providers\VisualStudioTeamServicesProviderFacts.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\GitLink\GitLink.csproj">
<Project>{d68add77-913f-46d2-9a4f-5cc71c4718d8}</Project>
<Name>GitLink</Name>
</ProjectReference>
<ProjectReference Include="..\GitLink\GitLink.csproj" />
</ItemGroup>
<ItemGroup>
<Content Include="IntegrationTests\BitBucketIntegration.CorrectlyUpdatesPdbFiles.approved.txt" />
<Content Include="IntegrationTests\GitHubIntegration.CorrectlyUpdatesPdbFiles.approved.txt" />
<Content Include="TestSolution\BuiltAlways\BuiltAlways.csproj">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="TestSolution\BuiltInAnyCpuOnly\BuiltInAnyCpuOnly.csproj">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="TestSolution\BuiltInDebugOnly\BuiltInDebugOnly.csproj">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<Content Include="TestSolution\**">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="TestSolution\TestSolution.sln">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<AdditionalFiles Include="..\GitLink\stylecop.json">
<Link>stylecop.json</Link>
</AdditionalFiles>
<None Include="GitLink.Tests.ruleset" />
<None Include="project.json" />
</ItemGroup>
<Choose>
<When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestTools.UITesting, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
</ItemGroup>
</When>
</Choose>
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
78 changes: 0 additions & 78 deletions src/GitLink.Tests/GitLink.Tests.ruleset

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="GitHubProviderFacts.cs" company="CatenaLogic">
// <copyright file="VisualStudioTeamServicesProviderFacts.cs" company="CatenaLogic">
// Copyright (c) 2014 - 2014 CatenaLogic. All rights reserved.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------
Expand All @@ -19,7 +19,7 @@ public void ReturnsValidInitialization()
{
var provider = new VisualStudioTeamServicesProvider();
var valid = provider.Initialize("https://my-account.visualstudio.com/_git/main-repo");

Assert.IsTrue(valid);
}

Expand Down
1 change: 1 addition & 0 deletions src/GitLink/GitLink.ruleset → src/GitLink.ruleset
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
<Rule Id="SA1202" Action="Hidden" />
<Rule Id="SA1201" Action="Hidden" />
<Rule Id="SA1124" Action="Hidden" />
<Rule Id="SA1133" Action="Hidden" />
<Rule Id="SA1309" Action="Hidden" />
<Rule Id="SA1600" Action="Hidden" />
<Rule Id="SA1121" Action="Hidden" />
Expand Down
17 changes: 7 additions & 10 deletions src/GitLink.sln
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio 15
VisualStudioVersion = 15.0.27205.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitLink", "GitLink\GitLink.csproj", "{D68ADD77-913F-46D2-9A4F-5CC71C4718D8}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GitLink", "GitLink\GitLink.csproj", "{D68ADD77-913F-46D2-9A4F-5CC71C4718D8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitLink.Tests", "GitLink.Tests\GitLink.Tests.csproj", "{ED2B9579-59D2-40F2-BC5E-F4DC3DAB9A56}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitLinkTask", "GitLinkTask\GitLinkTask.csproj", "{38BFDD5A-8CC2-43B8-96CE-BC572E3DFEF5}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GitLinkTask", "GitLinkTask\GitLinkTask.csproj", "{38BFDD5A-8CC2-43B8-96CE-BC572E3DFEF5}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{DADE411A-78DD-4586-B06C-E3991077DF76}"
ProjectSection(SolutionItems) = preProject
Expand All @@ -19,8 +19,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
..\README.md = ..\README.md
EndProjectSection
EndProject
Project("{FF286327-C783-4F7A-AB73-9BCBAD0D4460}") = "GitLink.NuGet", "GitLink.NuGet\GitLink.NuGet.nuproj", "{29E78909-B7FB-472C-A9A0-1749A8BE9A9A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -39,12 +37,11 @@ Global
{38BFDD5A-8CC2-43B8-96CE-BC572E3DFEF5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{38BFDD5A-8CC2-43B8-96CE-BC572E3DFEF5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{38BFDD5A-8CC2-43B8-96CE-BC572E3DFEF5}.Release|Any CPU.Build.0 = Release|Any CPU
{29E78909-B7FB-472C-A9A0-1749A8BE9A9A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{29E78909-B7FB-472C-A9A0-1749A8BE9A9A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{29E78909-B7FB-472C-A9A0-1749A8BE9A9A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{29E78909-B7FB-472C-A9A0-1749A8BE9A9A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {02DDD9FD-8BA4-421D-A234-DF8FDAEC1EE4}
EndGlobalSection
EndGlobal
Loading

0 comments on commit 0506f07

Please sign in to comment.