Microsoft KB Archive/813577

= PRB: Deployment Device Property of Smart Device Class Library Changes to Consuming Application After You Build =

Article ID: 813577

Article Last Modified on 5/20/2005

-

APPLIES TO


 * Microsoft .NET Compact Framework
 * Microsoft Visual Studio .NET 2003 Academic Edition
 * Microsoft Visual Studio .NET 2003 Enterprise Architect
 * Microsoft Visual Studio .NET 2003 Enterprise Developer

-



SYMPTOMS
When you create a class library for smart devices such as Microsoft Windows CE or Microsoft Pocket PC 2002, the deployment device may appear as a Same as device of consuming project option. When you consume this library in a smart device application that is in the same project group, the deployment device changes to Windows CE or Pocket PC 2002 or corresponding emulators, and the deployment device is not listed as a Same as device of consuming project option. Because of this, you may not be able to consume this library in another application with a different deployment device.



WORKAROUND
To work around this problem, do not add the class library in a project group. Create the class library in a separate project, build the library, and then add the reference to the compiled .dll file in your consuming application.



STATUS
This behavior is by design.



Steps to Reproduce the Behavior

 * 1) Start Microsoft Visual Studio .NET (2003).
 * 2) On the File menu, point to New, and then click Project.
 * 3) Click Visual C# Projects or Visual Basic Projects under Project Types, and then click Smart Device Application under Templates.
 * 4) Type MyTestSmartDeviceClassLibrary in the Name box, type the location on your hard disk in the Location box, and then click OK.
 * 5) Click Pocket PC or Windows CE under Platform, click Class Library under Project Type, and then click OK.
 * 6) On the File menu, point to Add Project, and then click New Project.
 * 7) Click Visual C# Projects or Visual Basic Projects under Project Types, and then click Smart Device Application under Templates.
 * 8) Type MyTestSmartDeviceApplication in the Name box, type the location on your hard disk in the Location box, and then click OK.
 * 9) Click Pocket PC or Windows CE under Platform, click Windows Application under Project Type, and then click OK.
 * 10) In Solution Explorer, right-click MyTestSmartDeviceApplication, and then click Add Reference.
 * 11) On the Projects tab, click MyTestSmartDeviceClassLibrary, click Select, and then click OK.
 * 12) On the Build menu, click Build Solution.
 * 13) In Solution Explorer, right-click MyTestSmartDeviceClassLibrary, and then click Properties.
 * 14) Click Device under Common Properties. Notice that the deployment device is not listed as a Same as device of consuming project option.

