Closed jdb0123 closed 1 month ago
@jdb0123 I don't think this is a supported scenario currently. The fact that it works with the Reqnroll runtime is just a lucky coincidence.
What would be your proposed solution for finding the config file in the plugin?
@gasparnagy I think it should be possible to look in the project folder, if not present see if reqnroll.json (or consorts) are present in the project file. Then follow that path and use that file.
@jdb0123 That would make sense, but unfortunately there are so many ways to "include" a file to a project (different patterns, different file includes, Directory.Build.props
, etc.). Actually even Reqnroll loads the JSON file in a quite strange way (see ReqnrollJsonLocator). Maybe instead of trying to detect the file include in the project file, we should check if the file exists at the same locations where Reqnroll checks it. (That would require a compilation to copy the file, but after that it would work.) So basically the checking mechanizm that you included would need to be extended by checking the output directory (e.g. bin/Debug/net8.0
) as well.
Do you want to try and send a PR for that?
That sounds like a plan. Will give that a shot soon.
@gasparnagy Took a bit longer than expected to start on it. Changes can be found in #31
@jdb0123 Super, thx! I did a review on the PR.
Fixed by #31 , I will release it tomorrow.
@gasparnagy would it be possible to release this change, or it is still waiting on some other change?
@jdb0123 sorry for the delay. I try to do it today.
It is out now: v2024.3.152
Used Visual Studio
Visual Studio 2022
Are the latest Visual Studio updates installed?
Yes
Content of reqnroll.json (if present)
No response
Issue Description
The ReqnRoll package allows to place the
reqnroll.json
in other locations than the project folder. However not all supported locations for thereqnroll.json
in the package are valid for the visual studio extension.The extension only seems to check the project folder.
Steps to Reproduce
reqnroll.json
in a parent folder of the projectLink to a project repository that reproduces the issue
No response