Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit ab89e59c authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

change method to obtain vecto version number: instead of reading out from dll,...

change method to obtain vecto version number: instead of reading out from dll, use (same) t4 macro to statically compile the version number as static property; slightly adapt build process to compile t4 macros
parent 24895ada
Branches
Tags
No related merge requests found
Showing
with 363 additions and 238 deletions
...@@ -53,13 +53,6 @@ ...@@ -53,13 +53,6 @@
<Exec Command="&quot;$(solutiondir)documentation\VectoHashingTool\convert.bat&quot;" WorkingDirectory="$(solutiondir)documentation\VectoHashingTool"/> <Exec Command="&quot;$(solutiondir)documentation\VectoHashingTool\convert.bat&quot;" WorkingDirectory="$(solutiondir)documentation\VectoHashingTool"/>
</Target> </Target>
<Target Name="BeforeBuild" Condition="$(Configuration) == 'Deploy' OR $(Configuration) == 'Release'">
<ItemGroup>
<VersionTemplates Include="$(SolutionDir)**\Version.tt"/>
</ItemGroup>
<Exec Command="&quot;%CommonProgramFiles(x86)%\Microsoft Shared\TextTemplating\12.0\TextTransform.exe&quot; &quot;%(VersionTemplates.Identity)&quot;"/>
</Target>
<Target Name="AfterBuild" Condition="$(Configuration) == 'Deploy'"> <Target Name="AfterBuild" Condition="$(Configuration) == 'Deploy'">
<ItemGroup> <ItemGroup>
<VectoCoreAssembly Include="$(OutputPath)VectoCore.dll" /> <VectoCoreAssembly Include="$(OutputPath)VectoCore.dll" />
......
<Project DefaultTargets = "Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" >
<Target Name="BeforeBuild" Condition="$(Configuration) == 'Deploy' OR $(Configuration) == 'Release'">
<ItemGroup>
<VersionTemplates Include="$(ProjectDir)**\Version.tt"/>
<VersionTemplates Include="$(ProjectDir)**\*.tt"/>
</ItemGroup>
<Exec Condition="'@(VersionTemplates)'!=''" Command="&quot;%CommonProgramFiles(x86)%\Microsoft Shared\TextTemplating\12.0\TextTransform.exe&quot; -I $(SolutionDir) &quot;%(VersionTemplates.Identity)&quot;"/>
</Target>
</Project>
\ No newline at end of file
...@@ -31,9 +31,10 @@ ...@@ -31,9 +31,10 @@
<#@ template language="C#" #> <#@ template language="C#" #>
<#@ output extension=".cs"#> <#@ output extension=".cs"#>
<#@ include file="../../VectoCore/VectoCore/VersionNumber.t4" once="true" #>
using System.Reflection; using System.Reflection;
[assembly: AssemblyVersion("0.1.0.<#= this.RevisionNumber #>")] [assembly: AssemblyVersion("0.1.0.<#= GetBuildNumber() #>")]
[assembly: AssemblyFileVersion("0.1.0.<#= this.RevisionNumber #>")] [assembly: AssemblyFileVersion("0.1.0.<#= GetBuildNumber() #>")]
<#+ <#+
int RevisionNumber = (int)(DateTime.UtcNow - new DateTime(2017, 1, 1)).TotalDays; int RevisionNumber = (int)(DateTime.UtcNow - new DateTime(2017, 1, 1)).TotalDays;
#> #>
\ No newline at end of file
...@@ -251,4 +251,5 @@ ...@@ -251,4 +251,5 @@
<Target Name="AfterBuild"> <Target Name="AfterBuild">
</Target> </Target>
--> -->
<Import Project="$(SolutionDir)Build\TextPreProcessing.targets" />
</Project> </Project>
\ No newline at end of file
...@@ -31,9 +31,10 @@ ...@@ -31,9 +31,10 @@
<#@ template language="C#" #> <#@ template language="C#" #>
<#@ output extension=".cs"#> <#@ output extension=".cs"#>
<#@ include file="../../VectoCore/VectoCore/VersionNumber.t4" once="true" #>
using System.Reflection; using System.Reflection;
[assembly: AssemblyVersion("0.1.0.<#= this.RevisionNumber #>")] [assembly: AssemblyVersion("0.1.0.<#= GetBuildNumber() #>")]
[assembly: AssemblyFileVersion("0.1.0.<#= this.RevisionNumber #>")] [assembly: AssemblyFileVersion("0.1.0.<#= GetBuildNumber() #>")]
<#+ <#+
int RevisionNumber = (int)(DateTime.UtcNow - new DateTime(2017, 1, 1)).TotalDays; int RevisionNumber = (int)(DateTime.UtcNow - new DateTime(2017, 1, 1)).TotalDays;
#> #>
\ No newline at end of file
...@@ -105,7 +105,7 @@ Public Class MainForm ...@@ -105,7 +105,7 @@ Public Class MainForm
Private Sub FB_Initialize() Private Sub FB_Initialize()
FileBrowserFolderHistoryIninialized = False FileBrowserFolderHistoryIninialized = False
Try Try
COREvers = Assembly.LoadFrom("VectoCore.dll").GetName().Version.ToString() COREvers = VectoSimulationCore.VersionNumber()
Catch ex As Exception Catch ex As Exception
LogFile.WriteToLog(MessageType.Err, ex.StackTrace) LogFile.WriteToLog(MessageType.Err, ex.StackTrace)
End Try End Try
......
...@@ -536,6 +536,7 @@ ...@@ -536,6 +536,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup /> <ItemGroup />
<Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent> <PostBuildEvent>
</PostBuildEvent> </PostBuildEvent>
...@@ -547,7 +548,6 @@ ...@@ -547,7 +548,6 @@
<Target Name="AfterBuild"> <Target Name="AfterBuild">
</Target> </Target>
--> -->
<Import Project="$(SolutionDir)Build\TextPreProcessing.targets" />
<Import Project="$(SolutionDir)Build\Packaging.targets" /> <Import Project="$(SolutionDir)Build\Packaging.targets" />
</Project> </Project>
\ No newline at end of file
...@@ -29,11 +29,8 @@ ...@@ -29,11 +29,8 @@
* Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology * Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology
*/ */
<#@ template language="C#" #>
<#@ output extension=".cs"#> <#@ output extension=".cs"#>
<#@ include file="../../../VectoCore/VectoCore/VersionNumber.t4" once="true" #>
using System.Reflection; using System.Reflection;
[assembly: AssemblyVersion("3.2.0.<#= this.RevisionNumber #>")] [assembly: AssemblyVersion("<#= GetVectoCoreVersionNumber() #>")]
[assembly: AssemblyFileVersion("3.2.0.<#= this.RevisionNumber #>")] [assembly: AssemblyFileVersion("<#= GetVectoCoreVersionNumber() #>")]
<#+ \ No newline at end of file
int RevisionNumber = (int)(DateTime.UtcNow - new DateTime(2015, 1, 1)).TotalDays;
#>
\ No newline at end of file
...@@ -31,9 +31,10 @@ ...@@ -31,9 +31,10 @@
<#@ template language="C#" #> <#@ template language="C#" #>
<#@ output extension=".cs"#> <#@ output extension=".cs"#>
<#@ include file="../../../VectoCore/VectoCore/VersionNumber.t4" once="true" #>
using System.Reflection; using System.Reflection;
[assembly: AssemblyVersion("1.2.0.<#= this.RevisionNumber #>")] [assembly: AssemblyVersion("1.2.0.<#= GetBuildNumber() #>")]
[assembly: AssemblyFileVersion("1.2.0.<#= this.RevisionNumber #>")] [assembly: AssemblyFileVersion("1.2.0.<#= GetBuildNumber() #>")]
<#+ <#+
int RevisionNumber = (int)(DateTime.UtcNow - new DateTime(2015, 1, 1)).TotalDays; int RevisionNumber = (int)(DateTime.UtcNow - new DateTime(2015, 1, 1)).TotalDays;
#> #>
\ No newline at end of file
...@@ -73,9 +73,7 @@ ...@@ -73,9 +73,7 @@
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" /> <Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>if $(ConfigurationName) == Release forfiles /p "$(ProjectDir)." /m "*.tt" /s /c "cmd /c echo Transforming @path &amp;&amp; \"%25CommonProgramFiles(x86)%25\Microsoft Shared\TextTemplating\12.0\TextTransform.exe\" @file"</PreBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- 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. Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild"> <Target Name="BeforeBuild">
...@@ -83,4 +81,5 @@ ...@@ -83,4 +81,5 @@
<Target Name="AfterBuild"> <Target Name="AfterBuild">
</Target> </Target>
--> -->
<Import Project="$(SolutionDir)Build\TextPreProcessing.targets" />
</Project> </Project>
\ No newline at end of file
...@@ -51,6 +51,7 @@ using TUGraz.VectoCore.InputData.FileIO.XML.Engineering; ...@@ -51,6 +51,7 @@ using TUGraz.VectoCore.InputData.FileIO.XML.Engineering;
using TUGraz.VectoCore.Models.Simulation.Impl; using TUGraz.VectoCore.Models.Simulation.Impl;
using TUGraz.VectoCore.OutputData; using TUGraz.VectoCore.OutputData;
using TUGraz.VectoCore.OutputData.FileIO; using TUGraz.VectoCore.OutputData.FileIO;
using TUGraz.VectoCore.Utils;
using LogManager = NLog.LogManager; using LogManager = NLog.LogManager;
namespace VectoConsole namespace VectoConsole
...@@ -350,8 +351,7 @@ Examples: ...@@ -350,8 +351,7 @@ Examples:
private static void ShowVersionInformation() private static void ShowVersionInformation()
{ {
WriteLine(string.Format(@"VectoConsole: {0}", Assembly.GetExecutingAssembly().GetName().Version)); WriteLine(string.Format(@"VectoConsole: {0}", Assembly.GetExecutingAssembly().GetName().Version));
WriteLine(string.Format(@"VectoCore: {0}", WriteLine(string.Format(@"VectoCore: {0}", VectoSimulationCore.VersionNumber));
Assembly.LoadFrom(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "VectoCore.dll")).GetName().Version));
} }
private static void PrintProgress(Dictionary<int, JobContainer.ProgressEntry> progessData, private static void PrintProgress(Dictionary<int, JobContainer.ProgressEntry> progessData,
......
...@@ -152,9 +152,7 @@ ...@@ -152,9 +152,7 @@
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" /> <Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>if $(ConfigurationName) == Release forfiles /p "$(ProjectDir)." /m "*.tt" /s /c "cmd /c echo Transforming @path &amp;&amp; \"%25CommonProgramFiles(x86)%25\Microsoft Shared\TextTemplating\12.0\TextTransform.exe\" @file"</PreBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- 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. Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild"> <Target Name="BeforeBuild">
...@@ -162,4 +160,5 @@ ...@@ -162,4 +160,5 @@
<Target Name="AfterBuild"> <Target Name="AfterBuild">
</Target> </Target>
--> -->
<Import Project="$(SolutionDir)Build\TextPreProcessing.targets" />
</Project> </Project>
\ No newline at end of file
...@@ -43,6 +43,7 @@ using TUGraz.VectoCommon.Utils; ...@@ -43,6 +43,7 @@ using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.Models.Declaration; using TUGraz.VectoCore.Models.Declaration;
using TUGraz.VectoCore.Models.Simulation.Data; using TUGraz.VectoCore.Models.Simulation.Data;
using TUGraz.VectoCore.Models.Simulation.Impl; using TUGraz.VectoCore.Models.Simulation.Impl;
using TUGraz.VectoCore.Utils;
using TUGraz.VectoHashing; using TUGraz.VectoHashing;
namespace TUGraz.VectoCore.OutputData.XML namespace TUGraz.VectoCore.OutputData.XML
...@@ -148,9 +149,8 @@ namespace TUGraz.VectoCore.OutputData.XML ...@@ -148,9 +149,8 @@ namespace TUGraz.VectoCore.OutputData.XML
private XElement GetApplicationInfo() private XElement GetApplicationInfo()
{ {
var vectodll = Assembly.LoadFrom(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "VectoCore.dll")).GetName();
return new XElement(tns + XMLNames.Report_ApplicationInfo_ApplicationInformation, return new XElement(tns + XMLNames.Report_ApplicationInfo_ApplicationInformation,
new XElement(tns + XMLNames.Report_ApplicationInfo_SimulationToolVersion, vectodll.Version), new XElement(tns + XMLNames.Report_ApplicationInfo_SimulationToolVersion, VectoSimulationCore.VersionNumber),
new XElement(tns + XMLNames.Report_ApplicationInfo_Date, new XElement(tns + XMLNames.Report_ApplicationInfo_Date,
XmlConvert.ToString(DateTime.Now, XmlDateTimeSerializationMode.Utc))); XmlConvert.ToString(DateTime.Now, XmlDateTimeSerializationMode.Utc)));
} }
......
...@@ -45,6 +45,7 @@ using TUGraz.VectoCore.Models.Simulation.Data; ...@@ -45,6 +45,7 @@ using TUGraz.VectoCore.Models.Simulation.Data;
using TUGraz.VectoCore.Models.Simulation.Impl; using TUGraz.VectoCore.Models.Simulation.Impl;
using TUGraz.VectoCore.Models.SimulationComponent.Data; using TUGraz.VectoCore.Models.SimulationComponent.Data;
using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox; using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox;
using TUGraz.VectoCore.Utils;
using TUGraz.VectoHashing; using TUGraz.VectoHashing;
namespace TUGraz.VectoCore.OutputData.XML namespace TUGraz.VectoCore.OutputData.XML
...@@ -330,9 +331,8 @@ namespace TUGraz.VectoCore.OutputData.XML ...@@ -330,9 +331,8 @@ namespace TUGraz.VectoCore.OutputData.XML
private XElement GetApplicationInfo() private XElement GetApplicationInfo()
{ {
var vectodll = Assembly.LoadFrom(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "VectoCore.dll")).GetName();
return new XElement(tns + XMLNames.Report_ApplicationInfo_ApplicationInformation, return new XElement(tns + XMLNames.Report_ApplicationInfo_ApplicationInformation,
new XElement(tns + XMLNames.Report_ApplicationInfo_SimulationToolVersion, vectodll.Version), new XElement(tns + XMLNames.Report_ApplicationInfo_SimulationToolVersion, VectoSimulationCore.VersionNumber),
new XElement(tns + XMLNames.Report_ApplicationInfo_Date, new XElement(tns + XMLNames.Report_ApplicationInfo_Date,
XmlConvert.ToString(DateTime.Now, XmlDateTimeSerializationMode.Utc))); XmlConvert.ToString(DateTime.Now, XmlDateTimeSerializationMode.Utc)));
} }
......
...@@ -29,11 +29,8 @@ ...@@ -29,11 +29,8 @@
* Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology * Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology
*/ */
<#@ template language="C#" #>
<#@ output extension=".cs"#> <#@ output extension=".cs"#>
<#@ include file="../VersionNumber.t4" once="true" #>
using System.Reflection; using System.Reflection;
[assembly: AssemblyVersion("3.2.0.<#= this.RevisionNumber #>")] [assembly: AssemblyVersion("<#= GetVectoCoreVersionNumber() #>")]
[assembly: AssemblyFileVersion("3.2.0.<#= this.RevisionNumber #>")] [assembly: AssemblyFileVersion("<#= GetVectoCoreVersionNumber() #>")]
<#+
int RevisionNumber = (int)(DateTime.UtcNow - new DateTime(2015, 1, 1)).TotalDays;
#>
\ No newline at end of file
/*
* This file is part of VECTO.
*
* Copyright © 2012-2017 European Union
*
* Developed by Graz University of Technology,
* Institute of Internal Combustion Engines and Thermodynamics,
* Institute of Technical Informatics
*
* VECTO is licensed under the EUPL, Version 1.1 or - as soon they will be approved
* by the European Commission - subsequent versions of the EUPL (the "Licence");
* You may not use VECTO except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* https://joinup.ec.europa.eu/community/eupl/og_page/eupl
*
* Unless required by applicable law or agreed to in writing, VECTO
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*
* Authors:
* Stefan Hausberger, hausberger@ivt.tugraz.at, IVT, Graz University of Technology
* Christian Kreiner, christian.kreiner@tugraz.at, ITI, Graz University of Technology
* Michael Krisper, michael.krisper@tugraz.at, ITI, Graz University of Technology
* Raphael Luz, luz@ivt.tugraz.at, IVT, Graz University of Technology
* Markus Quaritsch, markus.quaritsch@tugraz.at, IVT, Graz University of Technology
* Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology
*/
namespace TUGraz.VectoCore.Utils
{
public static class VectoSimulationCore
{
public static string VersionNumber
{
get {
return "3.2.0.1015";
}
}
public static string FullVersion
{
get {
return string.Format("VectoCore {0}", VersionNumber);
}
}
}
}
\ No newline at end of file
/*
* This file is part of VECTO.
*
* Copyright © 2012-2017 European Union
*
* Developed by Graz University of Technology,
* Institute of Internal Combustion Engines and Thermodynamics,
* Institute of Technical Informatics
*
* VECTO is licensed under the EUPL, Version 1.1 or - as soon they will be approved
* by the European Commission - subsequent versions of the EUPL (the "Licence");
* You may not use VECTO except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* https://joinup.ec.europa.eu/community/eupl/og_page/eupl
*
* Unless required by applicable law or agreed to in writing, VECTO
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*
* Authors:
* Stefan Hausberger, hausberger@ivt.tugraz.at, IVT, Graz University of Technology
* Christian Kreiner, christian.kreiner@tugraz.at, ITI, Graz University of Technology
* Michael Krisper, michael.krisper@tugraz.at, ITI, Graz University of Technology
* Raphael Luz, luz@ivt.tugraz.at, IVT, Graz University of Technology
* Markus Quaritsch, markus.quaritsch@tugraz.at, IVT, Graz University of Technology
* Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology
*/
<#@ template debug="false" hostspecific="false" language="C#" #>
<#@ include file="../VersionNumber.t4" onnce="true" #>
<#@ output extension=".cs" #>
namespace TUGraz.VectoCore.Utils
{
public static class VectoSimulationCore
{
public static string VersionNumber
{
get {
return "<#= GetVectoCoreVersionNumber() #>";
}
}
public static string FullVersion
{
get {
return string.Format("VectoCore {0}", VersionNumber);
}
}
}
}
\ No newline at end of file
...@@ -331,6 +331,11 @@ ...@@ -331,6 +331,11 @@
<Compile Include="Utils\SwitchExtension.cs" /> <Compile Include="Utils\SwitchExtension.cs" />
<Compile Include="Utils\VectoCSVFile.cs" /> <Compile Include="Utils\VectoCSVFile.cs" />
<Compile Include="Utils\DelaunayMap.cs" /> <Compile Include="Utils\DelaunayMap.cs" />
<Compile Include="Utils\VectoVersionCore.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>VectoVersionCore.tt</DependentUpon>
</Compile>
<Compile Include="Utils\XmlResourceResolver.cs" /> <Compile Include="Utils\XmlResourceResolver.cs" />
<Compile Include="Utils\XPathHelper.cs" /> <Compile Include="Utils\XPathHelper.cs" />
</ItemGroup> </ItemGroup>
...@@ -418,6 +423,14 @@ ...@@ -418,6 +423,14 @@
<EmbeddedResource Include="Resources\XSD\VectoOutputCustomer.xsd"> <EmbeddedResource Include="Resources\XSD\VectoOutputCustomer.xsd">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</EmbeddedResource> </EmbeddedResource>
<None Include="Utils\VectoVersionCore.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>VectoVersionCore.cs</LastGenOutput>
</None>
<None Include="VersionNumber.t4">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>VersionNumber1.cs</LastGenOutput>
</None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="Resources\Declaration\Report\4x2r.png" /> <EmbeddedResource Include="Resources\Declaration\Report\4x2r.png" />
...@@ -449,11 +462,8 @@ ...@@ -449,11 +462,8 @@
<Name>VectoHashing</Name> <Name>VectoHashing</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>if $(ConfigurationName) == Release forfiles /p "$(ProjectDir)." /m "*.tt" /s /c "cmd /c echo Transforming @path &amp;&amp; \"%25CommonProgramFiles(x86)%25\Microsoft Shared\TextTemplating\12.0\TextTransform.exe\" @file"</PreBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- 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. Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild"> <Target Name="BeforeBuild">
...@@ -461,4 +471,6 @@ ...@@ -461,4 +471,6 @@
<Target Name="AfterBuild"> <Target Name="AfterBuild">
</Target> </Target>
--> -->
<Import Project="$(SolutionDir)Build\TextPreProcessing.targets" />
</Project> </Project>
\ No newline at end of file
<#+
int GetBuildNumber()
{
return (int)(DateTime.UtcNow - new DateTime(2015, 1, 1)).TotalDays;
}
string GetVectoCoreVersionNumber()
{
return "3.2.0." + GetBuildNumber();
}
#>
\ No newline at end of file
...@@ -40,7 +40,6 @@ using TUGraz.VectoCore.Utils; ...@@ -40,7 +40,6 @@ using TUGraz.VectoCore.Utils;
namespace TUGraz.VectoCore.Tests.FileIO namespace TUGraz.VectoCore.Tests.FileIO
{ {
[TestFixture] [TestFixture]
public class VectoCSVFileTest public class VectoCSVFileTest
{ {
...@@ -178,8 +177,9 @@ namespace TUGraz.VectoCore.Tests.FileIO ...@@ -178,8 +177,9 @@ namespace TUGraz.VectoCore.Tests.FileIO
{ {
const string fileName = "out_test.csv"; const string fileName = "out_test.csv";
if (File.Exists(fileName)) if (File.Exists(fileName)) {
File.Delete(fileName); File.Delete(fileName);
}
var table = new DataTable(); var table = new DataTable();
table.Columns.Add("a"); table.Columns.Add("a");
...@@ -209,10 +209,11 @@ namespace TUGraz.VectoCore.Tests.FileIO ...@@ -209,10 +209,11 @@ namespace TUGraz.VectoCore.Tests.FileIO
stream.Position = 0; stream.Position = 0;
using (var sr = new StreamReader(stream)) using (var sr = new StreamReader(stream)) {
Assert.AreEqual("a,b\r\n1,2\r\n", sr.ReadToEnd()); Assert.AreEqual("a,b\r\n1,2\r\n", sr.ReadToEnd());
} }
} }
} }
} }
} }
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment