I am making a custom control designer inside of VS, and i need to find a way to add a designer file for the custom controls that are made in my designer.
My problem is that i can't find a way to get the path of the project directory at design time, all the usually methods returns the path of the Vs folder :/
Any ideas? :)
Can you please elaborate? What file do you want to open?
(Oct 14, 2011 01:33 PM)Sapientia Wrote: Can you please elaborate? What file do you want to open?
The project folder, where all the code files are stored.
(Oct 14, 2011 01:36 PM)BlackCap Wrote: The project folder, where all the code files are stored.
Code "System.Reflection.Assembly.GetAssembly().Location" ???
(Oct 14, 2011 01:41 PM)n0$f3ratu$ Wrote: Code "System.Reflection.Assembly.GetAssembly().Location" ???
Nope, at design time it returns a location in the appdata even througth my project is both builded and saved..
Dim AppPath As String = My.Application.Info.DirectoryPath
(Oct 14, 2011 02:37 PM)SomeWhiteGuy Wrote: Dim AppPath As String = My.Application.Info.DirectoryPath
I have allready tryed it and it does not work at design time
(Oct 14, 2011 02:40 PM)BlackCap Wrote: I have allready tryed it and it does not work at design time
I don't understand what you're trying to do.
/Elaborate
What do you mean at "Design Time"? Are you talking about when you debug it ?
DO NOT DEAL WITH THIS MEMBER
Like when you are debugging it? I believe that's because you're either using a temporary project, or that's just how Visual Studio works with debugging.
Are you think about Application.StartPath? Im confused.
(Oct 14, 2011 04:47 PM)Banksу Wrote: Like when you are debugging it? I believe that's because you're either using a temporary project, or that's just how Visual Studio works with debugging.
This is design time:
[img]http://filesmelt.com/dl/ydi_sc_3.png[/img]
Like a sayed, it's a custom designer to create custom controls (like the form designer), and i neded the path of the project so that i could generate designer files for the custom controls made with it.
Just in case someone else need it, i managed to get the path from the EnvDTE.DTE class found in the EnvDTE dll.
Look at my above post, use Application.Startpath
(Oct 15, 2011 02:14 AM)Coleak Wrote: Look at my above post, use Application.Startpath
You should test it before you post. It where the first method i tested, and i't returns a location in the appdata.
(Oct 15, 2011 02:36 AM)BlackCap Wrote: You should test it before you post. It where the first method i tested, and i't returns a location in the appdata.
Alright, then what is the problem?
Take the path from appdata, because is obvious you put the "working" folder there.
|