Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 2a53d601 authored by Harald MARTINI's avatar Harald MARTINI
Browse files

updated VectoConsoleStart project

parent 0ad44d60
No related branches found
No related tags found
No related merge requests found
......@@ -3,17 +3,30 @@ using Microsoft.Win32;
using System.Diagnostics;
using System.Reflection;
using System.IO;
using System.Linq;
using System.Text;
namespace TUGraz.VECTO
{
class Program
{
static void Main()
private static int Main(string[] args)
{
var version = GetHighestNETVersion();
Process.Start(new ProcessStartInfo($"{version}\\{Assembly.GetExecutingAssembly().GetName().Name}.exe") {
WorkingDirectory = Directory.GetCurrentDirectory()
var argsString = "";
foreach (var arg in args) {
argsString += $"\"{arg}\" ";
}
var process = Process.Start(new ProcessStartInfo($"{version}\\{Assembly.GetExecutingAssembly().GetName().Name}.exe")
{
WorkingDirectory = Directory.GetCurrentDirectory(),
UseShellExecute = false,
Arguments = argsString,
});
process?.WaitForExit();
return process?.ExitCode ?? -1;
}
private static string GetHighestNETVersion()
......
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<OutputType>exe</OutputType>
<AssemblyName>vectocmd</AssemblyName>
<ApplicationIcon>Icon2.ico</ApplicationIcon>
<RootNamespace>TUGraz.VECTO</RootNamespace>
<TargetFrameworks>net45</TargetFrameworks>
<DefineConstants />
<DefineConstants />
<StartupObject></StartupObject>
</PropertyGroup>
</Project>
......@@ -168,8 +168,8 @@ Global
{60AD4DF0-6648-4374-83CB-C7A162EFB391}.Deploy|Any CPU.Build.0 = Release|Any CPU
{60AD4DF0-6648-4374-83CB-C7A162EFB391}.MockupDebug|Any CPU.ActiveCfg = MockupDebug|Any CPU
{60AD4DF0-6648-4374-83CB-C7A162EFB391}.MockupDebug|Any CPU.Build.0 = MockupDebug|Any CPU
{60AD4DF0-6648-4374-83CB-C7A162EFB391}.MockupDeploy|Any CPU.ActiveCfg = Debug|Any CPU
{60AD4DF0-6648-4374-83CB-C7A162EFB391}.MockupDeploy|Any CPU.Build.0 = Debug|Any CPU
{60AD4DF0-6648-4374-83CB-C7A162EFB391}.MockupDeploy|Any CPU.ActiveCfg = MockupRelease|Any CPU
{60AD4DF0-6648-4374-83CB-C7A162EFB391}.MockupDeploy|Any CPU.Build.0 = MockupRelease|Any CPU
{60AD4DF0-6648-4374-83CB-C7A162EFB391}.MockupRelease|Any CPU.ActiveCfg = Debug|Any CPU
{60AD4DF0-6648-4374-83CB-C7A162EFB391}.MockupRelease|Any CPU.Build.0 = Debug|Any CPU
{60AD4DF0-6648-4374-83CB-C7A162EFB391}.Release|Any CPU.ActiveCfg = Release|Any CPU
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment