Building OS in VS2005 and Application in VS2008 RRS feed

  • Question

  • I am using VS 2005 to build my OS (since 2008 does not have Platform builder).

    I am developing the application in VS 2008 to take advantage of the Smart Device Unit testing.

    I am trying to figure out the best way for my final release build of NK.bin which will first build my application, then build the OS (in kiosk mode)  the OS build should include the 2008 application image.

    The complication is that I am using 2 different version of VS.




    Friday, November 5, 2010 8:14 AM

All replies

  • Is your application written in managed or unmanaged code ?

    In the first case (managed) you can develop application without problem in VS2008 and then debugging your application on the target via VS2008.

    In the secondo case (unmanaged) i think that the best way is to develop your application as OS solution subproject inside VS2005 for debugging better. It is only my idea.


    Friday, November 5, 2010 8:23 AM
  • Hi Paolo,

    My 2008 application is managed code. I have no problem debugging this 2008 manages application during development.

    I want to know how I will perform a final release build which will be used for the final image that I will install on the device - the nk.bin image. This image will have to managed 2008 application and the 2005 OS.



    Friday, November 5, 2010 9:06 AM
  • To include your managed application assemblies (EXE, DLL) into your NK.bin, you have to modify a .bib file. The possible solutions are the following :

    1. platform.bib : it is the worst solution;
    2. project.bib : it's better then the first;
    3. <subproject>.bib : create a subproject inside your OS solution without sorce code but using its bib file to include your managed application;

    Remember to include your application inside FILES section.


    Friday, November 5, 2010 9:36 AM
  • Brian:

    The answer is that you would build your app first and then build the OS.   But you already knew that, so what are you really asking?

    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG

    Eurotech Inc.
    Friday, November 5, 2010 10:49 AM

    I would like there to be a dependency from a VS2005 project to a VS2008 project. So that the VS builds all the dependent projects automatically.

    Now there is nothing in VS2005 that would allow it to depend on a VS2008 application. I am wondering if anyone has managed to work this into their build preocess. I assume other people have seen the same relationshipd i.e. VS2005 OS design and VS2008 application.

    My key request is for it to be done as part of the build so that a developmer does  not have to remember to build the VS2008 app first.



    Friday, November 5, 2010 3:10 PM
  • No there isn't any dependency...You have to build VS2008 application first and then include it into OS image (with VS2005) in the way I have told you.


    Friday, November 5, 2010 7:12 PM
  • Brian:

    Since the projects are using two different tools, there is no built in way to build the VS2008 project from Platform Builder.  But you could create a make file for your VS2008 project and build it from Platform Builder.  I am not suggesting that this is an easy or straight forward solution.  One way would be to use, similar to but instead of copying files build your VS2008 project.

    If it were me, I would probably create a batch file that builds both the VS2008 app and the OS.  This might take some research on your part, but this should get you started:

    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG

    Eurotech Inc.
    Friday, November 5, 2010 8:48 PM
  • Hi,

    it is possible to build managed applications directly in PB but please be aware that you'll loose all of the nice editer features like syntax highlightning and code completion.

    For one of our projects we wrote a couple of small C# utilities and included the build process directly into the build process of the OS Design.

    Before I give you the details on how we managed to handle the C# projects, let me state that in the end we moved back to including the compiled binaries into the OSDesing using the way that Bruce and Paolo mentioned.

    To build a managed application directly in PB start by creating a new empty subproject.

    Below is an example SOURCES file for a C# .NET CF3.5 managed application named SmartDeviceProject1.

      ReadMe.txt \
      prelink.bat \
      postlink.bat \
      Resources.resx \
      Form1.resx \
    SOURCES= \
      Resources.Designer.cs \
      AssemblyInfo.cs \
      Form1.cs \
      Form1.Designer.cs \
      Program.cs \
      SmartDeviceProject1.bib \
      SmartDeviceProject1.reg \
      SmartDeviceProject1.dat \
      SmartDeviceProject1.db \

    The first few entries in the SOURCES file are important.

    A TARGETTYPE of MANAGED_EXE tells the build system to generate a managed appliaction.

    The entries below TARGETTYPE define the path to the compiler tool chain and set the .NET CF version to 3.5


    I remember that we ran into problems with an application that had embedded resources. I was not able to solve how to compile the resources using PB. In the end I took the compiled version and included it into the subproject as file and used


    to link the resources to the application.



    Monday, November 8, 2010 10:09 AM