Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Release Package Build Failing for UWP

I built a Universal App for windows 10 and I didn't know about the Native Tool chain. When I was ready to create the package I got many errors and I looked for a solution without any luck.

After a few attemps I decided to take my app, piece by piece, in a test project to see what is wrong and I get the following errors after I added the ViewModelLocator of Mvvm Light 5.2:

NUTC300F:Internal Compiler Error: Native compilation failed due to out of memory error
ILT0005: 'C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\x86\ilc\Tools\nutc_driver.exe 
    @"C:\...\Test\obj\x86\Release\ilc\intermediate\MDIL\Test.rsp"' returned exit code 1
Warning  Method 'CreateLambda' within 'System.Linq.Expressions.Expression' could not be found.
    C:\....\Test\Resources.System.Linq.Expressions.rd.xml 35 
Warning  Method 'ParameterIsAssignable' within 'System.Linq.Expressions.Expression' could not be found.
    C:\....\Test\Resources.System.Linq.Expressions.rd.xml 91 

And this is my ViewModelLocatorClass

public class ViewModelLocator
{
    public const string HeroDetailsPageName = "HeroDetails";

    public ViewModelLocator()
    {
        ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);

        var nav = new NavigationService();
        nav.Configure(HeroDetailsPageName, typeof(HeroDetails));
        SimpleIoc.Default.Register<INavigationService>(() => nav);

        SimpleIoc.Default.Register<IDialogService, DialogService>();

        if (ViewModelBase.IsInDesignModeStatic)
        {
            SimpleIoc.Default.Register<IHotSRepository, DesignDataSource>();
        }
        else
        {
            SimpleIoc.Default.Register<IHotSRepository, HotSRepository>();
        }

        SimpleIoc.Default.Register<MainViewModel>();
    }

    public MainViewModel Main => ServiceLocator.Current.GetInstance<MainViewModel>();
}

I am also using SQLite3, ef7 rc1, Newtosoft Json and HTML agility pack. I already followed all the suggestions to make EF7 compile. I deleted the obj folder, restarted Visual Studio an looked for all the thread about the problem without any luck. My machine has 16GB of memory and, looking at the task manager, I had around 50% free memory when I got the error.

I hope someone can help me some how.

Thanks,

Pippo

like image 525
Pippo46 Avatar asked Jan 24 '16 11:01

Pippo46


People also ask

Is Microsoft abandoning UWP?

Microsoft continues to baby-step around the obvious, but it has officially deprecated the Universal Windows Platform (UWP) as it pushes the desktop-focused Windows App SDK (formerly called Project Reunion) and WinUI 3 as the future of Windows application development.

What is replacing UWP?

14 January 2022. As you already know, WinUI is Microsoft's follow-up to UWP. As the successor to the UWP platform, Microsoft has invested heavily in the WinUI platform.

How do I publish my UWP app?

In Solution Explorer, open the solution for your UWP app project. Right-click the project and choose Publish->Create App Packages (before Visual Studio 2019 version 16.3, the Publish menu is named Store). If this option is disabled or does not appear at all, check that the project is a Universal Windows project.

Does UWP work on Windows 11?

UWP is one choice for creating apps that run on Windows 10 and Windows 11 devices, and can be combined with other platforms.


1 Answers

Probably, you are using a non-english UI for Visual Studio 2015 Update 2 and trying to build a release version of your UWP app.

Download the Language pack: http://go.microsoft.com/fwlink/?LinkId=647001&clcid=0x409

Credits: http://pwnd.io/uwp-release-compile-error-ilt0005/

like image 141
Magic Avatar answered Nov 03 '22 19:11

Magic