hum strange
what do you want to do with that info?
but here some code you can use
you have to dig in it, won't do exactly what you need, but it's already a
part of it
Imports EnvDTE 'add reference:
"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\envd te.dll"
Public Class Class1
Public Shared Sub main()
Dim DTE As EnvDTE.DTE =
System.Runtime.InteropServices.Marshal.GetActiveOb ject("VisualStudio.DTE")
Dim vbProjects As Projects = DirectCast(DTE.GetObject("VBProjects"),
Projects)
Dim aProject As Project
For Each aProject In vbProjects
MsgBox(aProject.FullName)
Dim x As System.Collections.IEnumerator =
aProject.Properties.GetEnumerator()
Dim pr As [Property]
Dim msg As String = ""
While (x.MoveNext)
pr = DirectCast(x.Current, [Property])
msg &= pr.Name & vbCrLf
End While
MsgBox(msg)
Next
End Sub
End Class
"astroboy" <da****@ddadde.com> wrote in message
news:OC**************@TK2MSFTNGP10.phx.gbl...
No not that I meant, I want to retrieve Project Folder or application path
location at compile time. If you go to Project-> xxx Properties->Common
Properties ->General
You would see Project folder, project file and output name in there, I
would like to get those infomation
Thx
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:c1*************@ID-208219.news.uni-berlin.de... * "astroboy" <da****@ddadde.com> scripsit: How do I get project folder in .NET?
Are you referring to the application path?
\\\
Imports System.IO
Imports System.Reflection
.
.
.
Private Function ApplicationPath() As String
Return _
Path.GetDirectoryName([Assembly].GetExecutingAssembly().Location) End Function
///
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>