pensa.blogg.se

Vb net 2010 console application get startup path
Vb net 2010 console application get startup path











vb net 2010 console application get startup path

It is extraordinary that it takes this much effort to find this out. Is this one right? If I use that, can I (somehow) package my little executable with my web application and run it from that directory? And if the answer to that is yes, is there some magic to putting that executable in that directory? Location() gives C:\Users\username\AppData\Local\Temp\Temporary ASP.NET Files\root\fe508d91\60a8c65a\assembly\dl3\b72b7ebd\60f25a6c_b1c2ca01\WebApplication2.DLL at runtime, so that's not it either.Ī gives C:\Users\username\Documents\Visual Studio 2008\Projects\WebApplication2\WebApplication2\ at runtime in my development environment, and that seems to hold the most promise. Likewise, if I type "Application.s" into the editor, it gives me "Set" and "StaticObjects" as options, but no "Startup" or "Startup()".Įnvironment.CurrentDirectory gives C:\Windows\system32 at runtime in my development environment that's not it. If I type "My." into my Visual Studio editor, for instance, it gives me Computer and User, but not Application, as options, so I gather I cannot use My.Application for anything. Many of the answers given in this thread and other places so far don't seem to fit my environment. It would seem to make sense to put it in the same place as the EXE and DLL files containing the web application, but I don't know how to access it after that. I want to execute an external program to perform a function for the user, so I need to put the executable somewhere that is independent of its installation machine and accessible by my code. NET web application in visual studio 2008. This is an interesting thread, not least because of all the effort put in so far that still doesn't answer my particular question. net newbie, though experienced in other languages and technologies.













Vb net 2010 console application get startup path