locked
Forcing "Create directory for solution" in New Project Dialog? RRS feed

  • Question

  • I have a few custom project types where I want to force the user to check the "Create directory for solution" checkbox in the New Project Dialog.  It seems that the DTE.Solution.FullName property is empty when this is unchecked.  We have some downstream code that relies on that property in our wizard, so it's easiest to just ensure it's always non-empty.  I can easily test for that condition and throw, but I was hoping there was a simple way to do something more elegant.

    Thanks in advance.

    Monday, February 25, 2013 3:49 PM

All replies

  • Hi Krik,

    Thank you for posting in the MSDN Forum.
     
    I will involve some experts into this issue to see whether they can help you out. There might be some time delay, appreciate for your patience.
     
    Thank you for your understanding and support.
     
    Best regards,


    Ego [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, February 26, 2013 8:27 AM
  • Hi,

    Solution.FullName may return "" in the following cases:

    - If there is no solution loaded (although DTE.Solution never returns null, always return an instance and you can use Solution.IsOpen to know if there is a solution loaded or not).

    - If the solution is not saved yet. This is the case of temporary solutions: http://msdn.microsoft.com/en-us/library/6yx39k28.aspx


    Regards,
    Christian HL
    Microsoft Online Community Support


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Thursday, February 28, 2013 7:19 AM
  • Hi Christian,

    Thanks for the reply.

    The code in which I'm seeing this is a wizard for a custom project type, so there is a solution being created -- just not sure which stage it's in.   Nevertheless, the real question is -- can I force that checkbox in the New Project Dialog to be checked?

    Thanks.

    Thursday, February 28, 2013 10:19 PM