Closed hvanbakel closed 9 years ago
@srivatsn @mavasani This is where analyzer options would come in handy.
@hvanbakel One option is to create an MSBuild task that writes the framework version to a file, and then include that as an additional file. The analyzer could then read the value from the file. Admittedly not very straightforward (my MSBuild skills are not good enough to explain in detail how to do it) but it is possible.
This would a part of #3798. We'll just use that issue to track the larger problem.
See also: https://social.msdn.microsoft.com/Forums/vstudio/en-US/58bb72c4-ed10-4965-81a4-a4950d6ccbdc/targeted-net-framework-version?forum=roslyn
It would be useful to be able to determine the framework version that is targeted. An example of a use case, some analyzers might apply (or not) to a specific framework version.