Avatar of AndrewJen
AndrewJen

asked on 

How to include System.Diagnostics in console application build

I'm building a Windows Embedded CE device application that will be used to list running processes on my device.

I have coded it using the System.Diagnostics.Process property. I have included the Using System.Diagnostics statement at the start of my program.

When I try to run it on the device I get:

error

TypeLoadException  File or assembly name 'System, Version=2.0.0.0, Culture=neutral,PublicKeyToken=B77A5C561934E089', or one of its dependencies, was not found.

How can I fix this?
.NET ProgrammingWindows OS

Avatar of undefined
Last Comment
AndrewJen
ASKER CERTIFIED SOLUTION
Avatar of Mikal613
Mikal613
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
SOLUTION
Avatar of abel
abel
Flag of Netherlands image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
SOLUTION
Avatar of Mikal613
Mikal613
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of AndrewJen
AndrewJen

ASKER

I believe it is...

Mikal613: the download you suggest is an MSI file which my Windows CE device doesn't know how to handle. How do I install it?

Thanks!
Avatar of AndrewJen
AndrewJen

ASKER

Yes, I've confirmed that the Compact Framework is installed - I built the O/S image file with .Net 2.0 selected...
SOLUTION
Avatar of Mikal613
Mikal613
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of AndrewJen
AndrewJen

ASKER

No joy. When I try to install I am told that there is a newer version of the Framework already on the device which must be removed in order to install this one.
SOLUTION
Avatar of Mikal613
Mikal613
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of AndrewJen
AndrewJen

ASKER

Patch was already installed, still no improvement.

Thanks
Avatar of Mikal613
Mikal613
Flag of United States of America image

are you sure you added the Compact Framework Version and not the Desktop Framework?
Avatar of AndrewJen
AndrewJen

ASKER

I believe so, I've attached a screen clipping of the O/S image I'm using, which includes the Compact Framework 2.0.
CompactFramework-installed.jpg
Avatar of AndrewJen
AndrewJen

ASKER

I solved this problem by manually installing the Compact Framework on a standalone PC and then copying the relevant DLL files to my device.
Avatar of AndrewJen
AndrewJen

ASKER

Thanks to all for assistance - selecting the Compact Framework in the Platformbuilder didn't supply all of the essential files. Your answers helped me search in the correct direction.
.NET Programming
.NET Programming

The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.

137K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo