In my unittest code, i need to access some files which are part of my checkout directory.
I've done this till version 9 of teamcity with the following code:
new DirectoryInfo(Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath))
This woul've returned the Out directory of the MSBuild, and this Out directory was located within the Checkout directory.
In version 9.1.1, it seems this has changed, and will return a path below the teamcity build temp directory.
As workaround, i use currently the following code:
This will return the sourcefile path which currently is executed. Based on this path, i then can navigate to my files.
Is this change of msbuild temp directory known?
Is there an official/better way of getting the checkout directory when using mstest(Using some teamcity variables in the MSBuild c# code)?