Skip to content

Commit 7b8c901

Browse files
author
Steve Strong
committed
Fixed TestDatabaseSetup.build file
SVN: trunk@4960
1 parent 1deed1c commit 7b8c901

File tree

3 files changed

+77
-11
lines changed

3 files changed

+77
-11
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6+
<ProductVersion>9.0.30729</ProductVersion>
7+
<SchemaVersion>2.0</SchemaVersion>
8+
<ProjectGuid>{BEEC1564-6FB6-49F7-BBE5-8EBD2F0F6E8A}</ProjectGuid>
9+
<OutputType>Library</OutputType>
10+
<AppDesignerFolder>Properties</AppDesignerFolder>
11+
<RootNamespace>NHibernate.TestDatabaseSetup</RootNamespace>
12+
<AssemblyName>NHibernate.TestDatabaseSetup</AssemblyName>
13+
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
14+
<FileAlignment>512</FileAlignment>
15+
<StartupObject>
16+
</StartupObject>
17+
</PropertyGroup>
18+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
19+
<DebugSymbols>true</DebugSymbols>
20+
<DebugType>full</DebugType>
21+
<Optimize>false</Optimize>
22+
<OutputPath>bin\Debug\</OutputPath>
23+
<DefineConstants>DEBUG;TRACE</DefineConstants>
24+
<ErrorReport>prompt</ErrorReport>
25+
<WarningLevel>4</WarningLevel>
26+
</PropertyGroup>
27+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
28+
<DebugType>pdbonly</DebugType>
29+
<Optimize>true</Optimize>
30+
<OutputPath>bin\Release\</OutputPath>
31+
<DefineConstants>TRACE</DefineConstants>
32+
<ErrorReport>prompt</ErrorReport>
33+
<WarningLevel>4</WarningLevel>
34+
</PropertyGroup>
35+
<ItemGroup>
36+
<Reference Include="nunit.framework, Version=2.5.0.9122, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
37+
<SpecificVersion>False</SpecificVersion>
38+
<HintPath>..\..\lib\net\3.5\nunit.framework.dll</HintPath>
39+
</Reference>
40+
<Reference Include="System" />
41+
<Reference Include="System.Core">
42+
<RequiredTargetFramework>3.5</RequiredTargetFramework>
43+
</Reference>
44+
<Reference Include="System.Data" />
45+
</ItemGroup>
46+
<ItemGroup>
47+
<Compile Include="TestDatabaseSetup.cs" />
48+
</ItemGroup>
49+
<ItemGroup>
50+
<None Include="App.config" />
51+
<None Include="TestDatabaseSetup.build" />
52+
</ItemGroup>
53+
<ItemGroup>
54+
<ProjectReference Include="..\NHibernate\NHibernate.csproj">
55+
<Project>{5909BFE7-93CF-4E5F-BE22-6293368AF01D}</Project>
56+
<Name>NHibernate</Name>
57+
</ProjectReference>
58+
</ItemGroup>
59+
<ItemGroup>
60+
<Folder Include="Properties\" />
61+
</ItemGroup>
62+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
63+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
64+
Other similar extension points exist, see Microsoft.Common.targets.
65+
<Target Name="BeforeBuild">
66+
</Target>
67+
<Target Name="AfterBuild">
68+
</Target>
69+
-->
70+
</Project>

src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.build

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" ?>
2-
<project name="NHibernate.Test" default="build" xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd">
2+
<project name="NHibernate.TestDatabaseSetup" default="build" xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd">
33
<property name="root.dir" value="../.." />
44
<property name="config.FileName" value="hibernate.cfg.xml" />
55
<include buildfile="${root.dir}/build-common/common-project.xml" />
@@ -14,15 +14,9 @@
1414
<include name="NHibernate.dll" />
1515
<include name="nunit.framework.dll" />
1616
</assemblyfileset>
17-
<resourcefileset id="project.resources" prefix="NHibernate.Test" dynamicprefix="true">
18-
<include name="**/*.xml" />
19-
<exclude name="bin/**/*.xml" />
20-
</resourcefileset>
2117
</target>
2218
<target name="generate-assemblyinfo" depends="init common.generate-assemblyinfo" />
2319
<target name="build" depends="init generate-assemblyinfo common.compile-tests">
24-
25-
2620
<if test="${file::exists(config.FileName)}">
2721
<copy file="hibernate.cfg.xml" tofile="${bin.dir}/hibernate.cfg.xml" />
2822
</if>

src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.cs

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
using System;
22
using NUnit.Framework;
3-
using Sql=System.Data.SqlClient;
3+
using System.Data.SqlClient;
44

5-
namespace NHibernate.TeamCity.TestDatabaseSetup
5+
namespace NHibernate.TestDatabaseSetup
66
{
77
[TestFixture]
88
public class DatabaseSetup
@@ -12,11 +12,11 @@ public void SetupDatabase()
1212
{
1313
var cfg = new Cfg.Configuration();
1414

15-
using (var conn = new Sql.SqlConnection(cfg.Properties["connection.connection_string"]))
15+
using (var conn = new SqlConnection(cfg.Properties["connection.connection_string"]))
1616
{
1717
conn.Open();
1818

19-
using (var cmd = new Sql.SqlCommand("use master", conn))
19+
using (var cmd = new System.Data.SqlClient.SqlCommand("use master", conn))
2020
{
2121
cmd.ExecuteNonQuery();
2222

@@ -37,3 +37,5 @@ public void SetupDatabase()
3737
}
3838
}
3939
}
40+
41+

0 commit comments

Comments
 (0)