Build action 'EmbeddedResource' is not supported by one or more of the project's targets
Visual Studio-2015xamarin.formsVisual 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:
- 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
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
- Clean the solution
- Update the Xamarin.forms nuget package
- Restart VS
- 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.
[
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:
- Update Xamarin.Forms from Nuget Package Manager
- Close Solution Open In Run As Administrator mode.
- Clean And Rebuild Solution
In case it does not work, please follow option 2:
- Close Solution And Open In Run As Administrator mode.
- Re-install Xamarin.Forms from Nuget Package Manager
- 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
Upgrade VS to Visual Studio 2015 Update 3
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:
- right click on the image under your project
- select properties
- choose Embedded Resource for Build Action
- in your code behind file type under
InitializeComponent()
method the following codeimage.Source = ImageSource.FromResource("YourProjectName.YourFolderName.YourImage");
- save everything
- Build solution
- close VS
- open project and run again