I am try to make appx file in release mode when I try to do that I see that below error.
Error: NUTC1056:Internal Compiler Error: 0x8000ffff. Error encountered while compiling method 'instance System.Void MyProject.Views.DetailPage.InitializeComponent()'. MyProject.UWP
Error ILT0005: 'C:\Users\me.nuget\packages\microsoft.net.native.compiler\2.0.3\tools\x64\ilc\Tools\nutc_driver.exe @"D:\MyProject\MyProject.UWP\obj\x64\Release\ilc\intermediate\MDIL\MyProject.UWP.rsp"' returned exit code 1 MyProject.UWP
When I try to comment [XamlCompilation(XamlCompilationOptions.Compile)]
this than it build proper but after that when I try to run that page it crashes every time.
I check that page's proprties build action is same as all pages and that is Embedded resource
and custom tool is MSBuild:UpdateDesignTimeXaml
It works in debug mode with uncomment this. [XamlCompilation(XamlCompilationOptions.Compile)]
I attached my code here:
DetailsPage.xaml
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class=" MyProject.Views.DetailsPage"
xmlns:local="clr-namespace: MyProject"
Title="Details Page">
<ContentPage.ToolbarItems>
<ToolbarItem Icon="EditIcon" Order="Primary" Priority="1"/>
</ContentPage.ToolbarItems>
<ContentPage.Content>
<local:ExtendedScrollView>
<StackLayout x:Name="MainStack">
<Entry Text="{Binding NameDetails}"/>
</StackLayout>
</local:ExtendedScrollView>
</ContentPage.Content>
</ContentPage>
DetailPage.xaml.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MyProject.ViewModels;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
using Xamarin.Forms.PlatformConfiguration.iOSSpecific;
namespace MyProject.Views
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class DetailPage : ContentPage
{
DetailPageViewModel viewModel;
public DetailPage()
{
InitializeComponent();
On<Xamarin.Forms.PlatformConfiguration.iOS>().SetUseSafeArea(true);
BindingContext = viewModel = new DetailPageViewModel();
viewModel.ShowAlert += ViewModel_ShowAlert;
}
}
}
Can anyone look into this and suggest me what should I have to change in code or configuration?
User contributions licensed under CC BY-SA 3.0