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

Visual Studio-2015xamarin.forms

Visual Studio-2015 Problem Overview


I am new to Xamarin platform, and am facing the error

Build action 'EmbeddedResource' is not supported by one or more of the project's targets. Am debugging in emulator 8.1 for windows phone, and my project is a Xamarin.form(portable).

Visual Studio-2015 Solutions


Solution 1 - Visual Studio-2015

Follow these steps:

  1. Update Xamarin.Forms from Nuget Package Manager
  2. Close Solution And Open In Run As Administrator mode
  3. Clean And Rebuild Solution.Now Try To Deploy Project

Solution 2 - Visual Studio-2015

Right click on your project (which is cross-platform probably), from the Project menu, do UNLOAD PROJECT and then RELOAD PROJECT, and rebuild, the errors will all be gone.

Solution 3 - Visual Studio-2015

  1. Clean the solution
  2. Update the Xamarin.forms nuget package
  3. Restart VS
  4. Re-build the project

Solution 4 - Visual Studio-2015

For Android, make sure your Target device uses the same Platform set on 'Target Framework' on Application Settings.

[Target for the Application1

You can add new platforms in the SDK Manager.

Solution 5 - Visual Studio-2015

open solution on VS with administrator mode and rebuild each one by one.

Solution 6 - Visual Studio-2015

Also was receiving this when the Windows path was over 260 characters with fully qualified file name. Look in the output of the build and if you see a message about file length over 260, move your project to shorter directory path.

Solution 7 - Visual Studio-2015

Option 1:

  1. Update Xamarin.Forms from Nuget Package Manager
  2. Close Solution Open In Run As Administrator mode.
  3. Clean And Rebuild Solution

In case it does not work, please follow option 2:

  1. Close Solution And Open In Run As Administrator mode.
  2. Re-install Xamarin.Forms from Nuget Package Manager
  3. Clean And Rebuild Solution

Solution 8 - Visual Studio-2015

Go to the android project-> click right >properties> select Application-> select compile using Android version (6/5/4...etc) -> then save and rebuilt and run.

Solution 9 - Visual Studio-2015

Solution 10 - Visual Studio-2015

I recently faced the same error in the following situation (Xamarin.Android + .NET Standard Library (converted from a PCL)):

I had some classes in a .NET Standard project that had Data Annotations for public types. I installed the nuget package that contained the Data Annotations in my .NET Standard Library. Installing it into my Android Project, too, fixed the issue that you described.

Solution 11 - Visual Studio-2015

In VS 2015 Professional:

  1. right click on the image under your project
  2. select properties
  3. choose Embedded Resource for Build Action
  4. in your code behind file type under InitializeComponent() method the following code image.Source = ImageSource.FromResource("YourProjectName.YourFolderName.YourImage");
  5. save everything
  6. Build solution
  7. close VS
  8. open project and run again

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionArunView Question on Stackoverflow
Solution 1 - Visual Studio-2015Neelam PrajapatiView Answer on Stackoverflow
Solution 2 - Visual Studio-2015Lin Song YangView Answer on Stackoverflow
Solution 3 - Visual Studio-2015IeuanWView Answer on Stackoverflow
Solution 4 - Visual Studio-2015Vagner GonView Answer on Stackoverflow
Solution 5 - Visual Studio-2015GhebrehiywetView Answer on Stackoverflow
Solution 6 - Visual Studio-2015Joe HealyView Answer on Stackoverflow
Solution 7 - Visual Studio-2015Nhan PhanView Answer on Stackoverflow
Solution 8 - Visual Studio-2015Pankaj GuptaView Answer on Stackoverflow
Solution 9 - Visual Studio-2015Andy JoinerView Answer on Stackoverflow
Solution 10 - Visual Studio-2015Andre KraemerView Answer on Stackoverflow
Solution 11 - Visual Studio-2015Olesya PolonskayaView Answer on Stackoverflow