Skip to content

Commit

Permalink
* 修正正则错误
Browse files Browse the repository at this point in the history
* 编译时不创建窗体
  • Loading branch information
sth4nothing committed Nov 23, 2018
1 parent 90f1249 commit 8a2a37e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions DynamicExecutor/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ public class Settings : UMM.ModSettings
/// <summary>
/// MsBuild路径
/// </summary>
/// <returns></returns>
public string msbuildPath =
@"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MsBuild.exe";
public override void Save(UMM.ModEntry modEntry)
Expand Down Expand Up @@ -144,7 +143,7 @@ public static void Execute()
try
{
// Execute.cs
var reg = new Regex("\bExecute\b", RegexOptions.Compiled);
var reg = new Regex(@"\bExecute\b");
var cs = File.ReadAllText(Path.Combine(rootPath, "Execute.cs.template"));
File.WriteAllText(Path.Combine(rootPath, "Execute.cs"),
reg.Replace(cs, "Execute" + count));
Expand All @@ -165,7 +164,7 @@ public static void Execute()
// 编译
var p = new System.Diagnostics.Process();
p.StartInfo.FileName = Setting.msbuildPath;
p.StartInfo.UseShellExecute = true;
p.StartInfo.UseShellExecute = false;
p.StartInfo.CreateNoWindow = true;
p.StartInfo.WorkingDirectory = rootPath;
p.StartInfo.Arguments = "/m /p:Configuration=Release Execute.csproj";
Expand Down

0 comments on commit 8a2a37e

Please sign in to comment.