Skip to content

Commit

Permalink
.Net 4.0 Cross Compile, Updated Dynamitey
Browse files Browse the repository at this point in the history
  • Loading branch information
jbtule committed Jun 7, 2013
1 parent 9f826d6 commit 368c0d7
Show file tree
Hide file tree
Showing 10 changed files with 125 additions and 18 deletions.
2 changes: 1 addition & 1 deletion FSharp.Dynamic/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ open System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the ‘*’ as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[<assembly: AssemblyVersion("1.3.3.0")>]
[<assembly: AssemblyVersion("1.4.2")>]
()
33 changes: 23 additions & 10 deletions FSharp.Dynamic/FSharp.Dynamic.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@
<RootNamespace>FSharp.Dynamic</RootNamespace>
<AssemblyName>FSharp.Dynamic</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<UseNet40 Condition=" '$(UseNet40)' == '' ">false</UseNet40>
<UseNet40 Condition=" $(OS) != 'Windows_NT' ">true</UseNet40>
<TargetFrameworkProfile Condition=" $(UseNet40) == false ">Profile47</TargetFrameworkProfile>
<Name>FSharp.Dynamic</Name>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
</PropertyGroup>
<PropertyGroup Condition="$(OS) == 'Windows_NT'">
<TargetFrameworkProfile>Profile47</TargetFrameworkProfile>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
Expand All @@ -37,31 +36,45 @@
<WarningLevel>3</WarningLevel>
<DocumentationFile>bin\Release\FSharp.Dynamic.XML</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" $(UseNet40) == true ">
<DocumentationFile>bin\Release.net40\FSharp.Dynamic.XML</DocumentationFile>
</PropertyGroup>
<PropertyGroup>
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.Portable.FSharp.Targets" Condition="$(OS) == 'Windows_NT'" />
<Import Project="$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets" Condition="$(OS) != 'Windows_NT' And Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets')" />

<Import Project="$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.Portable.FSharp.Targets" Condition=" $(UseNet40) == false " />
<Import Project="$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets" Condition="$(UseNet40) == true And Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets')" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" />
<ItemGroup>
<Compile Include="AssemblyInfo.fs" />
<Compile Include="Util.fs" />
<Compile Include="Dynamic.fs" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>

<ItemGroup Condition=" $(UseNet40) == true " >
<Reference Include="Dynamitey">
<HintPath>..\packages\Dynamitey.0.8.0.6\lib\portable-win+net45+sl40\Dynamitey.dll</HintPath>
<HintPath>..\packages\Dynamitey.1.0.2.0\lib\net40\Dynamitey.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FSharp.Core">
<Name>FSharp.Core</Name>
<AssemblyName>FSharp.Core.dll</AssemblyName>
<HintPath>$(MSBuildExtensionsPath32)\..\Reference Assemblies\Microsoft\FSharp\3.0\Runtime\v4.0\FSharp.Core.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup Condition=" $(UseNet40) == false ">
<Reference Include="FSharp.Core">
<Name>FSharp.Core</Name>
<AssemblyName>FSharp.Core.dll</AssemblyName>
<HintPath>$(MSBuildExtensionsPath32)\..\Reference Assemblies\Microsoft\FSharp\3.0\Runtime\.NETPortable\FSharp.Core.dll</HintPath>
</Reference>
<Reference Include="Dynamitey">
<HintPath>..\packages\Dynamitey.1.0.2.0\lib\portable-win+net45+sl40+wp80\Dynamitey.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup Condition="$(OS) != 'Windows_NT'">
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down
7 changes: 6 additions & 1 deletion FSharp.Dynamic/FSharp.Dynamic.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
<projectUrl>https://github.com/ekonbenefits/FSharp.Dynamic</projectUrl>
<!--<iconUrl>http://ICON_URL_HERE_OR_DELETE_THIS_LINE</iconUrl>-->
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<description>$description$</description>
<releaseNotes>PCL port.</releaseNotes>
<copyright>Copyright 2013</copyright>
<tags>fsharp dynamic dlr pcl</tags>
</metadata>
<files>
<file src="bin\Release.net40\FSharp.Dynamic.dll" target="lib\net40\FSharp.Dynamic.dll" />
<file src="bin\Release.net40\FSharp.Dynamic.pdb" target="lib\net40\FSharp.Dynamic.pdb" />
<file src="bin\Release.net40\FSharp.Dynamic.XML" target="lib\net40\FSharp.Dynamic.XML" />
</files>
</package>
2 changes: 1 addition & 1 deletion FSharp.Dynamic/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Dynamitey" version="0.8.0.6" targetFramework="portable-win+net45+sl50" />
<package id="Dynamitey" version="1.0.2.0" targetFramework="portable-win+net45+sl50" />
</packages>
6 changes: 4 additions & 2 deletions Tests/Tests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<RootNamespace>Tests</RootNamespace>
<AssemblyName>Tests</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<UseNet40 Condition=" '$(UseNet40)' == '' ">false</UseNet40>
<UseNet40 Condition=" $(OS) != 'Windows_NT' ">true</UseNet40>
<TargetFrameworkVersion Condition=" $(UseNet40) == true ">v4.0</TargetFrameworkVersion>
<Name>Tests</Name>
<TargetFrameworkProfile />
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
Expand All @@ -35,8 +38,7 @@
<DocumentationFile>bin\Release\Tests.XML</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="Dynamitey">
<HintPath>..\packages\Dynamitey.0.8.0.6\lib\portable-win+net45+sl40\Dynamitey.dll</HintPath>
<Reference Include="Dynamitey, Version=1.0.2.0, Culture=neutral, PublicKeyToken=cbf53ea3aeb972c6">
<Private>True</Private>
</Reference>
<Reference Include="FsUnit.NUnit">
Expand Down
2 changes: 1 addition & 1 deletion Tests/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Dynamitey" version="0.8.0.6" targetFramework="net45" />
<package id="Dynamitey" version="1.0.2.0" targetFramework="net45" />
<package id="FsUnit" version="1.2.1.0" targetFramework="net45" />
<package id="NUnit" version="2.6.2" targetFramework="net40" />
</packages>
17 changes: 17 additions & 0 deletions dist/build.proj
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SolName Condition=" '$(SolName)' == '' ">MySolution</SolName>
</PropertyGroup>
<ItemGroup>
<ProjectToBuild Include="..\$(SolName).sln">
<Properties>Configuration=Release;</Properties>
</ProjectToBuild>
<ProjectToBuild Include="..\$(SolName).sln">
<Properties>Configuration=Release;OutputPath=bin\Release.net40\;IntermediateOutputPath=obj\Release.net40\;UseNet40=true;</Properties>
</ProjectToBuild>
</ItemGroup>
<Target Name="Build">
<MSBuild Projects="@(ProjectToBuild)"/>
</Target>
</Project>
2 changes: 0 additions & 2 deletions dist/create-nuget.bat

This file was deleted.

47 changes: 47 additions & 0 deletions dist/create-nuget.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
try{

$solname = "FSharp.Dynamic"
$testname = "Tests"
$projectname = $solname
$projecttype ="fsproj"

#Build PCL and .NET version from one project using msbuild script
C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe build.proj /p:solname=$solname

if (!$?){
throw $error[0].Exception
}

#Download and configure Nunit test runner
..\.nuget\nuget.exe install NUnit.Runners -Version 2.6.2 -o ..\packages
Copy-Item nunit-console.exe.config ..\packages\NUnit.Runners.2.6.2\tools\

if (!$?){
throw $error[0].Exception
}

#Test .net 40
Echo "Testing Net40"
..\packages\NUnit.Runners.2.6.2\tools\nunit-console.exe /framework:net-4.0 /noxml /nodots /labels /stoponerror /exclude=Performance ..\$testname\bin\Release.net40\$testname.dll

if (!$?){
throw $error[0].Exception
}

#Test portable
Echo "Testing Portable"
..\packages\NUnit.Runners.2.6.2\tools\nunit-console.exe /framework:net-4.5 /noxml /nodots /labels /stoponerror /exclude=Performance ..\$testname\bin\Release\$testname.dll

if (!$?){
throw $error[0].Exception
}


}catch{
Echo "Build Failed"
exit
}

#if successful create nuget package
..\.nuget\nuget.exe pack ..\$projectname\$projectname.$projecttype -Properties Configuration=Release -Symbols
Echo "Nuget Success"
25 changes: 25 additions & 0 deletions dist/nunit-console.exe.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!--
The .NET 2.0 build of the console runner only
runs under .NET 2.0 or higher. The setting
useLegacyV2RuntimeActivationPolicy only applies
under .NET 4.0 and permits use of mixed mode
assemblies, which would otherwise not load
correctly.
-->
<startup useLegacyV2RuntimeActivationPolicy="true">
<!-- Comment out the next line to force use of .NET 4.0 -->
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<runtime>
<!-- Ensure that test exceptions don't crash NUnit -->
<legacyUnhandledExceptionPolicy enabled="1"/>
<!-- Run partial trust V2 assemblies in full trust under .NET 4.0 -->
<loadFromRemoteSources enabled="true"/>
<!-- Look for addins in the addins directory for now -->
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="lib;addins"/>
</assemblyBinding>
</runtime>
</configuration>

0 comments on commit 368c0d7

Please sign in to comment.