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

Commit

Permalink
Merge pull request #1761 from github/refactor/sdk-csproj
Browse files Browse the repository at this point in the history
Update eligible projects to new SDK format.
  • Loading branch information
grokys authored Sep 10, 2018
2 parents 510154b + cf25357 commit 4eef5b3
Show file tree
Hide file tree
Showing 85 changed files with 514 additions and 5,440 deletions.
8 changes: 8 additions & 0 deletions Directory.Build.Props
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project>
<PropertyGroup>
<Product>GitHub Extension for Visual Studio</Product>
<Version>2.5.6.0</Version>
<Copyright>Copyright © GitHub, Inc. 2014-2018</Copyright>
<LangVersion>7.3</LangVersion>
</PropertyGroup>
</Project>
105 changes: 46 additions & 59 deletions GitHubVS.sln

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"msbuild-sdks": {
"MSBuild.Sdk.Extras": "1.6.52"
}
}
1 change: 1 addition & 0 deletions scripts/Bump-Version.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ if ($Trace) { Set-PSDebug -Trace 1 }
. $scriptsDirectory\Modules\Vsix.ps1 | out-null
. $scriptsDirectory\Modules\SolutionInfo.ps1 | out-null
. $scriptsDirectory\Modules\AppVeyor.ps1 | out-null
. $scriptsDirectory\Modules\DirectoryBuildProps.ps1 | out-null

if ($NewVersion -eq $null) {
if (!$BumpMajor -and !$BumpMinor -and !$BumpPatch -and !$BumpBuild){
Expand Down
4 changes: 2 additions & 2 deletions scripts/modules.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ New-Module -ScriptBlock {

$msbuild = Find-MSBuild

Write-Host "$msbuild $solution /target:$target /property:Configuration=$configuration /p:DeployExtension=false /verbosity:minimal /p:VisualStudioVersion=14.0 $flag1 $flag2"
Run-Command -Fatal { & $msbuild $solution /target:$target /property:Configuration=$configuration /p:DeployExtension=false /verbosity:minimal /p:VisualStudioVersion=14.0 $flag1 $flag2 }
Write-Host "$msbuild $solution /target:$target /property:Configuration=$configuration /p:DeployExtension=false /verbosity:minimal /p:VisualStudioVersion=15.0 $flag1 $flag2"
Run-Command -Fatal { & $msbuild $solution /target:$target /property:Configuration=$configuration /p:DeployExtension=false /verbosity:minimal /p:VisualStudioVersion=15.0 $flag1 $flag2 }
}

Export-ModuleMember -Function Find-MSBuild,Build-Solution
Expand Down
24 changes: 24 additions & 0 deletions scripts/modules/DirectoryBuildProps.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Set-StrictMode -Version Latest

New-Module -ScriptBlock {
function Get-DirectoryBuildPropsPath {
Join-Path $rootDirectory Directory.Build.Props
}

function Get-DirectoryBuildProps {
$xmlLines = Get-Content (Get-DirectoryBuildPropsPath) -encoding UTF8
[xml] $xmlLines
}

function Write-DirectoryBuildProps([System.Version]$version) {

$document = Get-DirectoryBuildProps

$numberOfReplacements = 0
$document.Project.PropertyGroup.Version = $version.ToString()

$document.Save((Get-DirectoryBuildPropsPath))
}

Export-ModuleMember -Function Write-DirectoryBuildProps
}
1 change: 1 addition & 0 deletions scripts/modules/Versioning.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ New-Module -ScriptBlock {
Write-VersionVsixManifest $version
Write-VersionSolutionInfo $version
Write-VersionAppVeyor $version
Write-DirectoryBuildProps $version
Push-Location $rootDirectory
New-Item -Type Directory -ErrorAction SilentlyContinue build | out-null
Set-Content build\version $version
Expand Down
83 changes: 5 additions & 78 deletions src/CredentialManagement/CredentialManagement.csproj
Original file line number Diff line number Diff line change
@@ -1,85 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{41A47C5B-C606-45B4-B83C-22B9239E4DA0}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CredentialManagement</RootNamespace>
<AssemblyName>GitHub.CredentialManagement</AssemblyName>
<LangVersion>7.3</LangVersion>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<CodeAnalysisRuleSet>..\common\GitHubVS.ruleset</CodeAnalysisRuleSet>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<CodeAnalysisIgnoreGeneratedCode>true</CodeAnalysisIgnoreGeneratedCode>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<RunCodeAnalysis>false</RunCodeAnalysis>
<OutputPath>bin\Debug\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugCodeAnalysis|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>CODE_ANALYSIS;DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<RunCodeAnalysis>true</RunCodeAnalysis>
<OutputPath>bin\Debug\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<RunCodeAnalysis>true</RunCodeAnalysis>
<OutputPath>bin\Release\</OutputPath>
<TargetFramework>net461</TargetFramework>
</PropertyGroup>
<Import Project="$(SolutionDir)\src\common\signing.props" />
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\common\SolutionInfo.cs">
<Link>Properties\SolutionInfo.cs</Link>
</Compile>
<Compile Include="Credential.cs" />
<Compile Include="CredentialSet.cs" />
<Compile Include="CredentialType.cs" />
<Compile Include="NativeMethods.cs" />
<Compile Include="PersistenceType.cs" />
<Compile Include="SecureStringHelper.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.6.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\GitHub.Extensions\GitHub.Extensions.csproj">
<Project>{6afe2e2d-6db0-4430-a2ea-f5f5388d2f78}</Project>
<Name>GitHub.Extensions</Name>
</ProjectReference>
<ProjectReference Include="..\GitHub.Extensions\GitHub.Extensions.csproj" />
</ItemGroup>
<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>
</Project>
6 changes: 0 additions & 6 deletions src/CredentialManagement/Properties/AssemblyInfo.cs

This file was deleted.

141 changes: 21 additions & 120 deletions src/GitHub.Api/GitHub.Api.csproj
Original file line number Diff line number Diff line change
@@ -1,132 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{B389ADAF-62CC-486E-85B4-2D8B078DF763}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>GitHub.Api</RootNamespace>
<AssemblyName>GitHub.Api</AssemblyName>
<LangVersion>7.3</LangVersion>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<CodeAnalysisRuleSet>..\common\GitHubVS.ruleset</CodeAnalysisRuleSet>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<CodeAnalysisIgnoreGeneratedCode>true</CodeAnalysisIgnoreGeneratedCode>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<RunCodeAnalysis>false</RunCodeAnalysis>
<OutputPath>bin\Debug\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugCodeAnalysis|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>CODE_ANALYSIS;DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<RunCodeAnalysis>true</RunCodeAnalysis>
<OutputPath>bin\Debug\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<RunCodeAnalysis>true</RunCodeAnalysis>
<OutputPath>bin\Release\</OutputPath>
<TargetFramework>net461</TargetFramework>
</PropertyGroup>

<Import Project="$(SolutionDir)\src\common\signing.props" />
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="Octokit.GraphQL, Version=0.1.1.0, Culture=neutral, PublicKeyToken=0be8860aee462442, processorArchitecture=MSIL">
<HintPath>..\..\packages\Octokit.GraphQL.0.1.1-beta\lib\netstandard1.1\Octokit.GraphQL.dll</HintPath>
</Reference>
<Reference Include="Octokit.GraphQL.Core, Version=0.1.1.0, Culture=neutral, PublicKeyToken=0be8860aee462442, processorArchitecture=MSIL">
<HintPath>..\..\packages\Octokit.GraphQL.0.1.1-beta\lib\netstandard1.1\Octokit.GraphQL.Core.dll</HintPath>
</Reference>
<Reference Include="Serilog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
<HintPath>..\..\packages\Serilog.2.5.0\lib\net46\Serilog.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Core" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="ApiClientConfiguration.cs" />
<Compile Include="..\..\script\src\ApiClientConfiguration_User.cs" Condition="$(Buildtype) == 'Internal'">

<ItemGroup Condition="$(Buildtype) == 'Internal'">
<Compile Remove="ApiClientConfiguration_User.cs" />
<Compile Include="..\..\script\src\ApiClientConfiguration_User.cs">
<Link>ApiClientConfiguration_User.cs</Link>
</Compile>
<Compile Include="ApiClientConfiguration_User.cs" Condition="$(Buildtype) != 'Internal'" />
<Compile Include="GraphQLKeychainCredentialStore.cs" />
<Compile Include="IGraphQLClientFactory.cs" />
<Compile Include="GraphQLClientFactory.cs" />
<Compile Include="IKeychain.cs" />
<Compile Include="ILoginManager.cs" />
<Compile Include="IOAuthCallbackListener.cs" />
<Compile Include="IncorrectScopesException.cs" />
<Compile Include="ITwoFactorChallengeHandler.cs" />
<Compile Include="LoginManager.cs" />
<Compile Include="KeychainCredentialStore.cs" />
<Compile Include="WindowsKeychain.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="..\common\SolutionInfo.cs">
<Link>Properties\SolutionInfo.cs</Link>
</Compile>
</ItemGroup>

<ItemGroup>
<Compile Include="SimpleApiClient.cs" />
<Compile Include="SimpleApiClientFactory.cs" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Net.Http" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\submodules\octokit.net\Octokit\Octokit.csproj">
<Project>{08dd4305-7787-4823-a53f-4d0f725a07f3}</Project>
<Name>Octokit</Name>
</ProjectReference>
<ProjectReference Include="..\CredentialManagement\CredentialManagement.csproj">
<Project>{41a47c5b-c606-45b4-b83c-22b9239e4da0}</Project>
<Name>CredentialManagement</Name>
</ProjectReference>
<ProjectReference Include="..\GitHub.Exports\GitHub.Exports.csproj">
<Project>{9aea02db-02b5-409c-b0ca-115d05331a6b}</Project>
<Name>GitHub.Exports</Name>
</ProjectReference>
<ProjectReference Include="..\GitHub.Extensions\GitHub.Extensions.csproj">
<Project>{6afe2e2d-6db0-4430-a2ea-f5f5388d2f78}</Project>
<Name>GitHub.Extensions</Name>
</ProjectReference>
<ProjectReference Include="..\GitHub.Logging\GitHub.Logging.csproj">
<Project>{8d73575a-a89f-47cc-b153-b47dd06837f0}</Project>
<Name>GitHub.Logging</Name>
</ProjectReference>
<ProjectReference Include="..\..\submodules\octokit.net\Octokit\Octokit.csproj" />
<ProjectReference Include="..\CredentialManagement\CredentialManagement.csproj" />
<ProjectReference Include="..\GitHub.Exports\GitHub.Exports.csproj" />
<ProjectReference Include="..\GitHub.Extensions\GitHub.Extensions.csproj" />
<ProjectReference Include="..\GitHub.Logging\GitHub.Logging.csproj" />
</ItemGroup>

<ItemGroup>
<None Include="packages.config" />
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.6.1" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="Octokit.GraphQL" Version="0.1.1-beta" />
</ItemGroup>
<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>
</Project>
6 changes: 0 additions & 6 deletions src/GitHub.Api/Properties/AssemblyInfo.cs

This file was deleted.

6 changes: 0 additions & 6 deletions src/GitHub.Api/packages.config

This file was deleted.

Loading

0 comments on commit 4eef5b3

Please sign in to comment.