Skip to content

Commit c336bcf

Browse files
committed
all code ported to .NET 4.0
separate nuspec file for .Net 3.5 change Rake script to call CLR4 version of MSpec
2 parents 7a2c7bf + de8fd45 commit c336bcf

37 files changed

+118
-308
lines changed

.svn-authors

Lines changed: 0 additions & 11 deletions
This file was deleted.

RakeFile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ require 'fileutils'
22
require 'albacore'
33
require './tools/albacore/nuspec_patch'
44

5-
NH_VERSION = '3.x'
5+
NH_VERSION = '4.x'
66

77
module Platform
88

@@ -27,10 +27,10 @@ module Platform
2727
end
2828

2929
def get_version
30-
ENV['BUILD_NUMBER'] || '1.3.0.0'
30+
ENV['BUILD_NUMBER'] || '1.4.0.0'
3131
end
3232

33-
task :default => 'build:all'
33+
task :default => ['ripple', 'build:all']
3434

3535
namespace :ci do
3636
task :run_ci_build => [
@@ -40,7 +40,7 @@ namespace :ci do
4040
]
4141
end
4242

43-
namespace :ripple do
43+
task :ripple do
4444
ripple = Platform.runtime("buildsupport/ripple.exe")
4545
args = "restore"
4646
sh "#{ripple} #{args}"
@@ -56,7 +56,6 @@ namespace :source do
5656
asm.product_name = 'FluentNHibernate'
5757
asm.copyright = "Copyright 2008-#{Time.new.year} James Gregory and contributors (Paul Batum, Hudson Akridge et al). All rights reserved."
5858
asm.namespaces = ['System.Security']
59-
asm.custom_attributes :AllowPartiallyTrustedCallers => nil
6059

6160
puts "The build number is #{asm.version}"
6261
end
@@ -89,7 +88,7 @@ namespace :specs do
8988

9089
desc 'Run MSpec specs'
9190
mspec :mspec do |mspec|
92-
mspec.command = 'src/packages/Machine.Specifications.0.5.15/tools/mspec.exe'
91+
mspec.command = 'src/packages/Machine.Specifications.0.5.15/tools/mspec-clr4.exe'
9392
mspec.assemblies 'src/FluentNHibernate.Specs/bin/Release/FluentNHibernate.Specs.dll'
9493
end
9594

src/CommonAssemblyInfo.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@
33
using System.Runtime.InteropServices;
44
[assembly: AssemblyCompany("http://fluentnhibernate.org")]
55
[assembly: AssemblyProduct("FluentNHibernate")]
6-
[assembly: AssemblyCopyright("Copyright 2008-2013 James Gregory and contributors (Paul Batum, Hudson Akridge et al). All rights reserved.")]
7-
8-
[assembly: AllowPartiallyTrustedCallers()]
6+
[assembly: AssemblyCopyright("Copyright 2008-2014 James Gregory and contributors (Paul Batum, Hudson Akridge et al). All rights reserved.")]
7+
[assembly: AssemblyVersion("1.4.0.0")]

src/Examples.FirstAutomappedProject/Examples.FirstAutomappedProject.csproj

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<AppDesignerFolder>Properties</AppDesignerFolder>
1111
<RootNamespace>Examples.FirstAutomappedProject</RootNamespace>
1212
<AssemblyName>Examples.FirstAutomappedProject</AssemblyName>
13-
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
13+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
1414
<FileAlignment>512</FileAlignment>
1515
<StartupObject>Examples.FirstAutomappedProject.Program</StartupObject>
1616
<FileUpgradeFlags></FileUpgradeFlags>
@@ -31,6 +31,7 @@
3131
<IsWebBootstrapper>false</IsWebBootstrapper>
3232
<UseApplicationTrust>false</UseApplicationTrust>
3333
<BootstrapperEnabled>true</BootstrapperEnabled>
34+
<TargetFrameworkProfile />
3435
</PropertyGroup>
3536
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
3637
<DebugSymbols>true</DebugSymbols>
@@ -72,18 +73,15 @@
7273
</PropertyGroup>
7374
<ItemGroup>
7475
<Reference Include="NHibernate">
75-
<HintPath>..\packages\NHibernate.3.3.3.4001\lib\Net35\NHibernate.dll</HintPath>
76-
</Reference>
77-
<Reference Include="Iesi.Collections, Version=1.0.1.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
78-
<HintPath>..\packages\Iesi.Collections.3.2.0.4000\lib\Net35\Iesi.Collections.dll</HintPath>
76+
<HintPath>..\packages\NHibernate.4.0.0.4000\lib\net40\NHibernate.dll</HintPath>
7977
</Reference>
8078
<Reference Include="System" />
8179
<Reference Include="System.Core">
8280
<RequiredTargetFramework>3.5</RequiredTargetFramework>
8381
</Reference>
8482
<Reference Include="System.Data" />
8583
<Reference Include="System.Data.SQLite, Version=1.0.66.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=x86">
86-
<HintPath>..\packages\System.Data.SQLite.1.0.66.1\lib\System.Data.SQLite.DLL</HintPath>
84+
<HintPath>..\packages\System.Data.SQLite.1.0.66.1\lib\System.Data.SQLite.dll</HintPath>
8785
</Reference>
8886
</ItemGroup>
8987
<ItemGroup>
@@ -96,12 +94,6 @@
9694
<Compile Include="Program.cs" />
9795
<Compile Include="Properties\AssemblyInfo.cs" />
9896
</ItemGroup>
99-
<ItemGroup>
100-
<ProjectReference Include="..\FluentNHibernate\FluentNHibernate.csproj">
101-
<Project>{529145D5-6CC3-4016-89B5-826563024AF1}</Project>
102-
<Name>FluentNHibernate</Name>
103-
</ProjectReference>
104-
</ItemGroup>
10597
<ItemGroup>
10698
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
10799
<Visible>False</Visible>
@@ -119,9 +111,15 @@
119111
<Install>true</Install>
120112
</BootstrapperPackage>
121113
</ItemGroup>
114+
<ItemGroup>
115+
<ProjectReference Include="..\FluentNHibernate\FluentNHibernate.csproj">
116+
<Project>{529145d5-6cc3-4016-89b5-826563024af1}</Project>
117+
<Name>FluentNHibernate</Name>
118+
</ProjectReference>
119+
</ItemGroup>
122120
<ItemGroup>
123121
<None Include="app.config" />
124-
<None Include="packages.config">
122+
<None Include="packages.config">
125123
<SubType>Designer</SubType>
126124
</None>
127125
</ItemGroup>
Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0"?>
22
<configuration>
3-
<connectionStrings>
4-
<add name="Sqlite_InMemory" providerName="System.Data.SQLite" connectionString="Data Source=:memory:;Version=3;New=True" />
5-
</connectionStrings>
6-
<system.data>
7-
<DbProviderFactories>
8-
<remove invariant="System.Data.SQLite" />
9-
<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
10-
</DbProviderFactories>
11-
</system.data>
12-
<startup useLegacyV2RuntimeActivationPolicy="true">
13-
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
14-
</startup>
15-
</configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
5+
</startup>
6+
</configuration>
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Iesi.Collections" version="3.2.0.4000" targetFramework="net35" allowedVersions="[3,4)"/>
4-
<package id="NHibernate" version="3.3.3.4001" targetFramework="net35" allowedVersions="[3,4)"/>
5-
<package id="System.Data.SQLite" version="1.0.66.1" targetFramework="net35" />
3+
<package id="NHibernate" version="4.0.0.4000" targetFramework="net40" allowedVersions="[4,)"/>
4+
<package id="System.Data.SQLite" version="1.0.66.1" targetFramework="net40" />
65
</packages>

src/Examples.FirstProject/Examples.FirstProject.csproj

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<AppDesignerFolder>Properties</AppDesignerFolder>
1111
<RootNamespace>Examples.FirstProject</RootNamespace>
1212
<AssemblyName>Examples.FirstProject</AssemblyName>
13-
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
13+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
1414
<FileAlignment>512</FileAlignment>
1515
<StartupObject>Examples.FirstProject.Program</StartupObject>
1616
<FileUpgradeFlags></FileUpgradeFlags>
@@ -31,6 +31,7 @@
3131
<IsWebBootstrapper>false</IsWebBootstrapper>
3232
<UseApplicationTrust>false</UseApplicationTrust>
3333
<BootstrapperEnabled>true</BootstrapperEnabled>
34+
<TargetFrameworkProfile />
3435
</PropertyGroup>
3536
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
3637
<DebugSymbols>true</DebugSymbols>
@@ -71,19 +72,16 @@
7172
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
7273
</PropertyGroup>
7374
<ItemGroup>
74-
<Reference Include="NHibernate">
75-
<HintPath>..\packages\NHibernate.3.3.3.4001\lib\Net35\NHibernate.dll</HintPath>
76-
</Reference>
77-
<Reference Include="Iesi.Collections, Version=1.0.1.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
78-
<HintPath>..\packages\Iesi.Collections.3.2.0.4000\lib\Net35\Iesi.Collections.dll</HintPath>
75+
<Reference Include="NHibernate">
76+
<HintPath>..\packages\NHibernate.4.0.0.4000\lib\net40\NHibernate.dll</HintPath>
7977
</Reference>
8078
<Reference Include="System" />
8179
<Reference Include="System.Core">
8280
<RequiredTargetFramework>3.5</RequiredTargetFramework>
8381
</Reference>
8482
<Reference Include="System.Data" />
85-
<Reference Include="System.Data.SQLite, Version=1.0.66.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=x86">
86-
<HintPath>..\packages\System.Data.SQLite.1.0.66.1\lib\System.Data.SQLite.DLL</HintPath>
83+
<Reference Include="System.Data.SQLite, Version=1.0.66.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=x86">
84+
<HintPath>..\packages\System.Data.SQLite.1.0.66.1\lib\System.Data.SQLite.dll</HintPath>
8785
</Reference>
8886
</ItemGroup>
8987
<ItemGroup>
@@ -134,7 +132,9 @@
134132
</ItemGroup>
135133
<ItemGroup>
136134
<None Include="app.config" />
137-
<None Include="packages.config" />
135+
<None Include="packages.config">
136+
<SubType>Designer</SubType>
137+
</None>
138138
</ItemGroup>
139139
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
140140
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.

src/Examples.FirstProject/app.config

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0"?>
22
<configuration>
3-
<connectionStrings>
4-
<add name="Sqlite_InMemory" providerName="System.Data.SQLite" connectionString="Data Source=:memory:;Version=3;New=True" />
5-
</connectionStrings>
6-
<system.data>
7-
<DbProviderFactories>
8-
<remove invariant="System.Data.SQLite" />
9-
<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
10-
</DbProviderFactories>
11-
</system.data>
12-
<startup useLegacyV2RuntimeActivationPolicy="true">
13-
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
14-
</startup>
15-
</configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
5+
</startup>
6+
</configuration>
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Iesi.Collections" version="3.2.0.4000" targetFramework="net35" allowedVersions="[3,4)"/>
4-
<package id="NHibernate" version="3.3.3.4001" targetFramework="net35" allowedVersions="[3,4)"/>
5-
<package id="System.Data.SQLite" version="1.0.66.1" targetFramework="net35" />
3+
<package id="NHibernate" version="4.0.0.4000" targetFramework="net40" allowedVersions="[4,)"/>
4+
<package id="System.Data.SQLite" version="1.0.66.1" targetFramework="net40" />
65
</packages>

src/FluentNHibernate.Net35.nuspec

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0"?>
2+
<package xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
3+
<metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
4+
<id>FluentNHibernate.Net35</id>
5+
<version>1.4.0.0</version>
6+
<authors>James Gregory and contributors</authors>
7+
<owners>jagregory, chester89</owners>
8+
<licenseUrl>http://github.com/jagregory/fluent-nhibernate/blob/master/LICENSE.txt</licenseUrl>
9+
<projectUrl>http://github.com/jagregory/fluent-nhibernate/</projectUrl>
10+
<dependencies>
11+
<dependency id="NHibernate" version="[3.3.1.4000,4)" />
12+
</dependencies>
13+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
14+
<description>Fluent, XML-less, compile safe, automated, convention-based mappings for NHibernate.</description>
15+
<summary>Fluent NHibernate provides a conventient way to configure NHibernate - no XML involved.</summary>
16+
<tags>orm dal nhibernate conventions</tags>
17+
<language>en-US</language>
18+
</metadata>
19+
<files>
20+
<file src="..\src\FluentNHibernate\bin\Release\FluentNHibernate.*" target="lib\net35" />
21+
</files>
22+
</package>

0 commit comments

Comments
 (0)