When people download my project from GitHub, I launch a Setup Guide on Start Up that contains a button that reads 'Launch Connection String Builder'.
The problem is GitHub doesn't store the .exe, so I have to explain in every video or tutorial 'Open Connection String Builder Solution > Build' then either run Connection String Builder or click the button 'Launch Connection String Builder Button'.
If there is a way I can compile on demand the Connection String Builder project this would be my ideal solution.
I know I could move the form in the Connection String Builder project to inside of the main (DataTier.Net) project, but I don't want to do that if I don't have to since I keep a shortcut on my desktop to Connection String Builder.
The folder of ConnectionStringBuilder is in a tools folder which is a sub folder of the main project.
I was looking for a Rosylyn method to compile a project on demand, but couldn't find anything by Googling this (I did give up after a couple of pages I admit). As illustrated by the code sample below, I know how to check if the .exe exists, and I would like to be able to something like RosylnCompiler.Compile(pathToProject);
if the .exe does not exist.
string temp = "../../../Tools/ConnectionStringBuilder/ConnectionBuilder/bin/Debug/ConnectionBuilder.exe";
string path = Path.GetFullPath(temp);
if (File.Exists(path))
{
string databaseName = ...;
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo(path, databaseName);
System.Diagnostics.Process.Start(startInfo);
}
else
{
MessageBox.Show("Sorry we could not find DataTier.Net Connection String Builder.", "App Not Found", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
Is there anyway to do this? If not I can update my message boxes to be instructions or copy the form into my main project if I have to, but a compile on demand would be my ideal solution.