473,508 Members | 2,210 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Path of Solution

Hi,
Is there a property to find the path of the solution, I've found a few
properties that give you the executable path i.e. Application.StartupPath
etc. and I know i could just parse this to remove the binand get what i am
looking for but I thought there might have been some property to get the path
of the solution directly. Anybody have any ideas.
Any help would be great
Nov 21 '05 #1
5 1446
"vbdotnetmania" <vb***********@discussions.microsoft.com> schrieb:
Is there a property to find the path of the solution, I've found a few
properties that give you the executable path i.e. Application.StartupPath
etc. and I know i could just parse this to remove the binand get what i am
looking for but I thought there might have been some property to get the
path
of the solution directly. Anybody have any ideas.


This is not supported for applications, because in general the solution
(source code) is not distributed with the application.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #2
VBDotmania,

When Application.StartupPath does not directly give the path of the
application, what does it than give for you?

Cor
Nov 21 '05 #3
Hi Cor,
I'm pretty sure what you are getting at is that
Application.StartupPath gives you the path of the exe e.g. SolutionName\bin,
so obviously it is quite easy to get the solutionname from this using
something like
Result = Strings.Left(Result, Len(Result) - 4)
or some other equivalent. I was simply curious to know if there was some
property to get the solution path directly, given the replies I take it that
there is not.
Thanks for your replies.
Barry.

"Cor Ligthert" wrote:
VBDotmania,

When Application.StartupPath does not directly give the path of the
application, what does it than give for you?

Cor

Nov 21 '05 #4
VBdotnetmania,

Now I see what you mean. It gives you back the startup path. When you are in
developing mode, than your startup exe is in that bin folder you mention,
however in real runtime it will probably be in \program
files\YourCompanynameOrWhatever\

Cor
Nov 21 '05 #5
The reason that I wanted the actual solution path was due to a program that I
have made and use quite a lot but I am regularly updating so it's more
convenient at present to run the app from visual studio.

It has an app.config file that I need to update with any new settings in the
solutions folder when i close my application hence I need the path for the
app.config file and not just for the solution.exe.config file which is all I
would need if i were to be running the exe directly.

Anyway it's the 1st time I've started to use the app.config file and maybe
my approach is wrong, in fact I'd be surprised if it wasn't, any ideas on
this would be good.
Thanks,
Barry.
"Cor Ligthert" wrote:
VBdotnetmania,

Now I see what you mean. It gives you back the startup path. When you are in
developing mode, than your startup exe is in that bin folder you mention,
however in real runtime it will probably be in \program
files\YourCompanynameOrWhatever\

Cor

Nov 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2470
by: Dennis Wheeler | last post by:
I'm trying to find a commandline solution for switching projects. Currently I have to modify the IIS virtual directory path to the source files, and then open the solution file in .Net to be...
5
1211
by: Peter Stojkovic | last post by:
I have the following problem: I have a solution in path C:\AAA\CustomerA Now I have a second project: Then I copy everyThing to C:\AAA\CustomerB Bit inside the new project everything is...
20
16997
by: Webdad | last post by:
Hi! I running my first year as industrial engineer (informatics) We have an assignment to do : .... create a playfield (matrix). Some places in that field are blocked, so you can't pass them....
4
27705
by: Richard | last post by:
We are distributing a VS2003 solution to our customers that includes a .NET assembly (dll file) and a sample project for how to use the dll. The customer can then customize the sample or add a new...
2
6417
by: Harshdeep Mehta | last post by:
Hi all gurus, Myself Harshdeep Mehta, you can call me Harsh. I struck up in a situation where I need to define relative path in Web.Config. I.e. suppose I have a "Export" named folder, besides...
2
3858
by: Seth | last post by:
Ok, here is my setup. I have a fully functioning HTTP Handler implemented. The handler is supposed to handle every single request that comes in to a particular virtual directory. Thus, in IIS, I...
13
1005
by: Adam | last post by:
Trying to get an asp.net 2.0 app running and am receiving this error. I see a bunch of people with this error on the net, but no solution: Works fine on my local machine, deployed to a server it...
0
1319
by: John Doe | last post by:
Windows XP Visual Studio 2003 NET Visual C++ When I tried to run without debugging, I get a message that says it can't find a path. The path did exist on my computer. I cannot find the path...
34
3920
by: Ben Sizer | last post by:
I've installed several different versions of Python across several different versions of MS Windows, and not a single time was the Python directory or the Scripts subdirectory added to the PATH...
5
10012
by: =?Utf-8?B?SmVmZiBCZWVt?= | last post by:
Before you respond with "just use GetShortPathName" please read the rest. We have an application that places files on a file server using mapped drives as it's path of choice. The reason for...
0
7231
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7132
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7401
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7063
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7504
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
3196
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1568
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
773
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
432
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.