Forum Cross Platform with Xamarin

Error - "cannot find an existing platform WinMd location"

System - Win 10 pro, OS build 10586.494.
Visual Studio 2015 community 14.0.25424.00 Update 3

Created cross-platform solution. "Welcome to Xamarin forms", default code, no changes. Built ok. Tested Droid and ran fine, welcome message showed. Changed startup project to UWP. Went to run it, got the error "Cannot find an existing platform WinMD location". error shows 'File' as "C:\Program Files (x86)\MSBuild\Microsoft.NetNative\Microsoft.NetNative.targets"...the file does exist. The error points to line 454 (the 'error condition' line shown below (last line), from the mentioned file)...

  <AppLocalMetadataFile Include="@(_IlcInputPayload)" Condition="'%(TargetPath)' == 'WinMetadata\Windows.winmd'" />

  <Copy SourceFiles="@(_IlcInputPayload)"
  <Output TaskParameter="DestinationFiles" ItemName="FileWrites" />

<!-- If an app-local Windows.winmd was found, we want to defer to it for platform metadata -->
<PropertyGroup Condition="Exists('$(_IlcInputPath)WinMetadata\Windows.winmd')">
<PropertyGroup Condition="'$(_TargetPlatformMetadataPath)' == '' and Exists('@(UnionWinmdPath)')">
<PropertyGroup Condition="'$(_TargetPlatformMetadataPath)' == '' and Exists('$(TargetPlatformWinMDLocation)')">

I admit to being new to this. I do not have a MAC system, so when creating the solution, a message about "not fining a MAC" appears, and I close it out. In the solution configuration manager, IOS is not being built or deployed. Not sure if this has anything to do with this.

Now, (even if I change the startup project back to droid), the solution will not build keeps failing in UWP with the same error.
For the heck of it (being new and will try anything), removed the IOS and 8.1 projects from the solution, still same will not build.

Created new solution, without testing the Droid project, went straight to the UWP project, same error. Initially builds ok, then error when trying to run, than will not build anymore.

It does not matter if I select to build for x86 or X64. when building Debug, get error here...
if (global::System.Diagnostics.Debugger.IsAttached) global::System.Diagnostics.Debugger.Break();

So, when selection the UWP project as the starting project, this does something to my system???


  • louwholouwho USMember ✭✭✭

    I set up a Hyper-V VM, with win 10, and VS 2015, and tried a cross-platform solution there, and it worked! That system has this file "C:\Program Files (x86)\Windows Kits\10\UnionMetadata\Windows.winmd (4082 kb)", whereas my desktop did not.
    I copied the files from the VM to my desktop, and tried again, and the cross-platform solution now works on my desktop...go figure. I have no idea of what should have put this file on my desktop, and\or, why it is missing. Anyone have any ideas?

Sign In or Register to comment.