none
Problem when deploying basic c# project onto emulator RRS feed

  • Question

  • Hi, I have VS2005 with Windows Mobile 5.0 SDK. I created a new project: C# - smart device - Windows Mobile 5.0 Pocket PC - Device Application.

    When building and deploying onto the Windows Mobile 5.0 Pocket PC Emulator the process apparently uploads a massive set of DLLs onto the emulator, and eventually runs out of virtual hard disk space. This is the deployment log:

    ------ Build started: Project: DeviceApplication2, Configuration: Debug Any CPU ------
    DeviceApplication2 -> C:\Documents and Settings\Jørgen\My Documents\Visual Studio 2005\Projects\DeviceApplication2\DeviceApplication2\bin\Debug\DeviceApplication2.exe
    ------ Deploy started: Project: DeviceApplication2, Configuration: Debug Any CPU ------
    Deploying 'C:\WINDOWS\assembly\GAC_MSIL\System.Web.RegularExpressions\2.0.0.0__b03f5f7f11d50a3a\System.Web.RegularExpressions.dll'
    Deploying 'C:\WINDOWS\assembly\GAC_MSIL\System.ServiceProcess\2.0.0.0__b03f5f7f11d50a3a\System.ServiceProcess.dll'
    Deploying 'C:\WINDOWS\assembly\GAC_MSIL\System.Design\2.0.0.0__b03f5f7f11d50a3a\System.Design.dll'
    Deploying 'C:\WINDOWS\assembly\GAC_32\System.Transactions\2.0.0.0__b77a5c561934e089\System.Transactions.dll'
    Deploying 'C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll'
    Deploying 'C:\WINDOWS\assembly\GAC_MSIL\Accessibility\2.0.0.0__b03f5f7f11d50a3a\Accessibility.dll'
    Deploying 'C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll'
    Deploying 'C:\WINDOWS\assembly\GAC_MSIL\System.DirectoryServices\2.0.0.0__b03f5f7f11d50a3a\System.DirectoryServices.dll'
    Deploying 'C:\WINDOWS\assembly\GAC_MSIL\System.Drawing.Design\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.Design.dll'
    Deploying 'C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Remoting\2.0.0.0__b77a5c561934e089\System.Runtime.Remoting.dll'
    Deploying 'C:\WINDOWS\assembly\GAC_MSIL\System.DirectoryServices.Protocols\2.0.0.0__b03f5f7f11d50a3a\System.DirectoryServices.Protocols.dll'
    Deploying 'C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'
    Deploying 'C:\WINDOWS\assembly\GAC_32\System.Data.OracleClient\2.0.0.0__b77a5c561934e089\System.Data.OracleClient.dll'
    Deploying 'C:\WINDOWS\assembly\GAC_MSIL\System.Deployment\2.0.0.0__b03f5f7f11d50a3a\System.Deployment.dll'
    Deploying 'C:\WINDOWS\assembly\GAC_MSIL\System.Data.SqlXml\2.0.0.0__b77a5c561934e089\System.Data.SqlXml.dll'
    Deploying 'C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Serialization.Formatters.Soap\2.0.0.0__b03f5f7f11d50a3a\System.Runtime.Serialization.Formatters.Soap.dll'
    Deploying 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualC\8.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualC.dll'
    Deploying 'C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll'
    Deploying 'C:\WINDOWS\assembly\GAC_MSIL\System.Configuration.Install\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.Install.dll'
    Deploying 'C:\WINDOWS\assembly\GAC_MSIL\System.Security\2.0.0.0__b03f5f7f11d50a3a\System.Security.dll'
    Deploying 'C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll'
    Deploying 'C:\WINDOWS\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'
    Deploying 'C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'
    Deploying 'C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll'
    Deploying 'C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll'
    Deployment and/or registration failed with error: 0x8973190e. Error writing file '%csidl_program_files%\deviceapplication2\mscorlib.dll'. Error 0x80070070: There is not enough space on the disk.
      ========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
    ========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

    On my own machine the mscorlib.dll resides in directories such as C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727.

    If I try the same basic project in VB, I get a messagebox saying that the "Project 'DeviceApplication3' could not be opened because the Microsoft Visual Basic 2005 compiler could not be created. Unable to find required file 'mscorlib.dll' "

    This also hints at this file, so its probably a simple issue and I'd appreciate some advice on what to do.

    Thanks
    Saturday, January 5, 2008 11:09 PM

Answers

  • All your references are wrong - they are desktop references. Device assemblies are normally located here:

     

    %ProgramFiles%\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE

     

    Yes, I (and thousands of other developers) can create and deploy device projects just fine. So you might indeed have messed up installation, may be NETCF V2 is not installed.

     

    Sunday, January 6, 2008 10:43 PM
    Moderator

All replies

  • See this.

    Saturday, January 5, 2008 11:36 PM
    Moderator
  • Thanks for the reply - sounds like a related issue. Just to clarify, though:

    I compile against Windows Mobile 5.0, not CE. Also, this project is created out-of-the-box in VS2005, I haven't added a single line of code or modified anything. What I am seeing is default behaviour. You advice him to "... find and remove bad reference ..." which turns out to be in a call of his, but at this stage I haven't coded anything yet? Are you saying that bad references are in the template code (C#, Windows Mobile 5.0) ?

    Please advice, cheers.

    Sunday, January 6, 2008 10:01 AM
  • Windows Mobile is a customized version of Windows CE.

     

    Have you used designers at all? Added connection to, say Oracle database? Changed any references? Which references you do have in the project (list them all; include full paths to each assembly).

    Sunday, January 6, 2008 7:28 PM
    Moderator
  • Hi, here is a new empty project I created, same template settings. When VS2005 is done creating the (empty) project, I select Build-Deploy and get the message below. The project comes with 6 references, all six references can be read from the compile-related text at the start:

    (I have wrapped the lines at "/reference" for your convenience)

    ------ Build started: Project: DeviceApplication5, Configuration: Debug Any CPU ------
    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /errorreportStick out tonguerompt /warn:4 /defineBig SmileEBUG;TRACE;PocketPC /win32res:"C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\bin\hiDPI.res"
    /reference:C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll
    /reference:C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll
    /reference:C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll
    /reference:C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll
    /reference:C:\WINDOWS\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll /reference:C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll
    /debug+ /debug:full /filealign:512 /optimize- /outSurprisebj\Debug\DeviceApplication5.exe /resourceSurprisebj\Debug\DeviceApplication5.Properties.Resources.resources /target:winexe Form1.cs Form1.Designer.cs Program.cs Properties\AssemblyInfo.cs Properties\Resources.Designer.cs

    Compile complete -- 0 errors, 0 warnings
    DeviceApplication5 -> C:\Documents and Settings\Jørgen\My Documents\Visual Studio 2005\Projects\DeviceApplication5\DeviceApplication5\bin\Debug\DeviceApplication5.exe
    ------ Deploy started: Project: DeviceApplication5, Configuration: Debug Any CPU ------
    Deploying 'C:\WINDOWS\assembly\GAC_MSIL\System.Web.RegularExpressions\2.0.0.0__b03f5f7f11d50a3a\System.Web.RegularExpressions.dll'
    <snip>
    Deploying 'C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll'
    Deploying 'C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll'
    Deployment and/or registration failed with error: 0x8973190e. Error writing file '%csidl_program_files%\deviceapplication5\mscorlib.dll'. Error 0x80070070: There is not enough space on the disk.
      ========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
    ========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

    Are you able to build and deploy a from-scratch C# project in VS2005 on the Windows Mobile Emulator? If so, I might have a bad install ...


    Thanks for your help so far,
    Jørgen
    Sunday, January 6, 2008 8:08 PM
  • All your references are wrong - they are desktop references. Device assemblies are normally located here:

     

    %ProgramFiles%\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE

     

    Yes, I (and thousands of other developers) can create and deploy device projects just fine. So you might indeed have messed up installation, may be NETCF V2 is not installed.

     

    Sunday, January 6, 2008 10:43 PM
    Moderator
  • I have started reinstalling - my plan is this:

     

    VS2005

    VS2005 SP1

    WM5.0 SDK

     

    This was how my old install was done - I was under the impression that the NET CF 2.0 was part of the WM5 SDK. I might need a service pack for it, though.

     

    I'll get back with my findings on a fresh install.

     

    /Jørgen

    Monday, January 7, 2008 8:21 AM
  • Hi again, did an uninstall - man, is that hard, I had to spend hours on Aaron Stebners blog to get the right tools just to really rid the machine of all the components. Ended up using the Hammer.

    Then I installed VS2005 and the SP1 for that. After this, I installed the Windows Mobile 5 framework SDK, which contains the NETCF 2.0. At this point I could now create a smart device project that would deploy using CF references (to an extent, see below).

    For some reason, this install process must have gone wrong earlier when I couldn't deploy (see symptoms above). Do note that this can go wrong without any particular messages being displayed. The thousands of hits on failed VS2005 installs and several dedicated blogs on simply installing the development platform is testiment to how complicated setting this up can be. I gather that most are company users whose IT department rolls out a once-and-for-all certified install, I am doing this on my own time on a home computer. For the record, if anyone comes across this thread after having a similar problem, the hard work of reading blogs, desperate calls for help on various fora etc. reveals that you should disable all anti-spyware software and resident virus shields before installing. This has helped me, for instance, I couldn't install SP1 for VS2005 when my anti-spyware was running. It would consistently fail.

    Now, at this point I am better off than before. But I still need to know if I am fully there on my install because I am still having issues. Now, when I setup an empty project from one of the templates (C#, Pocket PC, NETCF2) and select Build-Deploy on Emulator, as opposed to before I will get a succesful build and a succesful Deploy in the log:

    ------ Build started: Project: DeviceApplication9, Configuration: Debug Any CPU ------
    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /errorreportStick out tonguerompt /warn:4 /defineBig SmileEBUG;TRACE;PocketPC /win32res:"C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\bin\hiDPI.res" /reference:"C:\Program Files\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\mscorlib.dll" /reference:"C:\Program Files\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\System.Data.dll" /reference:"C:\Program Files\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\System.dll" /reference:"C:\Program Files\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\System.Drawing.dll" /reference:"C:\Program Files\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\System.Windows.Forms.dll" /reference:"C:\Program Files\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\System.Xml.dll" /debug+ /debug:full /filealign:512 /optimize- /outSurprisebj\Debug\DeviceApplication9.exe /resourceSurprisebj\Debug\DeviceApplication9.Properties.Resources.resources /target:winexe Form1.cs Form1.Designer.cs Program.cs Properties\AssemblyInfo.cs Properties\Resources.Designer.cs

    Compile complete -- 0 errors, 0 warnings
    DeviceApplication9 -> c:\VS2005_Projects\DeviceApplication9\DeviceApplication9\bin\Debug\DeviceApplication9.exe
    ------ Deploy started: Project: DeviceApplication9, Configuration: Debug Any CPU ------
    Deploying 'c:\VS2005_Projects\DeviceApplication9\DeviceApplication9\bin\Debug\DeviceApplication9.exe'
    ========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
    ========== Deploy: 1 succeeded, 0 failed, 0 skipped ==========

    So far, so good. However, the emulator does not show the form, ie. the application being deployed. It stays in its main window with the blue screen. At one stage during the deploy, the circle-in-the-square is active, indicating that the emulator is working with something, but nothing more happens.

    Two questions, please:
    1) Is it recommended to patch the emulator shipped with the WM5 SDK before it will work ? i have not been able to find a patch, rather a version 2 which seemingly is for WM6 ....

    2) Should this work, ie. my install is still bad?

    Sorry for the delay in getting back on this - I'll appreciate any input on my latest issue here.
    Thursday, January 10, 2008 9:22 PM