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