none
SetSetImageLangIdBootAppropriately task fails during OS Build RRS feed

  • Question

  • I'm trying to build a very simple OS for a VirtualPC under a newly installed CE7 Evaluation on a Windows7 64-bit machine. Really is the first step since installing it. The build fails when it gets to making.proj, relevant part of the error log pasted below.

    Any ideas greatly appreciated!

    Regards
    Tony

    Makeimg:
      MAKEIMG: BUILDMSG: Calling C:\WINCE700\public\common\oak\misc\pbpremakeimg.bat
      C:\WINCE700\public\common\oak\misc\pbpremakeimg.bat
      PBPreMakeImg: BUILDMSG: Generating OS design Custom makeimg build step batch Files to C:\WINCE700\OSDesigns\MyOS\MyOS\Wince700\VirtualPC_x86_Retail\oak
      PBPreMakeImg: BUILDMSG: Done Generating OS design Custom makeimg build step batch Files
    C:\WINCE700\public\common\oak\misc\makeimg.proj(545,5): error MSB4018: The "SetImageLangIdBootAppropriately" task failed unexpectedly.
    C:\WINCE700\public\common\oak\misc\makeimg.proj(545,5): error MSB4018: System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
    C:\WINCE700\public\common\oak\misc\makeimg.proj(545,5): error MSB4018:    at Microsoft.PlatformBuilder.Build.Makeimg.Tasks.SetImageLangIdBootAppropriately.SetImageLangIdBootAppropriatelyCall()
    C:\WINCE700\public\common\oak\misc\makeimg.proj(545,5): error MSB4018:    at Microsoft.PlatformBuilder.Build.Makeimg.Tasks.SetImageLangIdBootAppropriately.Execute()
    C:\WINCE700\public\common\oak\misc\makeimg.proj(545,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
    C:\WINCE700\public\common\oak\misc\makeimg.proj(545,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext()
    Done Building Project "C:\WINCE700\public\common\oak\misc\makeimg.proj" (default targets) -- FAILED.

    Build FAILED.

    Thursday, June 13, 2013 10:55 AM

All replies

  • How did you create the OS design, what all component you selected ? Which locale ?

    Regards,

    Rakesh.

    Friday, June 14, 2013 8:28 AM
  • Thanks Rakesh

    I created the design using the PB OS Design Wizard from VS2008 (File/New/Project/Platform Builder/OS Design etc).

    BSP - VirtualPC: x86

    Enterprise Handheld

    Leave all options as default

    Properties/Locale - set all to 0409/English US

    Catalog Items - leave as default

    I've tried various other things, including a TI_EVM_3530 OS Design, but I always hit the same problem.

    I'm going to try putting a new install of VS2008 and PB into a VM to see if that helps. Any other thoughts gratefully received!

    Thanks again
    Tony

    Friday, June 14, 2013 12:07 PM
  • Hi again Rakesh

    OK, I gave up and created a new VM with a clean install of Win7-64, a clean install of VS2008, VS2008 SP1 update, Expression Blend 3 and CE7.0.

    Exactly the same design now builds OK, gets through the MAKEIMG step with no problems.

    So I guess somewhere I have some registry conflict or something on the host machine. I do have lots of stuff installed there, VS2012 as well as VS2008, though no other CE versions.

    I guess we will just have to put it down to experience!

    Thanks again.

    Regards
    Tony

    • Edited by Tony Hedge Saturday, June 15, 2013 12:05 AM Correct typos!
    Saturday, June 15, 2013 12:05 AM
  • Thanks for the update. There may be an issue with your installation...

    Regards,

    Rakesh.

    Monday, June 17, 2013 4:38 AM
  • Well, I never have resolved this!

    Everything works fine until I get to the makeimg phase, upon which Build throws this error. MSB4018 seems hugely common across anything which uses Build, but I cannot find any relevant solution. Just spent 8 hours uninstalling and reinstalling everything and it is still exactly the same.

    Since I first posted this, I have also installed Embedded Compact 2013, which works fine, but I have a project which demands CE7 and I can only get it to run under a VM, which is hugely frustrating.

    Anyone got any more ideas, thoughts, links?

    Thanks
    Tony

    Wednesday, November 11, 2015 5:49 PM
  • Hi Tony,

    I have never seen this error myself but "MSB4018" and "SetSetImageLangIdBootAppropriately" do both have quite a few posts in the MSDN forums. It seems clean install is the only solution that has worked. I have a few thoughts but not sure how much they will help you as you have likely tried some but what the heck...

    • Did you install as an Admin? Do you run VS as an Admin?
    • Have you tried a repair to your WinCE700 OS install?

    Both build and install scripts can have issues if run by VS or an installer without Admin permissions. Some folks set VS to run as Admin by default to just allow access everywhere but I just make my projects in the CE tree, as yours shows in the original post, to which they belong to keep things encapsulated and away from permissions issues.

    Sincerely,

    IoTGirl

    Wednesday, November 11, 2015 7:00 PM
    Moderator
  • Thanks, IoTGirl. Been there, tried that. But thanks for the suggestions. If I do ever crack it, I'll come back and report!

    Tony

    Wednesday, November 11, 2015 8:50 PM
  • OK - getting somewhere!

    In my VM installation of VS2008/PB7, I have .NET Framework 3.5 as the only installed .NET Framework. The Build engine used in the makeimg phase is MS Build 3.5.xxxx, and it works.

    In my native machine installation, the one I am trying to get to build correctly, I also have .NET Framework 4.5 installed. From the build window I can see paths to Microsoft.NET/Framework/V4.0.30319, the makeimg phase tries to use MS Build 4.0.30319 and fails with all the messages reported.

    As a quick and dirty test, I patched out the V4.0.30319 paths in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\Path. Makeimg phase used the MSBuild 3.5 engine, and we got past all the nasties.

    So, I'm now looking for a way to get PB7's build system to peacefully coexist with .NET Framework 4.5. Removing .NET Framework 4.5 isn't an option; I need it for other projects.

    Thoughts include:

    • Forcing the path seen from the build environment - not sure how?
    • Forcing the build system to use a specific .NET Framework version - again not sure how?
    • Modifying makeimg.proj to work with MS Build 4.0.xxx - again not sure how?

    I've already learnt more about the build system than I had hoped I would ever need. Sure it's good for me, but now I'm lost again and would welcome any clues!

    Thanks
    Tony

    [Edited to add: OK, a bit further. The Build system in WEC2013/VS2012 still works OK despite having removed the paths as above. I think that is because of the _DOTNETxxx evironment variables that WEC2013 uses. I can't see anything similar for WEC7. So for now, what seems to work for me is:

    • Use path variables to make sure WEC7 picks up MSBuild from .NET 3.5.
    • Rely on the _DOTNETxxx variables to make WEC2013 picks up MSBuild from .NET 4.5

    Hope that might help someone!]

    • Edited by Tony Hedge Thursday, November 12, 2015 10:39 AM
    Wednesday, November 11, 2015 11:58 PM