-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Open
Description
Sometimes we want to conditionally reference dlls:
<Reference Include="NetVips.Native.linux-x64.dll" Version="8.9.1" Condition="$([MSBuild]::IsOsPlatform('Linux'))" />
<Reference Include="NetVips.Native.osx-x64.dll" Version="8.9.1" Condition="$([MSBuild]::IsOsPlatform('OSX'))" />
<Reference Include="NetVips.Native.win-x64.dll" Version="8.9.1" Condition="$([MSBuild]::IsOsPlatform('Windows'))" />
e.g. https://stackoverflow.com/a/60401988/13331441 although on PackageReference, which is not supported in ScriptCompilations directly but its available in https://github.com/filipw/dotnet-script (this is an extension to the roslyn CSharpScript).
So we should be able to write something like #r "NetVips.Native.win", Windows, or someone more general and correct :)