I have a C# (.Net Core) solution in visual studio 2017 RC3 that contains many projects (4 if you are curious) and that I recently migrated from the old project.json/visual studio 2015 format by using VS 2017 RC3.
One of the projects is a test project, in which I need to access some files contained under it.
It seems that Directory.GetCurrentDirectory()
cannot be relied upon to get the projects path in the test code, since tests , in VS 2017, are ran from the IDE's installation location C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE
.
Currently I am working around this by hard-coding the test project's base path. As this is not ideal, is there an alternative to programatically get the base path of a project in VS 2017 RC3?