Referenced native libraries getting pre-compiled and then throwing exception

Hi I have an issue in the universal app. I am referencing Nokia.Graphics.Imaging.dll and WindowsPreview.Media.Ocr.dll in the universal app project. Everything compiles and runs on every device I tested it with. The problem is that after some time NGen kicks
in and pre-compiles my DLLs, including the native ones. These DLLs then get corrupt and next time I run the app I get BadImageFormatException due to an attempt to load the <nativelibrary>.ni.dll. Is this a bug of NGen? When I delete these <nativelibrary>.ni.dll
files the app runs again.

Hi, unfortunately, I was not able to simulate this behavior in another project so far. Here
http://uloz.to/xRShw487/precompiled-zip are NGENed files from our application (_not_working folder) and from a filter-manager sample (_working from different_app). As you can see for some reason Lumia.Imaging.ni.dll
in our app has only 796kB, while from the other app it has 1235kB.
The NGEN log file looks ok to me:
03/23/2015 15:18:24.272 [11796]: 1>    Compiling assembly C:\Program Files\WindowsApps\app\Lumia.Imaging.Managed.DLL (CLR v4.0.30319) ...
03/23/2015 15:18:24.350 [11796]: ngen returning 0x00000000
03/23/2015 15:18:25.334 [24168]: 1>    Compiling assembly C:\Program Files\WindowsApps\app\WindowsPreview.Media.Ocr.winmd (CLR v4.0.30319) ...
03/23/2015 15:18:25.365 [24168]: ngen returning 0x00000000
03/23/2015 15:18:25.444 [8036]: 1>    Compiling assembly C:\Program Files\WindowsApps\app\Lumia.Imaging.winmd (CLR v4.0.30319) ...
03/23/2015 15:18:25.725 [8036]: ngen returning 0x00000000
Once I delete Lumia.Imaging.ni.dll and WindowsPreview.Media.Ocr.ni.dll, the app starts working again. Lumia.Imaging.Managed.DLL seems to be OK and does not cause any troubles, maybe because it is managed, while both of the problematic DLLs are native already.
Hi LVolf,
>>I am referencing Nokia.Graphics.Imaging.dll and WindowsPreview.Media.Ocr.dll in the universal app project
How did you add these references in your project? Basically, the NuGet package is the easiest way, for example:
See the
NuGet documentation for all the ways you can download and install the NuGet package in your project. To install the package from within Microsoft Visual Studio, do the following:
1.In Visual Studio, select PROJECT | Manage NuGet Packages.
2.In the Online section, select nuget.org. Search for 
Microsoft.Windows.Ocr.
3.Click Install.
4.Select BUILD | Configuration Manager to change the build configuration of your project from
AnyCPU to x86, x64, or  ARM.
5.If Intellisense does not work after you have installed the NuGet package, unload and reload the Visual Studio project. In Solution Explorer, right-click the project and select
Unload Project. Then right-click the project again and select 
Reload Project.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • The file '/foo.aspx' has not been pre-compiled, and cannot be requested

    Hi All
    I am using odp .net to access oracle data. I have also added oracle.dataaccess in my asp .net references. Everything works fine in my development and when I run the code through debugger. However, when I deploy the project in IIS, it gave me following error...
    "The file '/foo.aspx' has not been pre-compiled, and cannot be requested
    This is pretty generic error and I found out this is related to .Net assemblies.
    By further investigation, I found that oracle.dataacess.dll is not present in the bin directory of a deployed web site. I am not sure why .net is dropping that dll in the deployment wizard.
    Did anyone encounter this problem before?
    I got a workaround for now that manually copting dll into the bin directory of deplyed web site. However, I am looking for more robust and technical answer..
    The strange thing is I have been deploying the web site the same way for last 8 months and never encountered this problem.
    thanks a lot..
    Message was edited by:
    amazon

    If you add a reference to Oracle.DataAccess at design time it will be added as an assembly definition to web.config. Then you don't need a copy in your bin dir and it will be found in the GAC.
    Eric

  • Will not share Imovie with Idvd. Gets so far and then a box saying Unable  to prepare project for publishing because an error occured (-41)

    Cannot SHARE project from IMovie to Idvd. Gets so far and then a box with a message saying Unable to prepare project for publishing because an error occured (-41).

    Bengt is as always entirely correct, but another meaning of error -41 is that you have chosen the wrong encoding setting for the length of video you have:
    iDVD encoding settings:
    http://support.apple.com/kb/HT1502?viewlocale=en_US
    Short version:
    Best Performance is for videos of up to 60 minutes
    Best Quality is for videos of up to 120 minutes
    Professional Quality is also for up to 120 minutes but even higher quality (and takes much longer)
    That was for single-layer DVDs. Double these numbers for dual-layer DVDs.
    Professional Quality: The Professional Quality option uses advanced two-pass technology to encode your video (The first pass determines which parts of the movie can be given greater compresson without quality loss and which parts can’t.  The second pass then encodes those different parts accordingly) , resulting in the best quality of video possible on your burned DVD. You can select this option regardless of your project’s duration (up to 2 hours of video for a single-layer disc and 4 hours for a double-layer disc). Because Professional Quality encoding is time-consuming (requiring about twice as much time to encode a project as the High Quality option, for example) choose it only if you are not concerned about the time taken.
    In both cases the maximum length includes titles, transitions and effects etc. Allow about 15 minutes for these.
    You can use the amount of video in your project as a rough determination of which method to choose. If your project has an hour or less of video (for a single-layer disc), choose Best Performance. If it has between 1 and 2 hours of video (for a single-layer disc), choose High Quality. If you want the best possible encoding quality for projects that are up to 2 hours (for a single-layer disc), choose Professional Quality. This option takes about twice as long as the High Quality option, so select it only if time is not an issue for you.
    Use the Capacity meter in the Project Info window (choose Project > Project Info) to determine how many minutes of video your project contains.
    NOTE: With the Best Performance setting, you can turn background encoding off by choosing Advanced > “Encode in Background.” The checkmark is removed to show it’s no longer selected. Turning off background encoding can help performance if your system seems sluggish.
    And whilst checking these settings in iDVD Preferences, make sure that the settings for NTSC/PAL and DV/DV Widescreen are also what you want.
    http://support.apple.com/kb/HT1502?viewlocale=en_US

  • I have a Macbook Pro that I have just renewed and transferred over my old hard drive (also from a Macbook Pro). Now when I turn on the computer and ITunes opens I get error (-50) and then error 5002 when I try to sign in to ITunes Store - Help!

    I have a Macbook Pro that I have just renewed and transferred over my old hard drive (also from a Macbook Pro). Now when I turn on the computer and ITunes opens I get error (-50) and then error 5002 when I try to sign in to ITunes Store - Help!
    My dealer has tried and failed (twice) to correct this and I have tried deleting the two items in the Itunes folder but no luck!

    were you able to get help on this?  I need help on error 5002 as well.  thank you

  • Why does my camera get purple streaks and then freezes

    why does my camera get purple streaks and then freezes

    My friend and I both work in a hospital and we go in out of signal continuously through out the day.  Our problem is so bad that by mid afternoon our phone batteries are down to 20% as the phone is continuously searching for signal.  Im on EE and their only advice was to reset the network settings, thats fine when you only have to do it once but Im doing it up to 20 times in 1 day.  It makes me hate my iphone for the first time in 5 years.

  • While installing latest update I lost ability to open Itunes.  Getting "runtime error" and then next box says error 1114.  Tried uninstalling and reinstalling and does not work.  Getting same error.  Very frustrating.

    Cannot open Itunes after trying to install latest update.  Getting runtime error and then error 1114.  Tried uninstalling and reinstalling and still getting same error.  How do I fix this.  Very frustrating!

    Hi there,
    Earlier iTunes (and supporting applications) need to be completely uninstalled before you can install the new version. Here's the complete Apple info on this: http://support.apple.com/kb/HT1923
    Mobile device application will most likely fail to uninstall, so you would need to visit its location(s) and manually delete the files then folder(s). The location of the folders is documented in this link from Apple.
    It's a pain, but it should work.

  • After Effects CC 2014 will not upgrade?  Gets to 100% and then says application failed.  Why does this not upgrade?

    After Effects CC 2014 will not upgrade?  Gets to 100% and then says application failed.  Why does this not upgrade?

    We can't know anything. You have not provided any useful details like system information or the install logs.
    Mylenium

  • My ipad mini 2 gets blue screen and then keep restarting over and over again problem

    My ipad mini 2 gets blue screen and then keep restarting over and over again problem. I tried to restore to the factory setting but it was not successful to fix the problem. Sometimes I could not even restore. How can I do with this kind of problem?
    I'm very frustrated now. Please help me!

    I have the same issue and have not found a way to fix it yet. I cant even down grade back to 8.2 because it wont stay on long enough.

  • Trying to download itunes 10 and it gets to 99% and then just stops??

    i have been trying to download  itunes 10 and it keeps getting to 99% and then just stops with about 8 seconds left and does nothing?

    i have tried everything, disabled firewalls and anti virus, deleted temp files, got so fed up with trying thought it was my laptop which was currently a windows vista so have bought a new laptop but still unable to download itunes , when downloading have tried selecting both run and save but both start to download then stop before it completes with no warning or reason for failing,

  • The app fails to download on my ipad- progress bar gets to halfway and then restarts. Any ideas?

    The app fails to download on my ipad- progress bar gets to halfway and then restarts. Any ideas?

    HELLO, Hello, hello..........is there anybody out there................

  • Can't receive messages but I can send them to people without iphones i uses to get their messages and then i just stopped receiving them i cant even receive a message to check my data

    Can't receive messages but I can send them to people without iphones i uses to get their messages and then i just stopped receiving them i cant even receive a message to check my data

    Hi Tnolen15,
    If you are having issues sending or receiving messages from a specific contact (in this case, your wife), you may find this portion of the following article helpful (ignore the numbering):
    If the issue occurs with a specific contact or contacts, back up or forward important messages and delete your current messaging threads with the contact. Create a new message to the contact and try again.
    If the issue occurs with a specific contact or contacts, delete and recreate the contact in the Contacts app. Create a new message to the newly created contact and try again.
    iOS: Troubleshooting Messages
    http://support.apple.com/kb/ts2755
    Regards,
    - Brenden

  • MacBook will not turn on. I get Apple fiqure and then the wheel just spins. What can I do

    MacBook will not turn completely on. I get Apple fiqure and then the wheel just spins.

    Reinstall OS X. Either use your installer DVD or do a network restore if you are using Lion or Mountain Lion.

  • After creating a mask on a pixel layer and then throwing it away, the pixels disapper

    If I create a mask on a pixel layer and then throw the mask away, the pixels under the old black mask disappear. Help! How do I fix this? I have already reset preferences. I am using the most current version of Photoshop CC 2014 on a Mac with OS 10.9.5

    Or just leave the layer mask in place.  It's a valuable recourse that you might need to use again.  The layer mask exists as an alpha channel.  It's there in the Channels panel when you click on the layer that contains the layer mask.  You might want to restrict an adjustment layer to the same area, or the inverse of that area.  It's not always convenient to do that by clipping — you might be targeting a layer way up the stack.
    OK, you can Ctrl click the layer if you removed the mask by Applying it, but it feels just plain wrong to me to throw a hard won selection in the dustbin.

  • Mathscript- pre compile and passwords

    Has there been any method to pre compile a Mathscipt to shorten run time?  If one wants to demo a Mathscript program and has to wait 30+ sec for it to compile, it sure reduces the impact.
    Another question, is there a method to reset passwords ( especially related to Mathscript login) when passwords were never set to begin with.
    CEK

    Hello CEK,
    The compile time of a script (or function) in MathScript increases exponentially with respect to the number of lines in the script.  We recommend limiting each script to about 40 or 50 lines so that the compile time is reasonable.  You can create functions out of parts of your file to break it into smaller pieces.  If this is still a problem, you can create the VI on a separate computer with the full script.  Then simply copy the VI to the demo computer and open it rather than recreate the VI.  As ttrr notes, make sure both computers have the same version of LabVIEW installed.
    As for the security menu, this is not part of MathScript.  You may have more luck asking your question in the regular LabVIEW forum.  If you wish to password protect the VIs you've created (with MathScript nodes or otherwise), go to File >> VI Properties.  Select the Protection category and then click "Password-protected."
    Grant M.
    Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments

  • I have iCloud on. Lately my native Contacts app appears blank and then crashes. Any suggestions?

    For a couple of weeks now, when I try to open my native contacts app on my iPad2, the only thing that appears is a blank screen and then afetr a few seconds the native Contacts app crashes. I have iCloud on. I am on iOS 5.0.1 and I have already tried doing some resets. The problem continues.
    More recently, when I open the native Calendar app, I get the syncing symbol twirling; however, my appointments are not being synced to my Ipad. They are being synced to my iPhone 4s

    I have tried that also, but its still doing the same thing

Maybe you are looking for

  • HP Officejet Pro L7580 All-In-One printer with Windows 8

    I have the HP Officejet Pro L7580 All-In-One printer and want to use it with my new laptop that has Windows 8, but it won't accept the Starter CD (Windows 2000, XP, Vista).  Where can I get a free download to use with Windows 8?  I can print, but cur

  • W530 Boot from SD Card

    With the coming release of Windows 8.1 I am currently looking for a solution to boot from an SD Card on my W530. From what I can gather, on all ThinkPads the SD card reader is connected via PCI, which is a connection that can't be booted from. So wha

  • Export without artboard

    Hey all, If i export a file without using artboards there is no way to set crop marks?  I have hundreds of images that i made in CS4 and they exist with single artboards (obviously), but now when i export the image with the artboard i get -01 added t

  • HP Webcam for Pavilion dv6-1216er dont save settings after reboot

    I have some problem from begining use my laptop. Still have this problem after reboot (or but it sleep) i have to put setting on webcam again. I reinstalled everything but this all dont help.

  • Submit Job error... need help....

    I got this error when I click on "Submit Job" button to submit a Backup job in 10g EM. Anyway to solve this ? The job submission has failed for the following reason ORA-20900: Could not find credential set DBHostCreds for target type oracle_database