Skip to content

Commit

Permalink
Merge pull request #88 from Haacked/update-framework-and-packages
Browse files Browse the repository at this point in the history
Update packages
  • Loading branch information
haacked authored Jun 29, 2018
2 parents fa2835a + 24ac395 commit effefe3
Show file tree
Hide file tree
Showing 12 changed files with 109 additions and 46 deletions.
9 changes: 7 additions & 2 deletions Build-Solution.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,10 @@ param(

$scriptPath = Split-Path $MyInvocation.MyCommand.Path
$projFile = join-path $scriptPath SeeGit.msbuild

& "$(get-content env:programfiles)\MSBuild\14.0\Bin\msbuild.exe" $projFile /t:$build /p:Configuration=$config /verbosity:$MSBuildVerbosity
$dotNetVersion = "4.0"
$regKey = "HKLM:\software\Microsoft\MSBuild\ToolsVersions\$dotNetVersion"
$regProperty = "MSBuildToolsPath"

$msbuildExe = join-path -path (Get-ItemProperty $regKey).$regProperty -childpath "msbuild.exe"

& $msbuildExe $projFile /t:$build /p:Configuration=$config /verbosity:$MSBuildVerbosity
4 changes: 2 additions & 2 deletions SeeGit.msbuild
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Configuration>Debug</Configuration>
</PropertyGroup>

<UsingTask AssemblyFile=".\packages\xunit.1.9.2\lib\net20\xunit.runner.msbuild.dll" TaskName="Xunit.Runner.MSBuild.xunit" />
<UsingTask AssemblyFile=".\xunit.runner.msbuild.2.3.1\build\net452\xunit.runner.msbuild.net452.dll" TaskName="Xunit.Runner.MSBuild.xunit" />

<Target Name="Clean">
<MSBuild Projects=".\SeeGit.sln" Targets="Clean" Properties="Configuration=$(Configuration)"/>
Expand All @@ -14,7 +14,7 @@
</Target>

<Target Name="RunUnitTests" DependsOnTargets="Build">
<xunit Assembly=".\UnitTests\bin\$(Configuration)\UnitTests.dll" Xml="UnitTests.results.xml" />
<xunit Assemblies=".\UnitTests\bin\$(Configuration)\UnitTests.dll" Xml="UnitTests.results.xml" />
</Target>

<Target Name="FullBuild" DependsOnTargets="RunUnitTests" />
Expand Down
2 changes: 1 addition & 1 deletion SeeGitApp/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
-->
<add key="SHALength" value="8"/>
</appSettings>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/></startup></configuration>
10 changes: 5 additions & 5 deletions SeeGitApp/Extensions/LibGit2Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ public static class LibGit2Extensions
public static BranchReference ToBranchReference(this LibGit2Sharp.Branch branch)
{
return new BranchReference
{
Name = branch.Name,
IsRemote = branch.IsRemote,
IsHead = branch.IsCurrentRepositoryHead
};
{
Name = branch.FriendlyName,
IsRemote = branch.IsRemote,
IsHead = branch.IsCurrentRepositoryHead
};
}
}
}
16 changes: 12 additions & 4 deletions SeeGitApp/SeeGitApp.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\LibGit2Sharp.0.21.0.176\build\net40\LibGit2Sharp.props" Condition="Exists('..\packages\LibGit2Sharp.0.21.0.176\build\net40\LibGit2Sharp.props')" />
<Import Project="..\packages\LibGit2Sharp.NativeBinaries.1.0.185\build\LibGit2Sharp.NativeBinaries.props" Condition="Exists('..\packages\LibGit2Sharp.NativeBinaries.1.0.185\build\LibGit2Sharp.NativeBinaries.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
Expand All @@ -11,7 +11,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SeeGit</RootNamespace>
<AssemblyName>SeeGit</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
Expand All @@ -20,6 +20,8 @@
<Utf8Output>true</Utf8Output>
<ExpressionBlendVersion>4.0.30816.0</ExpressionBlendVersion>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -50,8 +52,8 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\GraphSharp.1.1.0.0\lib\net40\GraphSharp.Controls.dll</HintPath>
</Reference>
<Reference Include="LibGit2Sharp, Version=0.21.0.176, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\LibGit2Sharp.0.21.0.176\lib\net40\LibGit2Sharp.dll</HintPath>
<Reference Include="LibGit2Sharp, Version=0.24.0.0, Culture=neutral, PublicKeyToken=7cbde695407f0333, processorArchitecture=MSIL">
<HintPath>..\packages\LibGit2Sharp.0.24.0\lib\net40\LibGit2Sharp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Expression.Interactions" />
Expand Down Expand Up @@ -187,4 +189,10 @@
<AppDesigner Include="Properties\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\LibGit2Sharp.NativeBinaries.1.0.185\build\LibGit2Sharp.NativeBinaries.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LibGit2Sharp.NativeBinaries.1.0.185\build\LibGit2Sharp.NativeBinaries.props'))" />
</Target>
</Project>
3 changes: 2 additions & 1 deletion SeeGitApp/packages.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="GraphSharp" version="1.1.0.0" targetFramework="net40-Client" />
<package id="LibGit2Sharp" version="0.21.0.176" targetFramework="net46" />
<package id="LibGit2Sharp" version="0.24.0" targetFramework="net462" />
<package id="LibGit2Sharp.NativeBinaries" version="1.0.185" targetFramework="net462" />
<package id="QuickGraph" version="3.6.61119.7" targetFramework="net40-Client" />
<package id="Rx_Experimental-Main" version="1.1.11111" requireReinstallation="true" />
<package id="Windows7APICodePack-Core" version="1.1.0.0" targetFramework="net40-Client" />
Expand Down
27 changes: 20 additions & 7 deletions UnitTests/App.config
Original file line number Diff line number Diff line change
@@ -1,28 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="TrueSetting" value="True"/>
<add key="ToBeRemovedSetting" value="nan"/>
<add key="TrueSetting" value="True" />
<add key="ToBeRemovedSetting" value="nan" />
<!--
Option: AdornerCommitMessageVisibility
Description: Sets the attached commit message visibility to Visible/Hidden/Hidden in Expanded.
Options: Visible / Hidden / ExpandedHidden
Default: "ExpandedHidden" (On)
-->
<add key="AdornerCommitMessageVisibility" value="ExpandedHidden"/>
<add key="AdornerCommitMessageVisibility" value="ExpandedHidden" />

<!--
Option: DescriptionInExpander
Description: Adds description in Expanded view.
Default: "False" (Off)
-->
<add key="DescriptionInExpander" value="False"/>
<add key="DescriptionInExpander" value="False" />

<!--
Option: SHALength
Description: SHA Length used in commit titles
Default: "8" (Short)
-->
<add key="SHALength" value="8"/>
<add key="SHALength" value="8" />
</appSettings>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" /></startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
4 changes: 2 additions & 2 deletions UnitTests/Models/BranchCollectionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public void AddsBranchToCollection()

branches.Merge(new SeeGit.BranchReference {Name = "foo"});

Assert.Equal(1, branches.Count);
Assert.Single(branches);
}

[Fact]
Expand All @@ -26,7 +26,7 @@ public void MergesBranchWithSameNameAsExistingGivingPrecedenceToNewerOne()

branches.Merge(new SeeGit.BranchReference {Name = "foo", IsCurrent = true, IsRemote = true, IsHead = true});

Assert.Equal(1, branches.Count);
Assert.Single(branches);
Assert.True(branches.First().IsCurrent);
}
}
Expand Down
6 changes: 3 additions & 3 deletions UnitTests/Models/CommitVertexTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ public void SetsProperties()
Assert.Equal("commit message", commit.Message);
Assert.NotNull(commit.Branches);
Assert.Equal(8, commit.ShaLength);
Assert.Equal(true, commit.AdornerMessageVisibility); // expanded is false -> true
Assert.Equal(false, commit.DescriptionShown);
Assert.True(commit.AdornerMessageVisibility); // expanded is false -> true
Assert.False(commit.DescriptionShown);
}
}

Expand Down Expand Up @@ -47,7 +47,7 @@ public void ReturnsFalseIfShasAreDifferent()
public void ReturnsFalseWhenComparedToNull()
{
var commit = new CommitVertex("sha", "message");
CommitVertex other = null;
const CommitVertex other = null;

Assert.False(commit.Equals(other));
Assert.False(object.Equals(commit, other));
Expand Down
4 changes: 2 additions & 2 deletions UnitTests/Models/SettingsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public void SetsProperties()
var settings = new Settings();

// Get From File Test
Assert.Equal(true, settings.GetSetting<bool>("TrueSetting", false));
Assert.True(settings.GetSetting<bool>("TrueSetting", false));

// Default Setting Test
Assert.Equal("default", settings.GetSetting("asdf", "default", true));
Expand All @@ -28,7 +28,7 @@ public void SetsProperties()
Assert.Equal("False", settings.GetSetting("mySetting", String.Empty));

// Remove Setting
string fileValue = settings.GetSetting("ToBeRemovedSetting", "xmlvalue");
var fileValue = settings.GetSetting("ToBeRemovedSetting", "xmlvalue");
settings.RemoveSetting("ToBeRemovedSetting");
Assert.NotEqual(fileValue, settings.GetSetting("ToBeRemovedSetting", "notthexml"));
settings.Save();
Expand Down
51 changes: 41 additions & 10 deletions UnitTests/UnitTests.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\xunit.runner.msbuild.2.3.1\build\net452\xunit.runner.msbuild.props" Condition="Exists('..\packages\xunit.runner.msbuild.2.3.1\build\net452\xunit.runner.msbuild.props')" />
<Import Project="..\packages\xunit.core.2.3.1\build\xunit.core.props" Condition="Exists('..\packages\xunit.core.2.3.1\build\xunit.core.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand All @@ -10,10 +12,12 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>UnitTests</RootNamespace>
<AssemblyName>UnitTests</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -37,6 +41,10 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Core.4.2.1\lib\net45\Castle.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="GraphSharp, Version=1.0.2.0, Culture=neutral, PublicKeyToken=f9c24778325a6b82, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\GraphSharp.1.1.0.0\lib\net40\GraphSharp.dll</HintPath>
Expand All @@ -45,8 +53,8 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\GraphSharp.1.1.0.0\lib\net40\GraphSharp.Controls.dll</HintPath>
</Reference>
<Reference Include="Moq, Version=4.2.1507.118, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<HintPath>..\packages\Moq.4.2.1507.0118\lib\net40\Moq.dll</HintPath>
<Reference Include="Moq, Version=4.8.0.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<HintPath>..\packages\Moq.4.8.1\lib\net45\Moq.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="QuickGraph, Version=3.6.61114.0, Culture=neutral, PublicKeyToken=f3fb40175eec2af3, processorArchitecture=MSIL">
Expand All @@ -63,7 +71,16 @@
<HintPath>..\packages\QuickGraph.3.6.61119.7\lib\net4\QuickGraph.Serialization.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Threading.Tasks.Extensions, Version=4.1.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.4.0\lib\portable-net45+win8+wp8+wpa81\System.Threading.Tasks.Extensions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.ValueTuple, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.4.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
Expand All @@ -73,19 +90,19 @@
<HintPath>..\packages\WPFExtensions.1.0.0\lib\WPFExtensions.dll</HintPath>
</Reference>
<Reference Include="xunit.abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll</HintPath>
<HintPath>..\packages\xunit.abstractions.2.0.1\lib\net35\xunit.abstractions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="xunit.assert, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\packages\xunit.assert.2.1.0\lib\dotnet\xunit.assert.dll</HintPath>
<Reference Include="xunit.assert, Version=2.3.1.3858, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\packages\xunit.assert.2.3.1\lib\netstandard1.1\xunit.assert.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="xunit.core, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll</HintPath>
<Reference Include="xunit.core, Version=2.3.1.3858, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\packages\xunit.extensibility.core.2.3.1\lib\netstandard1.1\xunit.core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="xunit.execution.desktop, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll</HintPath>
<Reference Include="xunit.execution.desktop, Version=2.3.1.3858, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\packages\xunit.extensibility.execution.2.3.1\lib\net452\xunit.execution.desktop.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
Expand All @@ -112,5 +129,19 @@
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<ItemGroup>
<Analyzer Include="..\packages\xunit.analyzers.0.8.0\analyzers\dotnet\cs\xunit.analyzers.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\xunit.core.2.3.1\build\xunit.core.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.core.2.3.1\build\xunit.core.props'))" />
<Error Condition="!Exists('..\packages\xunit.core.2.3.1\build\xunit.core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.core.2.3.1\build\xunit.core.targets'))" />
<Error Condition="!Exists('..\packages\xunit.runner.msbuild.2.3.1\build\net452\xunit.runner.msbuild.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.runner.msbuild.2.3.1\build\net452\xunit.runner.msbuild.props'))" />
<Error Condition="!Exists('..\packages\xunit.runner.msbuild.2.3.1\build\net452\xunit.runner.msbuild.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.runner.msbuild.2.3.1\build\net452\xunit.runner.msbuild.targets'))" />
</Target>
<Import Project="..\packages\xunit.core.2.3.1\build\xunit.core.targets" Condition="Exists('..\packages\xunit.core.2.3.1\build\xunit.core.targets')" />
<Import Project="..\packages\xunit.runner.msbuild.2.3.1\build\net452\xunit.runner.msbuild.targets" Condition="Exists('..\packages\xunit.runner.msbuild.2.3.1\build\net452\xunit.runner.msbuild.targets')" />
</Project>
Loading

0 comments on commit effefe3

Please sign in to comment.