Run action in Visual Studio

I am developing a ClassLibrary-Project in Visual Studio 2008. I want to check something. I have an index.html file in the root of my project. I need to install StartAction to open this file using some browser. I found StartAction in "Project Properties -> Debugging -> Launch Action". I can choose "Launch an external program" or "Launch a browser with a URL", but they require an absolute path to my file. I want to do this with a relative path (e.g. $ (ProjectDir) index.html '). How can i do this?

+4
source share
1 answer

Unfortunately, none of the Visual Studio macros are replaced in the Run External Program menu of Debug. It also appears that relative paths are being examined from the location of devenv.exe. I do not know if this is 100% true, but it seems to be an experiment.

I think your best bet at this point is hard path coding. The path is stored in a user-specific project file, and is usually a machine-specific file. Most source code providers do not check this by default for this reason, so you won’t ruin the work of other developers.

+1
source

Source: https://habr.com/ru/post/1299954/


All Articles