Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Cannot debug PPC app in high res mode on VGA emulator

7 views
Skip to first unread message

Rich M

unread,
Feb 21, 2005, 5:10:27 PM2/21/05
to
I have followed the instructions for "Debugging Resolution Aware .NET CF
Pocket PC Apps" found at
http://blogs.msdn.com/windowsmobile/archive/2004/04/03/107203.aspx but I am
unable to get it to work. Whenever I try to debug my application it runs in
compatibility mode even when using the "3 step manual process". I notice
that when I launch the debugger it seems to be recompiling the source. Since
the code was already compiled, I thought I would see a message like "The
project is up-to-date." but rather I see "Build complete -- 0 errors, 0
warnings". How can I determine why Visual Studio thinks it needs to rebuild
the executable?

- Rich


Alex Feinman [MVP]

unread,
Feb 22, 2005, 1:48:35 AM2/22/05
to
I wonder if this would work:
1) Set studio to prompt you for the target device when deploying (it's a
default setting, but you can disable the prompt)
2) Hit F5 to compile and deploy. Wait for the dialog prompting to deploy the
application.
3) Run res2exe on the target executable and the hit OK in the deployment
dialog.

However I strongly recommend using a macro provided in the blog post you
referred to. The only thing about it, I would modify it to look like this:

Public Sub DebugAsHighRes()

' Path for 2nd Edition Resources. You may need to change this to match your
setup.

Dim SecondEditionResources As String = "C:\Program Files\Developer Resources
for Windows Mobile 2003 Second Edition\tools\"

Dim ActiveProject As Project =
DTE.Solution.Projects.Item(DTE.Solution.SolutionBuild.StartupProjects(0))

Dim Solution As SolutionBuild = DTE.Solution.SolutionBuild

' Create the command line for marking the output file as resolution aware

Dim ResFile As String = """" + SecondEditionResources + "\hidpi.res"""

Dim Params As String = " -r -c "

Dim Res2Exe As String = """" + SecondEditionResources + "\res2exe.exe"""

Dim OutputFile As String = """" +
ActiveProject.Properties.Item("LocalPath").Value + "\obj\Debug\" +
ActiveProject.Properties.Item("OutputFileName").Value + """"

Dim Command As String = Res2Exe + Params + ResFile + " " + OutputFile

' Build, mark has resolution aware, and then launch the debugger

Solution.BuildProject("Debug", ActiveProject.UniqueName, True)

Shell(Command, AppWinStyle.Hide, True)

DTE.Debugger.Go(False)

End Sub

--
Alex Feinman
---
Visit http://www.opennetcf.org
"Rich M" <richar...@bigfoot.spamnot.com> wrote in message
news:uXkLpIGG...@TK2MSFTNGP15.phx.gbl...

Rich M

unread,
Feb 22, 2005, 10:38:33 AM2/22/05
to
Thanks Alex! I wish I would have thought of that.

I came up with a different solution. My project has a ClassLibrary and Setup
projects which only builds under the release configuration as described in
"Developing and Deploying Pocket PC Setup Applications" at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/html/netcfdeployment.asp.
After setting up the neccessary files for the debug configuration, now all I
need to do is enable the ClassLibrary project to build under this
configuration when I need to debug in hi-res mode. My obj\Debug\BuildCab.bat
that runs as the PreBuild event in the ClassLibrary project handles running
the res2exe command.

- Rich


0 new messages