R
Rik Hemsley
I've seen (thanks to google groups) that it's possible to share code
between projects which target different .NET frameworks, by linking code
files.
I'd like to share an entire class library project, which is framework-
independent, between two solutions, one targetting the CF and one the
desktop.
My problem is that VS.NET 2003 won't allow me to share projects.
If I load up my desktop-targetting solution and try to add a class
library project which I specified (at creation) would target the CF, VS
says 'The operation could not be completed'.
If I load up my CF-targetting solution and try to add a class library
project which I specified would target the desktop framework, VS says
that the VB.NET compiler could not be created and that all projects in a
VB solution must target the same platform.
If it's not possible to share projects in this way (how are we supposed
to write cross-platform applications?) then perhaps it's possible to
share DLLs instead.
I tried adding a DLL, created by a desktop project, as a reference of a
CF project. VS then warned me that it may not be compatible, then gives
two errors looking like this:
Error: The dependency 'mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=969db8053d3322ac' in project 'LQGUI' cannot be copied to
the run directory because it would conflict with dependency 'mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
And one like this:
The dependency 'System.Design' could not be found.
Does the first error just mean that VS can't cope with me having two
..NET frameworks with the same version (but different targets)? If so, is
that even fixable?
Is my only option to create new projects and link all source files across?
Cheers,
Rik
between projects which target different .NET frameworks, by linking code
files.
I'd like to share an entire class library project, which is framework-
independent, between two solutions, one targetting the CF and one the
desktop.
My problem is that VS.NET 2003 won't allow me to share projects.
If I load up my desktop-targetting solution and try to add a class
library project which I specified (at creation) would target the CF, VS
says 'The operation could not be completed'.
If I load up my CF-targetting solution and try to add a class library
project which I specified would target the desktop framework, VS says
that the VB.NET compiler could not be created and that all projects in a
VB solution must target the same platform.
If it's not possible to share projects in this way (how are we supposed
to write cross-platform applications?) then perhaps it's possible to
share DLLs instead.
I tried adding a DLL, created by a desktop project, as a reference of a
CF project. VS then warned me that it may not be compatible, then gives
two errors looking like this:
Error: The dependency 'mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=969db8053d3322ac' in project 'LQGUI' cannot be copied to
the run directory because it would conflict with dependency 'mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
And one like this:
The dependency 'System.Design' could not be found.
Does the first error just mean that VS can't cope with me having two
..NET frameworks with the same version (but different targets)? If so, is
that even fixable?
Is my only option to create new projects and link all source files across?
Cheers,
Rik