Duplicate Xaml Compilation Attribute error

ziggyziggy Member ✭✭
edited March 2019 in Xamarin.Forms

Hello, I added the following code in my code "[assembly: XamlCompilation(XamlCompilationOptions.Compile)]" and I get the duplicate Xaml
Compilation Attribute error. Any reason why?

 using Xamarin.Forms.Xaml;

 [assembly: XamlCompilation(XamlCompilationOptions.Compile)]

 namespace QuickFlicks
 {
     public partial class MainPage : ContentPage
     {
         public MainPage()
         {
             InitializeComponent();
         }
     }
 }

Best Answer

Answers

  • seanalfordseanalford Member ✭✭
    edited January 21

    For those of you using the newer project templates it's now declared in AssemblyInfo.cs.

    AssemblyInfo.cs

    using System.Resources;
    using Xamarin.Forms.Xaml;
    
    [assembly: XamlCompilation(XamlCompilationOptions.Compile)]
    [assembly: NeutralResourcesLanguage("en-US")]
    
Sign In or Register to comment.