I have a problem, I cannot find a way to detect windows version at compilation time.
My purpose is to create an executable that depend on Interface, which are defined on
You should really turn this around. It is better to solve this at runtime. What you can do:
Windows10Implementation
class, which calls INetFwRule3
);Environment.OSVersion
and create the implementation class for that specific platform.If necessary, you can split off the implementations in separate class libraries, so you don't always have to load OS specific stuff, but only when you need it.