I have a Xamarin.Forms project and I drag and drop an image to my Android resources folder, then I copied it and pasted it in my UWP Project, but the image doesnt display, so I changed its build action to Content, but it displays the error:
Error The item "obj\Debug\MainPage.xaml.g.cs" was specified more than once in the "Sources" parameter. Duplicate items are not supported by the "Sources" parameter. XamaTask.Android
Im not sure if its related with the images, but after I duplicated,renamed and changed that build action property the error started to show , I also deleted the images and renamed more times again and checked my Android.csproject but I dont find any duplicated item.
Edit
I have found the file that have the error, but Again, I dont find any duplicated, here it is the code:
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
[assembly: global::Xamarin.Forms.Xaml.XamlResourceIdAttribute("XamaTask.Droid.MainPage.xaml", "MainPage.xaml", typeof(global::XamaTask.MainPage))]
namespace XamaTask {
[global::Xamarin.Forms.Xaml.XamlFilePathAttribute("C:\\Users\\M\\source\\repos\\XamaTask\\XamaTask\\XamaTask\\MainPage.xaml")]
public partial class MainPage : global::Xamarin.Forms.ContentPage {
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Forms.Build.Tasks.XamlG", "2.0.0.0")]
private void InitializeComponent() {
global::Xamarin.Forms.Xaml.Extensions.LoadFromXaml(this, typeof(MainPage));
}
}
}
Error The item "obj\Debug\MainPage.xaml.g.cs" was specified more than once in the "Sources" parameter. Duplicate items are not supported by the "Sources" parameter. XamaTask.Android
Im not sure if its related with the images, but after I duplicated,renamed and changed that build action property the error started to show , I also deleted the images and renamed more times again and checked my Android.csproject but I dont find any duplicated item.
Edit
I have found the file that have the error, but Again, I dont find any duplicated, here it is the code:
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
[assembly: global::Xamarin.Forms.Xaml.XamlResourceIdAttribute("XamaTask.Droid.MainPage.xaml", "MainPage.xaml", typeof(global::XamaTask.MainPage))]
namespace XamaTask {
[global::Xamarin.Forms.Xaml.XamlFilePathAttribute("C:\\Users\\M\\source\\repos\\XamaTask\\XamaTask\\XamaTask\\MainPage.xaml")]
public partial class MainPage : global::Xamarin.Forms.ContentPage {
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Forms.Build.Tasks.XamlG", "2.0.0.0")]
private void InitializeComponent() {
global::Xamarin.Forms.Xaml.Extensions.LoadFromXaml(this, typeof(MainPage));
}
}
}