Skip to content

Commit cc4a4fc

Browse files
committed
Switched to .NET 4.0 for wider range of systems compatibility
1 parent 7389462 commit cc4a4fc

6 files changed

Lines changed: 22 additions & 14 deletions

File tree

Src/ScreenGrid.Tests/ScreenGrid.Tests.csproj

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="..\packages\NUnit.3.10.1\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.10.1\build\NUnit.props')" />
34
<PropertyGroup>
45
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
56
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -10,9 +11,11 @@
1011
<AppDesignerFolder>Properties</AppDesignerFolder>
1112
<RootNamespace>ScreenGrid.Tests</RootNamespace>
1213
<AssemblyName>ScreenGrid.Tests</AssemblyName>
13-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
14+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
1415
<FileAlignment>512</FileAlignment>
1516
<TargetFrameworkProfile />
17+
<NuGetPackageImportStamp>
18+
</NuGetPackageImportStamp>
1619
</PropertyGroup>
1720
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1821
<DebugSymbols>true</DebugSymbols>
@@ -35,8 +38,8 @@
3538
<Prefer32Bit>false</Prefer32Bit>
3639
</PropertyGroup>
3740
<ItemGroup>
38-
<Reference Include="nunit.framework, Version=3.9.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
39-
<HintPath>..\packages\NUnit.3.9.0\lib\net45\nunit.framework.dll</HintPath>
41+
<Reference Include="nunit.framework, Version=3.10.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
42+
<HintPath>..\packages\NUnit.3.10.1\lib\net40\nunit.framework.dll</HintPath>
4043
</Reference>
4144
<Reference Include="System" />
4245
<Reference Include="System.Core" />
@@ -76,6 +79,12 @@
7679
<None Include="packages.config" />
7780
</ItemGroup>
7881
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
82+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
83+
<PropertyGroup>
84+
<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>
85+
</PropertyGroup>
86+
<Error Condition="!Exists('..\packages\NUnit.3.10.1\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.10.1\build\NUnit.props'))" />
87+
</Target>
7988
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
8089
Other similar extension points exist, see Microsoft.Common.targets.
8190
<Target Name="BeforeBuild">
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="NUnit" version="3.9.0" targetFramework="net45" />
3+
<package id="NUnit" version="3.10.1" targetFramework="net40" />
44
</packages>

Src/ScreenGrid/App.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
22
<configuration>
33
<startup>
4-
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
55
</startup>
66
</configuration>
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-

2-
namespace ScreenGrid.Models
1+
namespace ScreenGrid.Models
32
{
43
class GridTargetLocation
54
{
6-
public Models.Geometry.Point Offset { get; set; }
5+
public Geometry.Point Offset { get; set; }
76

8-
public Models.Geometry.Rectangle ImageBounds { get; set; }
7+
public Geometry.Rectangle ImageBounds { get; set; }
98
}
109
}

Src/ScreenGrid/Models/NativeWindowState.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
using System;
2-
using System.Globalization;
3-
4-
namespace ScreenGrid.Models
1+
namespace ScreenGrid.Models
52
{
3+
using System;
4+
using System.Globalization;
5+
66
/// <summary>
77
/// Anemic model
88
/// </summary>

Src/ScreenGrid/ScreenGrid.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<AppDesignerFolder>Properties</AppDesignerFolder>
1111
<RootNamespace>ScreenGrid</RootNamespace>
1212
<AssemblyName>ScreenGrid</AssemblyName>
13-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
1414
<TargetFrameworkProfile>
1515
</TargetFrameworkProfile>
1616
<FileAlignment>512</FileAlignment>

0 commit comments

Comments
 (0)