How can I install CF 2.0 on my handheld device, and which version/architecture? - compact-framework

To install CF 2.0 on my handheld device (replacing the existing/unwanted version 3.5), according to this (straight from the horse's mouth), I need to run netcfsetupv2.msi from the following directory:
\Program Files\Microsoft.NET\SDK\v2.0\CompactFramework
I have one problem with that, though: I have no netcfsetupv2.msi - not there or anywhere else, in fact (although I do have a C:\Program Files (x86)\Microsoft.NET\SDK\CompactFramework\v2.0 folder).
I do see "interesting" files such as netcflaunch.exe in:
C:\Program Files (x86)\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\wce400\x86
...and that same filename also in the armv4 folder (as opposed to x86) and others, also several versions beneath \wce500 as well.
So, assuming I should run netcflaunch.exe from my PC (with an ActiveStync connection) to install CF 2.0 on my handheld device, which version of netcflaunch.exe should I run for a Motorola 3190 running OS Version 6.00.000 Windows CE Version 6.00?
My guess is C:\Program Files (x86)\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE
\wce500\x86\netcflaunch.exe, but that's all it is - a guess.

You can simply install the CF 2.0 cab file on the device. Side-by-side installation is supported.
That said, why would you do that? If it has CF 3.5, it can already run CF 2.0 applications. "Downgrading" is a useless waste of disk space.

Related

"The application could not be installed because the installer file is damaged." only on some machines

Some people are having trouble installing my AIR app. Most are installing it fine.
Some of the people having trouble are installing it for the first time, others as an update.
I've tried two versions of the installer - one with a migrated cert, the other without migration.
Also, I've gone through these steps with them:
check that your computer's system clock is correct. Correct the date and time if it not current.
make sure you have the latest updates for your machine eg latest Windows updates for Windows machines
install the latest version of the Adobe AIR runtime (download from http://get.adobe.com/air)
uninstall my app if it is already installed
make sure the application folder does not exist (in, for example, c:\Program Files or c:\Program Files (x86)). If it does exist, delete it.
empty the Trash (Mac OS) or Recycle Bin (Windows)
try installing my app again
I'm wondering if there are any other steps that you are aware of to test?
Cheers

MSI can't register DLLs when built with Windows 8 vs Windows 7

I'm using Visual Studio 2010 to build a MSI consisting of several DLL files set to register using vsdrpCOMSelfReg. There are also several Windows services that are installed using custom actions. My target machine is running Windows 32bit embedded standard.
My previous development box ran Windows 7 64 bit and I could build and install this MSI with no problem. I recently changed over to Windows 8 Pro, and when I build the MSI using the exact same code base I get "failed to register" errors on my DLLs, which then causes the services to fail installing.
I have a "Privileged" launch condition in the MSI that passes for both versions, so it looks like the required permissions are there.
If I set the DLL files to "vsdrpCOM" I can successfully register after the fact using regsvr32, but my services can't install because they rely on those DLLs being registered to complete their own installation.
What am I missing? What changed with DLL registry beween Windows 7 and Windows 8?
The usual cause for this is missing dependencies. ComSelfReg requires your Dlls to load and run during the install. If you have included the VC++ runtime support as merge modules and they install in WinSxS then they are not available until after your selfreg code needs to run. The symptoms are exactly those you'd get when the VC++ runtime is being installed from merge modules and do not already exist on the system - failure during the install and success with regsvr32 after the install.
In general you should look at using a tool that doesn't require code to install services. All the major install tools populate the ServiceInstall and ServiceControl tables in the MSI file because MSI will install services just fine, but VS setups don't use them for some reason.
The problem was in the dependencies automatically pulled in when I added the DLL Project Outputs. One of the detected dependencies was IPHLPAPI.DLL, pulled from C:\Windows\System32. This DLL was then copied into the application directory. In my install of Windows 8 Pro, IPHLPAPI.DLL is version 6.2.9200.16420. In Windows 7, this file is version 6.1.7600.16385.
I'm guessing my assemblies were referencing the Windows 8 version since that was in the local directory, and this caused registration and/or runtime errors. I excluded IPHLPAPI.DLL from the installer and everything is now running correctly, referencing the file in System32.

.NET 4.0 GAC - Unable to Add DLL

I am using the namespace System.Windows.Forms.DataVisualization.Charting to create a Chart object on a form. This DLL is not a part of the basic Windows install, so I shall need to include it in my package when I distribute my application.
I am aware of the new version of GacUtil.exe and also that Gacutil.exe is only for development purposes and should not be used to install production assemblies into the global assembly cache. Let's just assume that I have no choice in the matter and have to do it this way due to the use of a proprietary package distribution system. =)
Edit/Update: In the 2.0 runtime, even though some PC's did not have GacUtil.exe present on the intended installation PC, I could drop GacUtil.exe (2.0 version) on the PC and I could then GAC whatever extra assemblies I needed. This appears to be a problem in the 4.0 runtime. Even though I have copied GacUtil.exe (4.0) to the destination PC, I get no feedback when running it against the needed assembly. End Edit/Update
Now, on my PC (the development PC), I can add the DLL to the GAC without any problems:
However, on a clean Windows 7 PC, with the same DLL and the same version of GacUtil.exe I get this:
Why the discrepancy? Does the new GacUtil.exe depend upon something that this PC doesn't have?
Ok, I ended up having two problems, one of them being a moot point in the end.
Problem #1: GacUtil.exe (for the 4.0 CLR) has Dependencies
When i copy over the folder in which GacUtil.exe resides, the problem of adding the assembly vanishes:
This ended up being a moot point, however, because even though the file was in the 4.0 GAC on the client machine, I still had the crash. I realized at that point that the problem was that I am not targeting the 4.0 GAC - I'm targeting the 2.0 GAC. The file I was trying to add to the GAC this whole time was a 4.0 version of the file. This was the piece I wasn't understanding.
Problem #2: There are separate 4.0 and 2.0 versions of "GACable" DLL's, and they are not backwards compatible
I simply went back to my development machine and grabbed the 3.5 version of the DLL in question (System.Windows.Forms.DataVisualization), added it to the 2.0 GAC on the client PC, and crisis averted.
You can run the 4.0 Gacutil from your own folder if you add a "1033" subfolder and include the file, gacutlrc.dll, which can be found in the same subfolder in the standard location.

how to enable Mono.Simd

I'd like to use Simd in Mono, but the following code is highlighted as error in MonDevop
using Mono.Simd
I already installed the "Mono 2.8 for Windows", what else I need to install to enable Mono.Simd?
In this link
http://tirania.org/blog/archive/2008/Nov-03.html
It talk about the tarbal, but after download it an uncompress it (mono-Mono.Simd.Math-942e804), there are many cs file and no dll file.
Did you add the Mono.Simd.dll to the build? MonoDevelop correctly highlights the error because in the assemblies you're using there isn't any Mono.Simd namespace.
Mono.Simd.dll is included in recent Mono releases.
As for the other answer, Mono.Simd works on any operating system on x86 and amd64, not only on Linux.
Mono.Simd only works when you run your programs on Mono runtime, on a supported operating system. If I'm not mistaken, it's currenly restricted to 32 & 64 bit Linux. Even if you manage to compile it on Windows, you won't get any speed benefit from it.
MonoDevelop for Windows runs on the .Net runtime, while the Mono.Simd.dll that comes with Mono 2.8 is installed in Mono's GAC.
You will need to Add Reference in your project to the Mono.Simd.dll that came with Mono 2.8.
It should be roughly in:
C:\Program Files (x86)\Mono-2.8\lib\mono\2.0\Mono.Simd.dll.

Trouble registering ChilkatDotNet4.dll to the GAC

I'm trying to add a .NET 4.0 .dll to the GAC. I am attempting to do this because it is published by a 3rd party company as both a 32 and 64bit .dll which I must use from different apps on different platforms in both formats.
At any rate, I am having trouble registering this dll to the GAC on a Windows Server 2008 environment.
I have tried copying gacutil.exe (and supporting file) found at "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools" on my local machine to the "C:\Windows\Microsoft.NET\Framework\v4.0.30319" folder on the target production server per the suggestions found here.
I then tried copying them to "C:\Windows\Microsoft.NET\Framework64\v4.0.30319".
Running from both locations indicated successful installation. And indeed, the registration appears successful:
C:\Windows\Microsoft.NET\assembly\GAC_64\ChilkatDotNet4\v4.0_9.0.8.0__eb5fc1fc52ef09bd\ChilkatDotNet4.dll
C:\Windows\Microsoft.NET\assembly\GAC_32\ChilkatDotNet4\v4.0_9.0.8.0__eb5fc1fc52ef09bd\ChilkatDotNet4.dll
However, running a console app that refers to the (64bit) version of the dll errors out with the following message:
System.IO.FileNotFoundException: Could
not load file or assembly
'ChilkatDotNet4.dll' or one of its
dependencies. The specified module
could not be found. File name:
'ChilkatDotNet4.dll'
So, I have now manually created the following GAC entries using mkdir and copy from a command prompt (which may or may not actually work. I have no clue what is so special about gacutil.exe):
C:\Windows\Microsoft.NET\assembly\GAC_MSIL\ChilkatDotNet4\v4.0_9.0.8.0__eb5fc1fc52ef09bd\ChilkatDotNet4.dll (using the 64bit version of the dll)
C:\Windows\assembly\GAC_64\ChilkatDotNet4\v4.0_9.0.8.0__eb5fc1fc52ef09bd\ChilkatDotNet4.dll
C:\Windows\assembly\GAC_32\ChilkatDotNet4\v4.0_9.0.8.0__eb5fc1fc52ef09bd\ChilkatDotNet4.dll
After each "install" of the dll, I tested and received the same error. Any ideas welcome!
EDIT: the GAC issue above may not actually be the culprit. Turns out, even when I create a brand new Console App project and add the .dll directly (so that it lives in the bin), I still can't run it on the sever. Also, I've noted that Console apps are created targeting the .NET 4.0 Client Profile rather than the .NET Framework 4. When I try to run it targeting the client profile, it appears that none of the System.Web* libraries are available. However, I tried running a very simple test app targeting both and neither would run on the server while referencing the bad .dll.
Is there a special kind of install that was to occur to run .NET 4.0 Console Apps?
For anyone else who may have trouble with this in the future. It was not a generalized problem with the way I was registering the dll to the GAC or how I was referring to it from my projects.
ChilkatDotNet4.dll (and the other versions I'm sure) was built in Visual C++. So, the server it is being deployed to has to have the Visual C++ Runtime installed for the appropriate processor architecture.
For 2010 (.NET 4.0):
x86
x64
If you're running an x86 app on a 64-bit platform. Make sure to mark the application pool with "Enable 32-bit applications" = true.