Cannot MSBUIL Xamarin.Mac Cocoa apps from Windows. Missing Xamarin.Mac.XM45.targets

XavierRigauXavierRigau USMember ✭✭

Is this error known?

The imported project "C:\Program Files (x86)\MSBuild\Xamarin\Mac\Xamarin.Mac.XM45.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. C:\Program Files (x86)\MSBuild\Xamarin\Mac\Xamarin.Mac.Common.targets

Best Answers

Answers

  • XavierRigauXavierRigau USMember ✭✭

    I retargeted to Mobile but now it throws a runtime System.NotSupportedException exceptions saying that
    private static Mutex _mutex = new Mutex(false, @Blarg)

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    What do you mean it throws? You can't actually run any XM things on Windows? Is the build throwing?

  • XavierRigauXavierRigau USMember ✭✭

    The Cocoa app when I try to run in from Xamarin Studio on the Mac.

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    Wait a second? Are you building a library or an application from Windows? I am completely unclear on what the problem is.

    Please spell out exactly the use case you have, the issue, and full error details.

  • XavierRigauXavierRigau USMember ✭✭

    I had a Solution.sln file for Mac OS X
    It was building fine from Xamarin Studio Mac
    I tried to build it on a Windows machine with Xamarin installed using MSBUILD and a Mac as a server.
    It gave error C:\Program Files (x86)\MSBuild\Xamarin\Mac\Xamarin.Mac.XM45.targets
    I retargeted per your suggestion to Xamarin.Mac Mobile Framework
    Now it builds fine in Xamarin Studio Mac but when I debug it throws the exception.
    Does it make sense?

  • XavierRigauXavierRigau USMember ✭✭

    I am trying to find the bug for Xamarin.mac but I can find it.

    It is imperative that our Cocoa apps can use a globally (to the system) named Mutex. Otherwise we can clobber a file that we are sharing.

    It is also paramount that we can build Mac OS binaries from Windows for development and for production.

    Therefore we need either to target XM 4.5 or have named objects work in XI's BCL. Either solution is fine.

    Should I submit a bug or you prefer to do it?

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    You are welcome to file a bug (it's better when customers do so that way they are on the CC by default).

    Please note however that the VS support for Xamarin.Mac current use case is to build shared libraries used on multiple platforms.

    Building full Xamarin.Mac applications require round tripping to a Mac (clang to build launcher application, ibtool for storyboard, etc) and I am uncertain how much support (if any) we have there.

    See https://developer.xamarin.com/releases/vs/xamarin.vs_4/xamarin.vs_4.2/#xammac

    So you might need to make other plans.

  • XavierRigauXavierRigau USMember ✭✭

    I understand the major limitation on Xamarin having to round trip to a Mac to build. This was understood from adoption. Now the requirement, use case I have is this:

    1. Build a Cocoa app and libraries from a PC using a Mac server
    2. Said Cocoa app and libraries require system-wide name Mutex

    Per your suggestion I retargeted from XM45 to XM Mobile to address 1. but it now breaks 2.

    Your advise is appreciated.

Sign In or Register to comment.