Simple FEZ Cerberus project stuck on "The debugging target runtime is loading the application assemblies and starting execution" - .net-micro-framework

I'm having trouble with a .Net MF 4.2 project running on the FEZ Cerberus. In order to debug the problem I have swapped to a very simple .Net Gadgeteer project. In Visual Studio 2012 I make a new .Net Gadgeteer project targeting the .Net MF 4.2, add the FEZ Cerberus mainboard, and run the project. What I expect to see in the output window is a bunch of diagnostic messages followed by "Program Started" since the boiler-plate Program.cs file's ProgramStarted method contains just one line of code: Debug.Print("Program Started");
But that is not what I see.
Instead I get this output:
Found debugger!
Create TS.
Assembly: System (4.2.0.0) Loading Deployment Assemblies.
Assembly: Microsoft.SPOT.Hardware.PWM (4.2.0.1) Attaching deployed file.
Assembly: System.IO (4.2.0.0) Attaching deployed file.
Assembly: Microsoft.SPOT.Hardware (4.2.0.0) Attaching deployed file.
Assembly: mscorlib (4.2.0.0) Attaching deployed file.
Assembly: VanillaCerbGadgeteerApp (1.0.0.0) Attaching deployed file.
The debugging target runtime is loading the application assemblies and starting execution.
And that's where it sticks forever. Here are the things I have tried to fix it.
Restart the FEZ Cerberus
Restart the PC
Pausing debugging and then resuming. The pause fails with the error "Unable
to break execution. The debugger is still attaching to the process or the
process is not currently executing the type of code selected for debugging."
Swapping between the PC's USB and a powered USB hub
Uninstalling the WinUSB drivers and instead installing the legacy drivers
Setting a breakpoint (it never gets there)
Switching to a different FEZ Cerberus mainboard
Running the SDTFUTester to erase the memory on the FEZ Cerberus, reinstall the
DFU Tinybooter_4_2_6_1.dfu, and then using the FEZConfig tool to update the
firmware to 4.2.6.1 on the mainboard.
None of these steps work. I am still stuck forever on the line The debugging target runtime is loading the application assemblies and starting execution. What should I do to debug this and to fix it?
(N.B. One thing that did fix this was to rebuild my laptop, i.e. to wipe the disk and install the OS etc. from scratch. However this fix was not permanent, I was soon back, stuck at the same point.)
I am running Visual Studio 2012 and have the NETMF SDK 4.3 (RTM) and the NETMF and Gadgeteer Package 2013 R3 installed. I'm currently on Windows 8.1 though I experienced the same (or at least similar) problem when the laptop was on Windows 8.

It looks like this was a hardware fault on the PC. I have swapped the hard-drive in the Dell E6320 laptop I was using into another Dell E6320 and now the projects run fine.

Related

Deploying .NET Framework 4.5 with Installshield

I have written an application that I deploy via Clickonce, but I want to deploy it via Installshield, so I am experimenting with it. I found and downloaded dotnetfx45_full_x86_x64.exe, the redistributable for .NET Framework 4.5, and made a Installshield prerequisite from it. I wrote a simple application that has a RDLC report that just says “Hello World”, and it needs .NET Framework 4.5, and used Installshield to deploy it. The Reportviewer needs Microsoft SQLClrTypes_x86.msi and SQLClrTypes_x64.msi, and ReportViewer.msi, so I got those and made Installshield prerequisites from them. For the ReportViewer.prq, I specified SQLClrTypes_x86.prq and SQLClrTypes_x64.prq, as dependencies, and for SQLClrTypes_x86.prq and SQLClrTypes_x64.prq I specified dotnetfx45_full_x86_x64.prq as a dependency.
When I installed my little application on my test computer (running Windows 7), it installed the 4.5 framework, said it needed to reboot, and asked if I wanted to reboot now, and I clicked Yes. I was thinking it would reboot and continue the installation, but when it rebooted, that was the end of the installation. I ran setup again, it asked if I wanted to install the 4.5 Framework (it asked me the first time, too), so I clicked No. After clicking No, it installed the rest of my program, and it ran perfectly.
How can I get the installation to continue after it reboots from installing the .NET Framework 4.5?
Thanks
Here's a blog I wrote about 9 years ago:
Using InstallShield 12 to Install .NET Framework 3.0
It hasn't changed much. You want to use the prereq editor to change the reboot behavior to Note it, fail to resume if the machine is rebooted, and reboot after the installation.
Also please note that InstallShield consumes it's PRQ files from the ISProductFolder (C:\Program Files (x86)\InstallShield.... ) I don't care for this from a CM perspective. I recommend isolating the file and file references to relative paths based on ISProjectFolder and keeping all of these files in your source control tool.
Behavior Tab

C# application .Net 2.0 Couldn't run in Windows XP

I built a .Net 2.0 Application for Windows XP but I made it in Windows 7.
The application contains a Mysql.data connection and CrystalReport. When I try to run it on Windows XP, the application does not run, giving an error message of:
The application failed to initialize properly (0xc000007b).
I tried to rebuild application in Windows XP, but when I rebuilt and ran it in Visual Studio, the following error occurs:
Could not load file or assembly or one of its dependencies. The module was expected to contain an assembly manifest.
How can I fix this?
Please try the following:
1.Uninstall the .NET Framework 3.5 from Add/Remove Programs (in the Control Panel) on Windows XP or Programs and Features on Windows Vista/Windows 7.
Even if the uninstall fails, go on to step 2.
2.After the Framework 3.5 has been uninstalled or if it failed, download and run the .NET Framework removal tool.
Here's the link to Aaron Stebner's Framework Removal tool on Windows Live Skydrive:
http://cid-27e6a35d1a492af7.skydrive.live.com/self.aspx/Blog_Tools/dotnetfx_cleanup_tool.zip?wa=wsignin1.0&sa=17797669
Aaron Stebner is a Microsoft employee. The tool he's developed is linked on that page and makes easy work of cleaning up damaged .NET Frameworks from your system so they can be reinstalled. When you run the tool, choose the .NET Framework 3.5 from the list and choose to cleanup. After this is done, reinstall the .NET Framework 3.5 that Design 3 needs by running the Expression Design 3 setup package again. It will detect that the .NET Framework 3.5 is missing and reinstall it for you. After that's done, try running Design 3 again.
3.If that still fails to resolve the problem, go to START, RUN and type CMD to run a command prompt. Type CHKDSK /R and hit ENTER. Hit the letter Y and restart the machine. Allow the machine to do the check disk scan. After this is done and it goes back into Windows, try Expression Design again.
more information here

Cava Packager - created exe not running

Today I created installer using Cava Packager Perl. I can install the app using the installer that I have created. But the problem is in my system that app is running fine but in other system app is not running. That is its getting installed but app is not running.
Assuming that your platform is Windows and the version of windows on which you are running the application is equal to or greater than Windows XP, you can create a diagnostic version of your application that will give full detail of the startup and loading process on the failing machine.
In the Build Options tab of Cava Packager, check the following two options:
1.Package Diagnostic Executable with release
2.Allow Loader Verbose Output in Release Executables.
Create your installer package and install on the failing machine.
In the installed bin directory, assuming your executable is called 'myexecutable' you should run:
diagnostic myexecutable.exe
You should get full details of the loading process and where it fails.
There are two very common reasons for failure when deployed to another machine.
A module you are using is linked to a dll that Cava has failed to automatically bundle
You are trying to run on Windows 2000 - which isn't supported by Cava.
Note: I'm involved with Cava Packager development.

why the Pyqt application implemented and worked well in VISTA can not run in Windows XP?

all, I implemented an application in my laptop (vista) with PyQt and it worked quite well. But if I want to run it in a desktop of Windows XP system, an error occured! It says the configuration was wrong. What is the reason (by this i mean does it matter which system I used??)and how to solve it please? thanks!!!
More info would be useful, but this sounds familiar to a problem I had when freezing apps using py2exe. Is this your exact error message?:
The application has failed to start because the application configuration is incorrect.
Reinstalling the application may fix the problem.
I managed to get around this by installing the Microsoft Visual C++ 2008 SP1 Redistributable Package from http://download.microsoft.com.
This was an error I had when using py2exe. After switching over to PyInstaller, which bundles the runtimes during freezing, the problems went away without having to install the C++ runtimes on an XP machine. There may even be a way to bundle the runtimes using py2exe, but I've not looked.

Crystal Reports error when deployed..Could not load file or assembly 'log4net

Please help. I have a web application that was built in VS2010 and we are using the CR plugin for 2010 and everything works perfect on our local machines. When we go to deploy the web application to Server 2008 the application runs fine until we try to get to a report. When we get to a report we receive...
Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.
We have installed the CR2010 runtimes and the file log4net.dll version 1.2.10.0 is in the GAC so we are not referencing it in the application. When we add it as a reference we get this error no matter where we are in the application, not just on the report pages. Please help!
I received the same error message after accidently installing the x86 version of the crystal reports redist on a x64 machine.
Installing the correct x64 redist fixed the problem - http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_redist_install_64bit_13_0.zip
We just ran into the same problem and it turned out to not (in our case) be the version of the Crystal Reports redist (we installed the 32 bit versions on our 64 bit machines. The way we were able to fix the problem was to
Navigate to your virtual directory Application Pool -> Advanced Settings -> Set Enable 32-Bit Applications to True
and changed the managed pipeline mode from Classic to Integrated. After that we no longer got errors of the missing log4net dll.
We also had the same issue with the 64-bit redistributable installed. In our case, we set the "Enable 32 Bit Applications" setting to FALSE in the advanced Application Pool properties and that resolved the issue.
If you have a x86 development machine and your web server is a 64-bit machine, you may be running into the problem discussed here:
http://social.msdn.microsoft.com/Forums/en-US/vscrystalreports/thread/546059a6-7179-4027-8f16-822ac6dc189a/
Visual Studio is automatically deploying a 32-bit log4net.dll into the 64-bit web server, even if you don't have it referenced in your project. Just delete the log4net.dll from your bin directory once deployment has finished because it's not actually required by the CR runtime to work.
For me I had a VB Application project and under Compile options, I had "Any CPU" selected for Target CPU and I also had the "Prefer 32-bit" checked. When the compiled app ran on a 64 bit machine, which only had the x64 runtime installed it could crash with this error, because it tried running as a 32 bit app and wanted the 32 bit runtime. Unchecking this option and recompiling made it work correctly.
Install Crystal Reports for Visual studio Runtime engine for .NET Framework 64 bit
Solved my problems.
I have 2 NLB 2008 R2 Servers, my IISs are configured to run in x32.
In one server I have installed x64 and x32 SAP redist and I have the error, in second server only the x32 and works.
To get the first server work I uninstalled all versions and reinstalled only x32, but the server start work only after a reboot.
Bye
In my case I had the error while developing with Visual Studio 2022. I did what the other answers here say, installed Runtime 64-bit, because my machine is 64 bit, and then:
(in Visual Studio) Project Debug Properties > Web > Servers > Change Bitness to x64 (using IIS Express)