Build action 'EmbeddedResource' is not supported by one or more of the project's targets

AdrianKnightAdrianKnight USMember ✭✭✭✭

Every now and then I've been getting "Build action 'EmbeddedResource' is not supported by one or more of the project's targets." error during compilation. I have a bunch of png files stored in PCL as embedded resource files. Has anyone come across a similar issue before? Today, I can't clear out the errors by rebuilding the solution. Usually it works but not today :(

Answers

  • clamumclamum USMember
    edited April 2016

    I am getting two of this error when trying to compile the iOS project for the Xamarin "Todo" sample application/solution that I downloaded from GitHub.

    I'm also getting these as errors:
    CS0103 The name 'InitializeComponent' does not exist in the current context E:\Documents\Visual Studio 2015\Projects\xamarin-forms-samples-master\Todo\PCL\Todo\Views\TodoItemListX.xaml.cs
    CS0103 The name 'listView' does not exist in the current context E:\Documents\Visual Studio 2015\Projects\xamarin-forms-samples-master\Todo\PCL\Todo\Views\TodoItemListX.xaml.cs
    CS0103 The name 'InitializeComponent' does not exist in the current context E:\Documents\Visual Studio 2015\Projects\xamarin-forms-samples-master\Todo\PCL\Todo\Views\TodoItemPageX.xaml.cs

    Would be nice if the sample solution compiled, but maybe it's just something dumb I'm missing (first time playing with Xamarin).

    EDIT: Ok, scratch that. I cleaned the "Todo (portable)" project (once I realized the structure of the solution and that the Todo.iOS "project" was just a Target) and built it and it worked fine. I chose an iPhone version and hit Debug and it started the emulator on my MacBook. Very slick. Can't wait to dig into this cross-platform dev with Xamarin!

  • SreeeeSreeee INMember ✭✭✭✭✭

    How you solve this issue? I also have the same issue :)

  • AdrianKnightAdrianKnight USMember ✭✭✭✭

    @Sreeee This was posted in 2016. Since then, I've started using VS2017. I'm still getting the issue there but less frequently. Try closing VS and running it again. Clean and rebuild. Make sure no code files especially XAML are open in the editor.

  • SinghsumitSinghsumit INMember ✭✭

    Follow these steps:

    Update Xamarin.Forms from Nuget Package Manager
    Close Solution And Open In Run As Administrator mode
    Clean And Rebuild Solution.Now Try To Deploy Project
    
Sign In or Register to comment.