Is there a way to change the preprocessor directive based on the testEnvironment of a unit test?

Anonymous
2023-08-24T09:00:54.2933333+00:00

Hello, I'm a developer using remote configurations for unit tests. I'd like the preprocessor to change every time I modify the environment defined in the testEnvironment.json file from the Test Explorer. Is there a way to do this?

thank you.

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,575 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,829 questions
Remote Desktop
Remote Desktop
A Microsoft app that connects remotely to computers and to virtual apps and desktops.
4,370 questions
Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying tests as a means of analysis or diagnosis.
336 questions
{count} votes