Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 0 additions & 72 deletions dotnet/src/dotnetcore/GxNetCoreStartup/RunUtils.cs

This file was deleted.

34 changes: 0 additions & 34 deletions dotnet/src/dotnetcore/GxNetCoreStartup/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ public static void Main(string[] args)
LocatePhysicalLocalPath();

}

MCPTools.ServerStart(Startup.VirtualPath, Startup.LocalPath, schema);

if (port == DEFAULT_PORT)
{
BuildWebHost(null).Run();
Expand Down Expand Up @@ -867,37 +864,6 @@ public void Apply(ApplicationModel application)
}
}

static class MCPTools
{
public static void ServerStart(string virtualPath, string workingDir, string schema)
{
IGXLogger log = GXLoggerFactory.GetLogger(typeof(CustomBadRequestObjectResult).FullName);
bool isMpcServer = false;
try
{
List<string> L = Directory.GetFiles(Path.Combine(workingDir,"bin"), "*mcp_service.dll").ToList<string>();
isMpcServer = L.Count > 0;
if (isMpcServer)
{
GXLogging.Info(log, "Start MCP Server");

GxRunner.RunAsync("GxMcpStartup.exe", Path.Combine(workingDir,"bin"), virtualPath, schema, onExit: exitCode =>
{
if (exitCode == 0)
Console.WriteLine("Process completed successfully.");
else
Console.Error.WriteLine($"Process failed (exit code {exitCode})");
});
}
}
catch (Exception ex)
{
GXLogging.Error(log, "Error starting MCP Server", ex);
}
}
}


internal class HomeControllerConvention : IApplicationModelConvention
{
private static bool FindAndStoreDefaultFile()
Expand Down
Loading