Click here to Skip to main content
15,899,474 members
Home / Discussions / C#
   

C#

 
AnswerRe: Pages file attribute. Pin
Big Daddy Farang20-Sep-07 6:44
Big Daddy Farang20-Sep-07 6:44 
QuestionForm Styles.. Pin
Dio2219-Sep-07 7:03
Dio2219-Sep-07 7:03 
AnswerRe: Form Styles.. Pin
Luc Pattyn19-Sep-07 7:36
sitebuilderLuc Pattyn19-Sep-07 7:36 
GeneralRe: Form Styles.. Pin
Dio2219-Sep-07 8:43
Dio2219-Sep-07 8:43 
QuestionMonthCalendar refresh problem Pin
DeepToot19-Sep-07 5:35
DeepToot19-Sep-07 5:35 
AnswerRe: MonthCalendar refresh problem Pin
DeepToot20-Sep-07 3:34
DeepToot20-Sep-07 3:34 
QuestionC# - Sharing assembly between projects? Pin
wbjohnson19-Sep-07 5:24
wbjohnson19-Sep-07 5:24 
AnswerRe: C# - Sharing assembly between projects? Pin
Patrick Etc.19-Sep-07 15:51
Patrick Etc.19-Sep-07 15:51 
Hi Will,

Create a new Smart Device (PDA) class library project in your solution.

Right-click the project and select Add->Existing Items. Navigate to the directory that contains your library files, and select them. In the navigation window, rather than clicking the "Add" button, click the small dropdown arrow on the side of the "Add" button. It will show a menu that says "Add as Link." Select that option.

You'll see the files show up in your project with small shortcut icons attached to them. When you compile this project, it will compile the files using the Compact Framework compiler to this Smart Device project's output directory (not to the original WinForms project's directory).

This way, you have two separate projects with the same source files, that will compile to their respective target frameworks. Making edits in the files will show up in both projects.

NOTE:
If you open the files from the desktop project, you will get Intellisense for the full framework. If you open the files from the PDA project, you will get Intellisense for the Compact Framework. Even though it is exactly the same files, Visual Studio will determine which editing environment to use based on which project opened the files.

ALSO:
If you need code specific to either framework, define a symbol in your Compact Framework project properties that you can use for #if..#endif pragmas. This way you can add custom code for each framework that won't interfere with the compiled code in the other framework.

For example:

Say you define a symbol "NET_CF" in your Compact Framework project. In your code you can do something like this:

#if NET_CF
... CF code...
#else
... Desktop code...
#endif

Hope this helps



The early bird who catches the worm works for someone who comes in late and owns the worm farm. -- Travis McGee

GeneralRe: C# - Sharing assembly between projects? Pin
wbjohnson19-Sep-07 21:14
wbjohnson19-Sep-07 21:14 
GeneralRe: C# - Sharing assembly between projects? Pin
Patrick Etc.20-Sep-07 3:53
Patrick Etc.20-Sep-07 3:53 
QuestionSplitting strings while taking escaped characters into account Pin
martin_hughes19-Sep-07 5:16
martin_hughes19-Sep-07 5:16 
AnswerRe: Splitting strings while taking escaped characters into account Pin
Larantz19-Sep-07 10:41
Larantz19-Sep-07 10:41 
QuestionInter process communication Pin
KrunalC19-Sep-07 4:42
KrunalC19-Sep-07 4:42 
AnswerRe: Inter process communication Pin
led mike19-Sep-07 5:09
led mike19-Sep-07 5:09 
GeneralRe: Inter process communication Pin
KrunalC19-Sep-07 5:12
KrunalC19-Sep-07 5:12 
GeneralRe: Inter process communication Pin
led mike19-Sep-07 5:51
led mike19-Sep-07 5:51 
QuestionError creatin window handle Pin
eoe19-Sep-07 4:09
eoe19-Sep-07 4:09 
AnswerRe: Error creatin window handle Pin
Judah Gabriel Himango19-Sep-07 4:37
sponsorJudah Gabriel Himango19-Sep-07 4:37 
GeneralRe: Error creatin window handle Pin
eoe19-Sep-07 19:20
eoe19-Sep-07 19:20 
AnswerRe: Error creatin window handle Pin
mav.northwind19-Sep-07 19:17
mav.northwind19-Sep-07 19:17 
GeneralRe: Error creatin window handle Pin
eoe19-Sep-07 21:24
eoe19-Sep-07 21:24 
GeneralRe: Error creatin window handle Pin
Judah Gabriel Himango20-Sep-07 4:26
sponsorJudah Gabriel Himango20-Sep-07 4:26 
QuestionFire a keyboard event.... Pin
Arish rivlin19-Sep-07 3:56
Arish rivlin19-Sep-07 3:56 
AnswerRe: Fire a keyboard event.... Pin
Judah Gabriel Himango19-Sep-07 4:35
sponsorJudah Gabriel Himango19-Sep-07 4:35 
GeneralRe: Fire a keyboard event.... Pin
Arish rivlin19-Sep-07 6:10
Arish rivlin19-Sep-07 6:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.