I want to set an AssemblyAttribute with an enum parameter in the .csproj file. How do I achieve that?
I am aware that I can set it the following way within a file:
[assembly: TestDataSourceDiscovery(TestDataSourceDiscoveryOption.DuringExecution)]
However, I want to distribute this via NuGet (in build/MyPackage.props) and hence want to declare it there the following way (as most people do it with InternalsVisible):
<AssemblyAttribute Include="Microsoft.VisualStudio.TestTools.UnitTesting.TestDataSourceDiscoveryAttribute">
<_Parameter1>Microsoft.VisualStudio.TestTools.UnitTesting.TestDataSourceDiscoveryOption.DuringExecution</_Parameter1>
</AssemblyAttribute>
I do get the error CS1503 stating
Argument 1: cannot convert from 'string' to 'Microsoft.VisualStudio.TestTools.UnitTesting.TestDataSourceDiscoveryOption'
How can I provide the parameter value as TestDataSourceDiscoveryOption enum?