MonoDevelop.AddinMaker icon indicating copy to clipboard operation
MonoDevelop.AddinMaker copied to clipboard

Build Error: When using with Xamarin.Forms

Open ghost opened this issue 6 years ago • 4 comments

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.

ghost avatar May 28 '19 00:05 ghost

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

MBrekhof avatar Jan 22 '20 13:01 MBrekhof

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?

matthewrdev avatar Jan 22 '20 16:01 matthewrdev

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

MBrekhof avatar Jan 22 '20 19:01 MBrekhof

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

praeclarum avatar Jun 28 '20 17:06 praeclarum