diff --git a/VectoCore/VectoCore/Utils/VectoVersionCore.cs b/VectoCore/VectoCore/Utils/VectoVersionCore.cs index c87440dfc0e64f37d22f9eb997b0c0c63421197b..1d909d2a0bf38cfd11d75a6c53c1bcb8981f0e5b 100644 --- a/VectoCore/VectoCore/Utils/VectoVersionCore.cs +++ b/VectoCore/VectoCore/Utils/VectoVersionCore.cs @@ -33,36 +33,16 @@ namespace TUGraz.VectoCore.Utils { public static class VectoSimulationCore { - #if CERTIFICATION_RELEASE private const string SUFFIX = ""; -#else -#if RELEASE_CANDIDATE +#elif RELEASE_CANDIDATE private const string SUFFIX = "-RC"; #else private const string SUFFIX = "-DEV"; #endif -#endif - - public static string VersionNumber - { - get { - return "0.7.7.2547" + SUFFIX; - } - } - public static string BranchSuffix - { - get { - return "-DEV"; - } - } + public static string VersionNumber => typeof(VectoSimulationCore).Assembly.GetName().Version + SUFFIX; - public static string FullVersion - { - get { - return string.Format("VectoCore{1} {0}", VersionNumber, BranchSuffix); - } - } + public static string BranchSuffix => SUFFIX; } } \ No newline at end of file diff --git a/VectoCore/VectoCore/Utils/VectoVersionCore.tt b/VectoCore/VectoCore/Utils/VectoVersionCore.tt deleted file mode 100644 index 4764afb48f77a4502552faea6f07f39b951afbb0..0000000000000000000000000000000000000000 --- a/VectoCore/VectoCore/Utils/VectoVersionCore.tt +++ /dev/null @@ -1,71 +0,0 @@ -/* -* This file is part of VECTO. -* -* Copyright © 2012-2019 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 - { - -#if CERTIFICATION_RELEASE - private const string SUFFIX = ""; -#else -#if RELEASE_CANDIDATE - private const string SUFFIX = "-RC"; -#else - private const string SUFFIX = "-DEV"; -#endif -#endif - - public static string VersionNumber - { - get { - return "<#= GetVectoCoreVersionNumber() #>" + SUFFIX; - } - } - - public static string BranchSuffix - { - get { - return "-DEV"; - } - } - - public static string FullVersion - { - get { - return string.Format("VectoCore{1} {0}", VersionNumber, BranchSuffix); - } - } - } -} \ No newline at end of file diff --git a/VectoCore/VectoCore/VectoCore.csproj b/VectoCore/VectoCore/VectoCore.csproj index e36e208fff624bea9d7007adda7e7c8526284fda..9db5b5997ef7ae9059e3cfb28e83c0145c44439c 100644 --- a/VectoCore/VectoCore/VectoCore.csproj +++ b/VectoCore/VectoCore/VectoCore.csproj @@ -784,11 +784,7 @@ <Compile Include="OutputData\FileIO\ShiftPolygonExport.cs" /> <Compile Include="Utils\VectoCSVFile.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\VectoVersionCore.cs" /> <Compile Include="Utils\XAttributeEqualityComparer.cs" /> <Compile Include="Utils\XMLDefinitions.cs" /> <Compile Include="Utils\XMLHelper.cs" /> @@ -796,14 +792,8 @@ <Compile Include="Utils\XMLValidator.cs" /> <Compile Include="Utils\XPathHelper.cs" /> <Compile Include="Ninject\VectoNinjectModule.cs" /> - <Compile Include="VersionNumber1.cs"> - <AutoGen>True</AutoGen> - <DesignTime>True</DesignTime> - <DependentUpon>VersionNumber.t4</DependentUpon> - </Compile> </ItemGroup> <ItemGroup> - <None Include="app.config" /> <None Include="OutputData\FileIO\FileWriter.cd" /> <None Include="packages.config" /> <EmbeddedResource Include="JsonKeys.resx"> @@ -1043,14 +1033,6 @@ <EmbeddedResource Include="Resources\XSD\VectoOutputManufacturer.0.7.1.xsd"> <SubType>Designer</SubType> </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> <EmbeddedResource Include="Resources\Declaration\Report\4x2r.png" /> diff --git a/VectoCore/VectoCore/VersionNumber.t4 b/VectoCore/VectoCore/VersionNumber.t4 deleted file mode 100644 index 5b9bec56b25e9af602f169964ee0045c9bfca692..0000000000000000000000000000000000000000 --- a/VectoCore/VectoCore/VersionNumber.t4 +++ /dev/null @@ -1,11 +0,0 @@ -<#+ -int GetBuildNumber() -{ - return (int)(DateTime.UtcNow - new DateTime(2015, 1, 1)).TotalDays; -} - -string GetVectoCoreVersionNumber() -{ - return "0.7.7." + GetBuildNumber(); -} -#> \ No newline at end of file diff --git a/VectoCore/VectoCore/VersionNumber1.cs b/VectoCore/VectoCore/VersionNumber1.cs deleted file mode 100644 index 5f282702bb03ef11d7184d19c80927b47f919764..0000000000000000000000000000000000000000 --- a/VectoCore/VectoCore/VersionNumber1.cs +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/VectoCore/VectoCore/app.config b/VectoCore/VectoCore/app.config deleted file mode 100644 index 64d75508937a7fa38550d00611a18adba3972680..0000000000000000000000000000000000000000 --- a/VectoCore/VectoCore/app.config +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<configuration> - <startup> - <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> - </startup> - <runtime> - <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> - <dependentAssembly> - <assemblyIdentity name="Ninject" publicKeyToken="c7192dc5380945e7" culture="neutral" /> - <bindingRedirect oldVersion="0.0.0.0-3.3.4.0" newVersion="3.3.4.0" /> - </dependentAssembly> - </assemblyBinding> - </runtime> -</configuration> \ No newline at end of file