Skip to content
Browse files

Fixed the build script and updated the Sample Application to the late…

…st build
  • Loading branch information...
1 parent c22cb93 commit 13558cdf267170d5511d7ad1bb6e89a94f092eea @shashankshetty shashankshetty committed
View
20 ExcelMapper.build
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<project name="XpertDoc" default="build" xmlns="http://nant.sf.net/schemas/nant.xsd">
+<project name="ExcelMapper" default="build" xmlns="http://nant.sf.net/schemas/nant.xsd">
<!-- PROPERTIES -->
<property name ="current.dir" value="${directory::get-current-directory()}" />
@@ -11,28 +11,24 @@
<!-- User targets -->
<target name="clean" description="Delete Automated Build artifacts">
<delete dir="${build.dir}" if="${directory::exists(build.dir)}"/>
+ <mkdir dir="${build.dir}" />
</target>
-
+
<target name="compile" depends="clean" description="Builds project">
- <echo message="Building project using MSBuild in 'Debug' mode"/>
<msbuild project="src\ExcelMapper.sln" target="Rebuild" verbosity="quiet">
<property name="Configuration" value="debug"/>
- <property name="Platform" value="x86"/>
<property name="SolutionDir" value=".." />
<arg value="/nologo"/>
</msbuild>
-
- <mkdir dir="${build.dir}" />
-
+
<echo message="Copying artifacts to build directory"/>
<copy todir="${build.dir}" overwrite="true">
<fileset basedir="src\RunTimeCodeGenerator\bin\Debug">
<include name="*.*" />
-
</fileset>
</copy>
<copy todir="${build.dir}" overwrite="true">
- <fileset basedir="src\ExcelMapper\bin\x86\Debug">
+ <fileset basedir="src\ExcelMapper\bin\Debug">
<include name="*.*" />
</fileset>
</copy>
@@ -49,7 +45,7 @@
</fileset>
</copy>
<copy todir="${build.dir}" overwrite="true">
- <fileset basedir="src\ExcelMapper.Tests\bin\x86\Debug">
+ <fileset basedir="src\ExcelMapper.Tests\bin\Debug">
<include name="*" />
<include name="**\*.*" />
</fileset>
@@ -59,8 +55,8 @@
<include name="*" />
<include name="**\*.*" />
</fileset>
- </copy>
- </target>
+ </copy>
+ </target>
<target name="test" depends="RunTimeCodeGeneratorTests, ExcelMapperTests, BuildDTOsFromExcel" />
View
2 src/RunTimeCodeGenerator.Tests/TestData.cs
@@ -5,6 +5,6 @@ public class TestData
public static string Directory = "TestDirectory";
public static string ClassWithProperties = "ClassGeneration\\ClassWithProperties.cs";
public static string ClassWithMethods = "ClassGeneration\\ClassWithMethods.cs";
- public static string LogFile = "RunTimCodeGeneratorLogs.log";
+ public static string LogFile = "RunTimeCodeGeneratorLogs.log";
}
}
View
2 src/RunTimeCodeGenerator/DefaultSettings.cs
@@ -2,6 +2,6 @@ namespace RunTimeCodeGenerator
{
public class DefaultSettings
{
- public static string LogFile = "RunTimCodeGeneratorLogs.log";
+ public static string LogFile = "RunTimeCodeGeneratorLogs.log";
}
}
View
23 src/RunTimeCodeGenerator/RunTimCodeGeneratorLoggingConfig.xml
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<log4net>
- <appender name="Console" type="log4net.Appender.ConsoleAppender">
- <layout type="log4net.Layout.PatternLayout">
- <conversionPattern value="%5level [%thread](%file:%line) - %message%newline" />
- </layout>
- </appender>
- <appender name="RollingFile" type="log4net.Appender.RollingFileAppender">
- <file value="Logs/RunTimeCodeGenerator.log" />
- <appendToFile value="true" />
- <maximumFileSize value="1000KB" />
- <maxSizeRollBackups value="10" />
- <layout type="log4net.Layout.PatternLayout">
- <conversionPattern value="%date %level %thread %logger - %message%newline" />
- </layout>
- </appender>
- <root>
- <level value="WARN" />
- <!-- OFF, FATAL, ERROR, WARN, INFO, DEBUG, ALL -->
- <appender-ref ref="Console" />
- <appender-ref ref="RollingFile" />
- </root>
-</log4net>
View
7 src/RunTimeCodeGenerator/RunTimeCodeGenerator.csproj
@@ -3,7 +3,7 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
+ <ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{641B6388-773E-48B1-B41C-DBD631512129}</ProjectGuid>
<OutputType>Library</OutputType>
@@ -77,11 +77,6 @@
<Compile Include="RunTimeCodeGeneratorRegistry.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
- <ItemGroup>
- <Content Include="RunTimCodeGeneratorLoggingConfig.xml">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
View
11 src/Samples/SampleApplicationUsingExcelMapper/SampleApplicationUsingExcelMapper/Program.cs
@@ -1,10 +1,7 @@
using System;
-
using ExcelMapper.Configuration;
using ExcelMapper.Repository;
-
-using ExcelToDTOMapper.DTO;
-
+using ExcelToDTOMapper.DTO.Users;
using Microsoft.Practices.ServiceLocation;
namespace SampleApplicationUsingExcelMapper
@@ -14,9 +11,11 @@ public class Program
public static void Main()
{
ExcelMapperServiceLocator.SetUp();
+ ServiceLocator.Current.GetInstance<IFileConfiguration>().FileName = "Excel\\Users.xlsx";
+
IRepository repository = ServiceLocator.Current.GetInstance<IRepository>();
-
- foreach (User user in repository.Get<User>("Excel\\Users.xlsx", "User"))
+
+ foreach (User user in repository.Get<User>("User"))
{
Console.WriteLine("Hello {0} {1}", user.FirstName, user.LastName);
}
View
BIN src/Samples/SampleApplicationUsingExcelMapper/lib/ExcelMapper.dll
Binary file not shown.
View
BIN src/Samples/SampleApplicationUsingExcelMapper/lib/ExcelToDTOMapper.DTO.dll
Binary file not shown.
View
BIN src/Samples/SampleApplicationUsingExcelMapper/lib/StructureMap.dll
Binary file not shown.

0 comments on commit 13558cd

Please sign in to comment.
Something went wrong with that request. Please try again.