Skip to content

Commit

Permalink
add .net 4 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Eonasdan committed Aug 6, 2015
1 parent e29b104 commit 83444d1
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 36 deletions.
9 changes: 6 additions & 3 deletions .nuget/MomentSharp.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@
</references>
</metadata>
<files>
<file src="..\build\bin\MomentSharp.dll" target="lib\net45" />
<file src="..\build\bin\MomentSharp.xml" target="lib\net45" />
<file src="..\build\bin\MomentSharp.pdb" target="lib\net45" />
<file src="..\build\bin-Net45\MomentSharp.dll" target="lib\net45" />
<file src="..\build\bin-Net45\MomentSharp.xml" target="lib\net45" />
<file src="..\build\bin-Net45\MomentSharp.pdb" target="lib\net45" />
<file src="..\build\bin-Net40\MomentSharp.dll" target="lib\net40" />
<file src="..\build\bin-Net40\MomentSharp.xml" target="lib\net40" />
<file src="..\build\bin-Net40\MomentSharp.pdb" target="lib\net40" />
</files>
</package>
24 changes: 22 additions & 2 deletions MomentSharp.Tests/MomentSharp.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,39 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>bin\Debug-Net45\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<OutputPath>bin\Release-Net45\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug-Net40|AnyCPU'">
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug-Net40\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release-Net40|AnyCPU'">
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<OutputPath>bin\Release-Net40\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
</ItemGroup>
Expand Down
26 changes: 12 additions & 14 deletions MomentSharp.sln
Original file line number Diff line number Diff line change
@@ -1,38 +1,36 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
# Visual Studio 14
VisualStudioVersion = 14.0.23107.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MomentSharp", "MomentSharp\MomentSharp.csproj", "{7DF82747-DF0D-4969-91FF-30D5F8FEB7FD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MomentSharp.Tests", "MomentSharp.Tests\MomentSharp.Tests.csproj", "{0BCFE0D9-F655-4D1B-A8F5-9D4C3732DB10}"
EndProject
Global
GlobalSection(TeamFoundationVersionControl) = preSolution
SccNumberOfProjects = 3
SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
SccTeamFoundationServer = https://paladincloudware.visualstudio.com/defaultcollection
SccProjectUniqueName0 = MomentSharp\\MomentSharp.csproj
SccProjectName0 = MomentSharp
SccLocalPath0 = MomentSharp
SccLocalPath1 = .
SccProjectUniqueName2 = MomentSharp.Tests\\MomentSharp.Tests.csproj
SccProjectName2 = MomentSharp.Tests
SccLocalPath2 = MomentSharp.Tests
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug-Net40|Any CPU = Debug-Net40|Any CPU
Release|Any CPU = Release|Any CPU
Release-Net40|Any CPU = Release-Net40|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7DF82747-DF0D-4969-91FF-30D5F8FEB7FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7DF82747-DF0D-4969-91FF-30D5F8FEB7FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7DF82747-DF0D-4969-91FF-30D5F8FEB7FD}.Debug-Net40|Any CPU.ActiveCfg = Debug-Net40|Any CPU
{7DF82747-DF0D-4969-91FF-30D5F8FEB7FD}.Debug-Net40|Any CPU.Build.0 = Debug-Net40|Any CPU
{7DF82747-DF0D-4969-91FF-30D5F8FEB7FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7DF82747-DF0D-4969-91FF-30D5F8FEB7FD}.Release|Any CPU.Build.0 = Release|Any CPU
{7DF82747-DF0D-4969-91FF-30D5F8FEB7FD}.Release-Net40|Any CPU.ActiveCfg = Release-Net40|Any CPU
{7DF82747-DF0D-4969-91FF-30D5F8FEB7FD}.Release-Net40|Any CPU.Build.0 = Release-Net40|Any CPU
{0BCFE0D9-F655-4D1B-A8F5-9D4C3732DB10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0BCFE0D9-F655-4D1B-A8F5-9D4C3732DB10}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0BCFE0D9-F655-4D1B-A8F5-9D4C3732DB10}.Debug-Net40|Any CPU.ActiveCfg = Debug-Net40|Any CPU
{0BCFE0D9-F655-4D1B-A8F5-9D4C3732DB10}.Debug-Net40|Any CPU.Build.0 = Debug-Net40|Any CPU
{0BCFE0D9-F655-4D1B-A8F5-9D4C3732DB10}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0BCFE0D9-F655-4D1B-A8F5-9D4C3732DB10}.Release|Any CPU.Build.0 = Release|Any CPU
{0BCFE0D9-F655-4D1B-A8F5-9D4C3732DB10}.Release-Net40|Any CPU.ActiveCfg = Release-Net40|Any CPU
{0BCFE0D9-F655-4D1B-A8F5-9D4C3732DB10}.Release-Net40|Any CPU.Build.0 = Release-Net40|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
30 changes: 26 additions & 4 deletions MomentSharp/MomentSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,42 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>bin\Debug-Net45\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Debug\MomentSharp.xml</DocumentationFile>
<DocumentationFile>bin\Debug-Net45\MomentSharp.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<OutputPath>bin\Release-Net45\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Release\MomentSharp.xml</DocumentationFile>
<DocumentationFile>bin\Release-Net45\MomentSharp.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug-Net40|AnyCPU'">
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug-Net40\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DocumentationFile>bin\Debug-Net40\MomentSharp.xml</DocumentationFile>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release-Net40|AnyCPU'">
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<OutputPath>bin\Release-Net40\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<DocumentationFile>bin\Release-Net40\MomentSharp.xml</DocumentationFile>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
Expand Down
4 changes: 2 additions & 2 deletions MomentSharp/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("1.0.5634.26393")]
[assembly: AssemblyFileVersion("1.0.5634.26393")]
[assembly: AssemblyVersion("1.0.5695.38445")]
[assembly: AssemblyFileVersion("1.0.5695.38445")]
36 changes: 25 additions & 11 deletions scripts/Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,26 @@ if (!(Test-Path $destination -PathType Container)){
New-Item $destination -ItemType Directory | Out-Null
}

if (Test-Path $destination\bin -PathType Container){
Remove-Item $destination\bin -Recurse -Force
Remove-Item $destination\tests -Recurse -Force
if (Test-Path $destination\bin-Net40 -PathType Container){
Remove-Item $destination\bin-Net40 -Recurse -Force
Remove-Item $destination\tests-Net40 -Recurse -Force
}

New-Item $destination\bin -ItemType Directory | Out-Null
New-Item $destination\tests -ItemType Directory | Out-Null
New-Item $destination\bin-Net40 -ItemType Directory | Out-Null
New-Item $destination\tests-Net40 -ItemType Directory | Out-Null

if (!(Test-Path $nugetDestination -PathType Container)){
New-Item $nugetDestination -ItemType Directory | Out-Null
}

if (Test-Path $destination\bin-Net45 -PathType Container){
Remove-Item $destination\bin-Net45 -Recurse -Force
Remove-Item $destination\tests-Net45 -Recurse -Force
}

New-Item $destination\bin-Net45 -ItemType Directory | Out-Null
New-Item $destination\tests-Net45 -ItemType Directory | Out-Null

$build = [Math]::Floor([DateTime]::UtcNow.Subtract([DateTime]::Parse("01/01/2000").Date).TotalDays)
$revision = [Math]::Floor([DateTime]::UtcNow.TimeOfDay.TotalSeconds / 2)

Expand All @@ -37,13 +45,19 @@ $msbuild = "C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe"

Set-Location $parent

Copy-Item MomentSharp\bin\$Configuration\MomentSharp.dll $destination\bin\
Copy-Item MomentSharp\bin\$Configuration\MomentSharp.xml $destination\bin\
Copy-Item MomentSharp\bin\$Configuration\MomentSharp.pdb $destination\bin\
Copy-Item MomentSharp.Tests\bin\$configuration\*.ps1 $destination\tests\
Copy-Item MomentSharp.Tests\bin\$configuration\*.dll $destination\tests\
Copy-Item MomentSharp\bin\$Configuration-Net45\MomentSharp.dll $destination\bin-Net45\
Copy-Item MomentSharp\bin\$Configuration-Net45\MomentSharp.xml $destination\bin-Net45\
Copy-Item MomentSharp\bin\$Configuration-Net45\MomentSharp.pdb $destination\bin-Net45\
Copy-Item MomentSharp\bin\$Configuration-Net40\MomentSharp.dll $destination\bin-Net40\
Copy-Item MomentSharp\bin\$Configuration-Net40\MomentSharp.xml $destination\bin-Net40\
Copy-Item MomentSharp\bin\$Configuration-Net40\MomentSharp.pdb $destination\bin-Net40\

Copy-Item MomentSharp.Tests\bin\$configuration-Net45\*.ps1 $destination\tests-Net45\
Copy-Item MomentSharp.Tests\bin\$configuration-Net45\*.dll $destination\tests-Net45\
Copy-Item MomentSharp.Tests\bin\$configuration-Net40\*.ps1 $destination\tests-Net40\
Copy-Item MomentSharp.Tests\bin\$configuration-Net40\*.dll $destination\tests-Net40\

$versionInfo = [System.Diagnostics.FileVersionInfo]::GetVersionInfo("$destination\bin\MomentSharp.dll")
$versionInfo = [System.Diagnostics.FileVersionInfo]::GetVersionInfo("$destination\bin-Net45\MomentSharp.dll")
$version = $versionInfo.FileVersion.ToString()

Set-Location $parent\.nuget
Expand Down

0 comments on commit 83444d1

Please sign in to comment.