feat(SyncCommLib): 新增项目,提供公共库同步小工具。

This commit is contained in:
Liang Su 2024-04-24 17:58:38 +08:00
parent 4074bb258b
commit fb4fc9ebbf
8 changed files with 156 additions and 0 deletions

View File

@ -30,6 +30,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Misc", "Misc", "{BA4BE7C7-6
gitversion.yml = gitversion.yml
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SyncCommLib", "SyncCommLib\SyncCommLib.csproj", "{B1E862CB-AC51-45B4-9A6F-3A55B16D9C2D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -98,10 +100,24 @@ Global
{424E9610-FA50-49CD-B5BE-BAF256DBF327}.Release|Any CPU.Build.0 = Release|Any CPU
{424E9610-FA50-49CD-B5BE-BAF256DBF327}.Release|x86.ActiveCfg = Release|Any CPU
{424E9610-FA50-49CD-B5BE-BAF256DBF327}.Release|x86.Build.0 = Release|Any CPU
{B1E862CB-AC51-45B4-9A6F-3A55B16D9C2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B1E862CB-AC51-45B4-9A6F-3A55B16D9C2D}.Debug|x86.ActiveCfg = Debug|Any CPU
{B1E862CB-AC51-45B4-9A6F-3A55B16D9C2D}.Debug|x86.Build.0 = Debug|Any CPU
{B1E862CB-AC51-45B4-9A6F-3A55B16D9C2D}.DebugWithoutCopyFiles|Any CPU.ActiveCfg = Debug|Any CPU
{B1E862CB-AC51-45B4-9A6F-3A55B16D9C2D}.DebugWithoutCopyFiles|Any CPU.Build.0 = Debug|Any CPU
{B1E862CB-AC51-45B4-9A6F-3A55B16D9C2D}.DebugWithoutCopyFiles|x86.ActiveCfg = Debug|Any CPU
{B1E862CB-AC51-45B4-9A6F-3A55B16D9C2D}.DebugWithoutCopyFiles|x86.Build.0 = Debug|Any CPU
{B1E862CB-AC51-45B4-9A6F-3A55B16D9C2D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B1E862CB-AC51-45B4-9A6F-3A55B16D9C2D}.Release|Any CPU.Build.0 = Release|Any CPU
{B1E862CB-AC51-45B4-9A6F-3A55B16D9C2D}.Release|x86.ActiveCfg = Release|Any CPU
{B1E862CB-AC51-45B4-9A6F-3A55B16D9C2D}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{B1E862CB-AC51-45B4-9A6F-3A55B16D9C2D} = {BA4BE7C7-6B23-4D4C-B0A2-36D2958E3671}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {49F07864-CB9F-43CB-97F1-FED8C84760FE}
EndGlobalSection

6
SyncCommLib/App.config Normal file
View File

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

15
SyncCommLib/Program.cs Normal file
View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SyncCommLib
{
internal class Program
{
static void Main(string[] args)
{
}
}
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("SyncCommLib")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SyncCommLib")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("b1e862cb-ac51-45b4-9a6f-3a55b16d9c2d")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="SyncCommLib" BeforeTargets="CoreCompile">
<Exec Command='$(ProjectDir)sync_directories.exe'
EchoOff='true'
ContinueOnError='true'
ConsoleToMSBuild='true'
StandardErrorImportance='high'
StandardOutputImportance='high'>
<Output TaskParameter="ConsoleOutput" PropertyName="_GitOutput"/>
<Output TaskParameter="ExitCode" PropertyName="MSBuildLastExitCode" />
</Exec>
<Error Condition="'$(MSBuildLastExitCode)' != '0'" Text="Failed to sync common library. $(_GitOutput)" />
</Target>
</Project>

View File

@ -0,0 +1,59 @@
<?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>{B1E862CB-AC51-45B4-9A6F-3A55B16D9C2D}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>SyncCommLib</RootNamespace>
<AssemblyName>SyncCommLib</AssemblyName>
<TargetFrameworkVersion>v4.8</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="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="config.json" />
</ItemGroup>
<ItemGroup>
<None Include="Properties\SyncCommLib.targets" />
<None Include="sync_directories.exe" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="Properties\SyncCommLib.targets"/>
</Project>

9
SyncCommLib/config.json Normal file
View File

@ -0,0 +1,9 @@
{
"source_directory": "../../Sic.Framework/Output/MECF.Framework",
"destination_directory": "../ThirdParty/MECF.Framework",
"ignore": [
"_gsdata_",
"*.xml",
"*.pdb"
]
}

Binary file not shown.