Closed olivegamestudio closed 4 years ago
@safern @ViktorHofer is there some conditional statement that can be used here?
I don't think there is a way to know if the tfm is supported for the current built OS via a property. However there is a property that MSBuild populates to tell you which OS you're building on. So basically you could condition based on that.
You could do something like:
<PropertyGroup>
<TargetFrameworks>xamarinios10;monoandroid71</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">$(TargetFrameworks);net461;uap</TargetFrameworks>
</PropertyGroup>
What @safern says makes most sense. Community members ued the same mechanism for .NET Framework back when reference assemblies weren't available for it.
Closing as question is answered. Feel free to reopen if you disagree.
I'm trying to multi-targeting on my Mac, and I can do the first three targets but UAP is a non-starter.
Is there anyway to ignore this platform if it doesnt exist? Is there another way to do this without creating another project? Is there something i missed a different target perhaps?
I apologise if this is not the right location for this issue.
Example: