Browse Source

1.檔案加入版本號

Jessica.Tseng 5 years ago
parent
commit
40aaad49b2

+ 0 - 6
ConsoleApp1/App.config

@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<configuration>
-    <startup> 
-        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.1" />
-    </startup>
-</configuration>

+ 0 - 63
ConsoleApp1/ConsoleApp1.csproj

@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProjectGuid>{246CE947-2BC8-4490-ABB8-C6BF3967EF3A}</ProjectGuid>
-    <OutputType>Exe</OutputType>
-    <RootNamespace>ConsoleApp1</RootNamespace>
-    <AssemblyName>ConsoleApp1</AssemblyName>
-    <TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
-    <FileAlignment>512</FileAlignment>
-    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
-    <Deterministic>true</Deterministic>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <PlatformTarget>AnyCPU</PlatformTarget>
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <PlatformTarget>AnyCPU</PlatformTarget>
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
-      <HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
-    </Reference>
-    <Reference Include="System" />
-    <Reference Include="System.Core" />
-    <Reference Include="System.Xml.Linq" />
-    <Reference Include="System.Data.DataSetExtensions" />
-    <Reference Include="Microsoft.CSharp" />
-    <Reference Include="System.Data" />
-    <Reference Include="System.Net.Http" />
-    <Reference Include="System.Xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="Program.cs" />
-    <Compile Include="Properties\AssemblyInfo.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="App.config" />
-    <None Include="packages.config" />
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\EVCB_OCPP.Packet\EVCB_OCPP.Packet.csproj">
-      <Project>{d458d1a1-3957-48d0-95bc-505d04ef7d69}</Project>
-      <Name>EVCB_OCPP.Packet</Name>
-    </ProjectReference>
-  </ItemGroup>
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-</Project>

+ 0 - 35
ConsoleApp1/Program.cs

@@ -1,35 +0,0 @@
-using EVCB_OCPP.Packet.Messages.Core;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace ConsoleApp1
-{
-    class Program
-    {
-        static void Main(string[] args)
-        {
-            var aa = new StopTransactionRequest()
-            {
-                meterStop=1,
-                timestamp=DateTime.Now,
-                transactionId=1
-
-            };
-
-            string tt = JsonConvert.SerializeObject(aa, new JsonSerializerSettings()
-            {
-                NullValueHandling = NullValueHandling.Ignore
-            });
- 
-
-            var rr = JsonConvert.DeserializeObject<StopTransactionRequest>(tt
-
-
-           );
-        }
-    }
-}

+ 0 - 36
ConsoleApp1/Properties/AssemblyInfo.cs

@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// 組件的一般資訊是由下列的屬性集控制。
-// 變更這些屬性的值即可修改組件的相關
-// 資訊。
-[assembly: AssemblyTitle("ConsoleApp1")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("ConsoleApp1")]
-[assembly: AssemblyCopyright("Copyright ©  2019")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// 將 ComVisible 設為 false 可對 COM 元件隱藏
-// 組件中的類型。若必須從 COM 存取此組件中的類型,
-// 的類型,請在該類型上將 ComVisible 屬性設定為 true。
-[assembly: ComVisible(false)]
-
-// 下列 GUID 為專案公開 (Expose) 至 COM 時所要使用的 typelib ID
-[assembly: Guid("246ce947-2bc8-4490-abb8-c6bf3967ef3a")]
-
-// 組件的版本資訊由下列四個值所組成: 
-//
-//      主要版本
-//      次要版本
-//      組建編號
-//      修訂編號
-//
-// 您可以指定所有的值,或將組建編號或修訂編號設為預設值
-// 指定為預設值: 
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]

+ 0 - 4
ConsoleApp1/packages.config

@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
-  <package id="Newtonsoft.Json" version="12.0.1" targetFramework="net471" />
-</packages>

+ 3 - 0
EVCB_OCPP.Domain/EVCB_OCPP.Domain.csproj

@@ -296,4 +296,7 @@
     <Content Include="StoredProcedure\uspInsertMachineConnectionLog.sql" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <PropertyGroup>
+    <PreBuildEvent>GitVersion.exe $(SolutionDir) /updateassemblyinfo</PreBuildEvent>
+  </PropertyGroup>
 </Project>

+ 5 - 3
EVCB_OCPP.Domain/Properties/AssemblyInfo.cs

@@ -31,6 +31,8 @@ using System.Runtime.InteropServices;
 //
 // 您可以指定所有的值,或將組建編號或修訂編號設為預設值
 //方法是使用 '*',如下所示:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+// [assembly: AssemblyVersion("0.1.0.0")]
+[assembly: AssemblyVersion("0.1.0.0")]
+[assembly: AssemblyFileVersion("0.1.0.0")]
+
+[assembly: AssemblyInformationalVersion("0.1.0+6.Branch.master.Sha.6ec1d5c4c98507245ccdd89f07020334a321fe31")]

+ 3 - 0
EVCB_OCPP.Packet/EVCB_OCPP.Packet.csproj

@@ -223,4 +223,7 @@
     <None Include="packages.config" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <PropertyGroup>
+    <PreBuildEvent>GitVersion.exe $(SolutionDir) /updateassemblyinfo</PreBuildEvent>
+  </PropertyGroup>
 </Project>

+ 5 - 3
EVCB_OCPP.Packet/Properties/AssemblyInfo.cs

@@ -31,6 +31,8 @@ using System.Runtime.InteropServices;
 //
 // 您可以指定所有的值,或將組建編號或修訂編號設為預設值
 //方法是使用 '*',如下所示:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+// [assembly: AssemblyVersion("0.1.0.0")]
+[assembly: AssemblyVersion("0.1.0.0")]
+[assembly: AssemblyFileVersion("0.1.0.0")]
+
+[assembly: AssemblyInformationalVersion("0.1.0+6.Branch.master.Sha.6ec1d5c4c98507245ccdd89f07020334a321fe31")]

+ 6 - 0
GitVersion.yml

@@ -0,0 +1,6 @@
+assembly-versioning-scheme: MajorMinorPatch
+assembly-informational-format: '{ShortSha}'
+next-version: 0.1.0
+branches: {}
+ignore:
+  sha: []