compactframework >> Visual Studio2005 Beta2 & "Add Link to existing Item"

by Norbert » Wed, 13 Jul 2005 04:39:28 GMT

Hello

I have a weird behavior from VS2005 Beta2
Probably I missusing the feature...

What I want:
I have an PPC project.
but I also want to run it on a normal PC (for testing purposes)

I created a new "Windows Project" and added all the necessary files
from
the orignal project with
Add -> existing Item -> Add as Link

I modified the code where necassery with the following lines (for
example)
#if PPC_VERSION
private Microsoft.WindowsCE.Forms.InputPanel inputPanel1;
#endif

and in the PPC project I added the entry PPC_VERSION to the "Project
properties"
It builds without problems for the PPC-Project (as it was intended)

But if I compile the normal PC project it tells me, he cannot find the
"Microsoft.WindowsCE.Forms" Namespace, because he is compiling this
lines!
But I definitly never added a the PPC_VERSION define to the pc-project!

What I'm doing wrong??

I tried the approach from
http://www.danielmoth.com/Blog/2005/01/deploy-to-my-computer.html
but acutaly I destroyed my VS2005 installation, so I'm not able to
deploy to any device!!! Thats the reason for using another approach.

Regards

Norbert


compactframework >> Visual Studio2005 Beta2 & "Add Link to existing Item"

by Daniel Moth » Wed, 13 Jul 2005 05:02:55 GMT


1. The "Deploy to My Computer" steps on the blog entry you refer to are for
November CTP (as stated there) - for Beta 2 you need to follow alternative
steps which are at the bottom (read the last line). If you have done the
latter and are still having problems contact the appropriate person from the
link.

2. Sharing code between both platforms works as advertised and your approach
is correct; except you shouldn't try to share forms code since the designer
will regenerate the code! Note that with VS2005 there is already a constant
defined for you so you don't need to redefine your own (PocketPc)

3. Regardless, you should double click on the compiler error to see which
line it takes you to. I suspect that you have not wrapped all references to
InputPanel with #if. I tried to replicate your problem and it all works
nicely as expected on mine.

If you still think you are doing everything right, zip the project up and
make it available to us for comment.

Cheers
Daniel

Similar Threads

1. Visual Studio2005 Beta2 & "Add Link to existing Item"

2. Creating outlook add-in using VSTO 2005SE, Visual Studio2005

Hi, Please Help me anybody

I am working on Visual Studio 2005 Tools for Office. apart of my project I 
need to create Outlook 2003 add-in. i downloaded code samples from MSDN. But 
while trying to open those sample projects some error is coming. I have 
installed Visual studio 2005, VSTO 2005SE, VSTO 2005SE runtime, outlook 2003 
SP2, PIAS also. why its giving that error. 

Thanks in advance....
-- 
Jagan_m

3. How do I add existing visual Item to a project - .NET Windows Forms