none
Get Current Solution Name RRS feed

  • Question

  • Hello,

    Is it possible to find the current Solution name on a C# code and on a App.Config?

    Thank You,

    Miguel

    Thursday, November 17, 2011 4:56 PM

Answers

  • using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Reflection;
    using System.IO;
    using System.Diagnostics;
    
    namespace ConsoleApplication1
    {
        class Program
        {
            static void Main(string[] args)
            {
                String solutionName = Path.GetFileName(Process.GetCurrentProcess().MainModule.FileName);
            }
    
            
        }
    }
    
    


    John Grove, Senior Software Engineer http://www.digitizedschematic.com/
    • Marked as answer by MDMoura Thursday, November 17, 2011 5:42 PM
    Thursday, November 17, 2011 5:05 PM
  • Have a look here to see if this fits your requirements: http://msdn.microsoft.com/en-us/library/k3dys0y2.aspx

    Just did a quick Google on your requirement and found this and have not used it myself

    • Marked as answer by MDMoura Thursday, November 17, 2011 5:42 PM
    Thursday, November 17, 2011 5:01 PM

All replies

  • Have a look here to see if this fits your requirements: http://msdn.microsoft.com/en-us/library/k3dys0y2.aspx

    Just did a quick Google on your requirement and found this and have not used it myself

    • Marked as answer by MDMoura Thursday, November 17, 2011 5:42 PM
    Thursday, November 17, 2011 5:01 PM
  • using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Reflection;
    using System.IO;
    using System.Diagnostics;
    
    namespace ConsoleApplication1
    {
        class Program
        {
            static void Main(string[] args)
            {
                String solutionName = Path.GetFileName(Process.GetCurrentProcess().MainModule.FileName);
            }
    
            
        }
    }
    
    


    John Grove, Senior Software Engineer http://www.digitizedschematic.com/
    • Marked as answer by MDMoura Thursday, November 17, 2011 5:42 PM
    Thursday, November 17, 2011 5:05 PM
  • Thank You!

    Miguel
    Thursday, November 17, 2011 5:42 PM