mhutch / MonoDevelop.AddinMaker

Extension to make it easier to create Visual Studio for Mac / MonoDevelop extensions
MIT License
50 stars 26 forks source link

Build Error: When using with Xamarin.Forms #72

Open ghost opened 5 years ago

ghost commented 5 years ago

When trying to using Xamairn.Forms to create addin UI. I am getting following build error:

Error MSB4096: The item "obj/Debug/net461/_Manifest.addin.xml" in item list "EmbeddedResource" does not define a value for metadata "TargetPath". In order to use this metadata, either qualify it by specifying %(EmbeddedResource.TargetPath), or ensure that all items in this list define a value for this metadata.

This was working fine until 0.4.3 so my best guess is it is caused by this commit: https://github.com/mhutch/MonoDevelop.AddinMaker/commit/dd120380b91c00414c0bcd39498b077e84d41ab9#diff-bdc8ea55a71e0c73099996196023e145

Steps To Reproduce:

  1. Create a new addin project
  2. Add the following code in the csproj file:
<Target Name="DisplayMessages" BeforeTargets="BeforeCompile">
      <ItemGroup>
        <Message Include="@(EmbeddedResource)" Condition="'%(TargetPath)' != ''" />
        </ItemGroup>
 </Target>

Similar kind of code is used by Xamarin.Forms build task.

MBrekhof commented 4 years ago

Got the same problem just now, has this ever been solved in some way?

matthewrdev commented 4 years ago

Author of mfractor here. I strongly recommend that you do not use Xamarin.Forms to build your UIs in VS Mac; instead use XWT of AppKit. I found Xamarin.Forms caused issues in MFractors build chain and ultimately chose to remove it.

@MBrekhof Are you using Xamarin.Forms in your extension? Do you have a small sample project that triggers this error?

MBrekhof commented 4 years ago

Hi Matthew Basically the error is already triggered by creating a new project/solution without any coding from me.

praeclarum commented 4 years ago

Just chiming in to say I would love to use Forms too and would love a solution to this.