Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSBuild cannot detect MacOSX #77

Closed
takuya-takeuchi opened this issue Jan 14, 2019 · 2 comments
Closed

MSBuild cannot detect MacOSX #77

takuya-takeuchi opened this issue Jan 14, 2019 · 2 comments
Assignees

Comments

@takuya-takeuchi
Copy link
Owner

Summary of your issue

In build/DlibDotNet.Native.props, $(OS) does not work on MacOSX.
dotnet/msbuild#538

It does not occur errror.
Because *.so and *.dylib will be copied porperly.
But *.so files are extra and it consumes disk space.

Environment

On MacOSX.

@valerysntx
Copy link
Contributor

Consider using $([MSBuild]::IsOsPlatform("osx"))) put into Condition= attribute, like

 <PropertyGroup>
    <OsEnvironment Condition="$([MSBuild]::IsOSPlatform('windows'))">windows</OsEnvironment>
    <OsEnvironment Condition="$([MSBuild]::IsOSPlatform('linux'))">linux</OsEnvironment>
    <OsEnvironment Condition="$([MSBuild]::IsOSPlatform('osx'))">osx</OsEnvironment>

    <OsUnixLike>false</OsUnixLike>
    <OsUnixLike Condition="$([MSBuild]::IsOsUnixLike())">true</OsUnixLike>

taken from Directory.Build.props in Microsoft/msbuild repo

Also, here is much longer version, found around

   '$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform(
                $([System.Runtime.InteropServices.OSPlatform]::OSX))
    )' 

@takuya-takeuchi
Copy link
Owner Author

Close by e096e96

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants