Too many assemblies deployed to target device (.NET 2.0 CF)

0

Is use VS 2005 and want to deploy my .NET C# application to a device (Scanner Honeywell 7600)

On the device .NET 2 CF (SP1) is running with Windows CE 5.0.

If I create a default project in VS (Smart Device -> Windows CE 5.0 -> Device application) and just deploy the application, everything works fine.

Now if I add one assembly reference, e.g. log4net and want to deploy, a lot of additional assemblies are deployed to the device. Actually too many, the device runs out of disc space, see following VS consoloe output:

Deploying 'C:\Windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.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_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll'
Deploying 'C:\Windows\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'
Deploying 'C:\Windows\assembly\GAC_MSIL\System.Configuration.Install\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.Install.dll'
Deployment and/or registration failed with error: 0x8973190e. Error writing file '%csidl_program_files%\scanandtrackdotnet\system.data.dll'. Error 0x80070070: Es steht nicht genug Speicherplatz auf dem Datenträger zur Verfügung.
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

Question: Why are e.g. System.Drawing.dll and System.Data.OracleClient.dll deployed to the device, they are part of the .NET Framework? .NET 2 CF is already installed on the device, so why are these assemblies deployed again?

.net
deployment
compact-framework
.net-assembly
smart-device
asked on Stack Overflow Oct 9, 2014 by Simon • edited Oct 10, 2014 by ctacke

2 Answers

1

Why are these assemblies deployed?

Because log4net requires them.

How can I prevent it?

By using a smaller logging library, or simply using a StreamWriter to roll your own.

answered on Stack Overflow Oct 9, 2014 by CodeCaster
0

You're referencing a desktop version of log4net, which the causes Studio to deploy all of its dependencies, which basically means "all of the desktop .NET framework" which obviously isn't going to fit (or work for that matter) on the device. You need to reference a version of log4net that is built for the Compact Framework.

You should never see Deploying 'C:\Windows\assembly\GAC_MSIL\* for a CF project.

answered on Stack Overflow Oct 10, 2014 by ctacke

User contributions licensed under CC BY-SA 3.0