DeploymentItem path in .NET Core/Linux
Description
Trying to use [DeploymentItem("..\..\File.zip"] - relative path outside the current test class' path - On both Windows and Linux in .NET Core 3.0 leads to errors in either one or both.
Steps to reproduce
Create a new .NET Core 3.0 Unit Test project with MSTest 2.0 (adapter and framework).
Add an [DeploymentItem] attribute with a relative path OUTSIDE/UPWARDS of the unit test project location.
Expected behavior
The item to be deployed exists in the runtime/working folder of the unit test project.
Actual behavior
Using backslash notation: Windows works, Linux fails to find the item, emitting a warning. Using slash notation: Both fail to find the item (and the warning makes it seems like it ignored the given path and is looking for the item in bin/debug or whatever equiv configuration is used).
Environment
MSTest 2.0 adapter and framework, NET Core 3.0.101.
- Windows 10 1909, VS19 Preview 16.4
- CentOS 7 on WSL (Ubunutu and Debian show the same), VSCode 1.40.2 (Remote WSL execution) or dotnet cli via bash.
Hmm seeing this issue with latest mstest version still, had this really not been resolved? @ransagny did you find a solution?
@nietras As far as i can tell in our codebase, we don't have any more of these - only relative paths to sub-directories, which seems to work fine, so our solution was to just use something else, sadly.
Closing this issue as it is duplicated by #1460.