Commit 10ff1887 by 何阳

增加版本号

parent 97f9c6a2
Showing with 15 additions and 3 deletions
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net7.0-windows</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</PropertyGroup>
......
......@@ -7,11 +7,22 @@ using FubarDev.FtpServer;
using FubarDev.FtpServer.FileSystem.DotNet;
using Microsoft.Extensions.DependencyInjection;
using Serilog;
using System.Reflection;
HashSet<string> FileChangeCnt = new();
Logging.InitLogging();
Log.Information($"FTP Agent 启动");
var config = new Config("config.ini");
// 获取当前程序集
Assembly assembly = Assembly.GetExecutingAssembly();
// 获取版本信息
Version version = assembly.GetName().Version;
string informationalVersion = assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion;
Log.Information($"程序版本:{informationalVersion}");
Log.Information($"Customer Name: {config.CustomerName}");
Log.Information($"Device No: {config.DeviceNo}");
Log.Information($"OCR Type: {config.OcrType}");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment