mirror of
https://github.com/nsnail/ns-ext.git
synced 2025-04-19 17:42:51 +08:00

* <chore> * 1.0.7 * <adjust> * <chore> * <chore> * <refactor> * <doc> * <doc> * <feat> + Unicode,UnicodeDe * <revert> * <fix> * bugfix * <feat> 从资源文件读取Description * <feat> 从资源文件读取Description-可继承 * <fix> 将一个对象序列化成json文本 * <chore> * 调整一下日志格式 * feat: * 泛型特性本地化资源描述 * 添加测试项目 * <chore> * feat: enum、string * feat: long 类型增加rand方法 * feat: ToInvString * fix: ToInvString * fix: ToInvString * fix: ParameterFormat bug * [BLD] [SKIP CI]
20 lines
818 B
C#
20 lines
818 B
C#
using System.Text.RegularExpressions;
|
|
|
|
var slnFile = Directory.GetFiles(@"./", "*.sln").First();
|
|
var content = File.ReadAllText(slnFile);
|
|
|
|
content = Regex.Replace(
|
|
content,
|
|
"Project\\(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\"\\) = \"meta\", \"meta\", \"{5198A03D-0CAC-4828-A807-34A693F73859}\"(?:.|\n)*?EndProject",
|
|
$$"""
|
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "meta", "meta", "{5198A03D-0CAC-4828-A807-34A693F73859}"
|
|
{{'\t'}}ProjectSection(SolutionItems) = preProject
|
|
{{string.Join('\n',
|
|
Directory.GetFiles(@"./", "*").Where(x => !x.EndsWith(".sln") && !x.EndsWith(".user"))
|
|
.Select(x=>$"\t\t{Path.GetFileName(x)} = {Path.GetFileName(x)}")
|
|
)}}
|
|
{{'\t'}}EndProject
|
|
"""
|
|
);
|
|
Console.WriteLine(content);
|
|
File.WriteAllText(slnFile, content); |