vs2008 question.

F

Frank Rizzo

Before I download and install 2008, I have a question. One of the
selling points of 2008 is multi-targeting. I work on a team where
everyone uses vs2005. Can I use vs 2008 for development and have it
target .net 2.0 and count on the IDE not to mess up the .csproj and .sln
files, so that my teammates can still use the projects and solutions?

Thanks.
 
C

Chris Mullins [MVP - C#]

No.

VS2008 will put out assemblies that run just fine on 2.0, but it'll tinker
with the solution and project files.

We ran into that where I'm at, and decided to push everyone up to VS2008.
 
J

Jon Skeet [C# MVP]

Frank Rizzo said:
Before I download and install 2008, I have a question. One of the
selling points of 2008 is multi-targeting. I work on a team where
everyone uses vs2005. Can I use vs 2008 for development and have it
target .net 2.0 and count on the IDE not to mess up the .csproj and .sln
files, so that my teammates can still use the projects and solutions?

It will change the solution files in an incompatible way, and change
the project files *somewhat*. I've certainly used projects with both
2005 and 2008, but on a machine with .NET 3.5 installed - I don't know
what happens if you try to use a 2008 project on a machine with only
2.0.

(Also, there's something about MSBuild directories that means it's best
to create the project with 2005, IIRC.)
 
F

Frans Bouma [C# MVP]

Frank said:
Before I download and install 2008, I have a question. One of the
selling points of 2008 is multi-targeting. I work on a team where
everyone uses vs2005. Can I use vs 2008 for development and have it
target .net 2.0 and count on the IDE not to mess up the .csproj and
.sln files, so that my teammates can still use the projects and
solutions?

The csproj files differ in 1 location:
<Project DefaultTargets="Build"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

vs. the 2008 version:

<Project DefaultTargets="Build"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
ToolsVersion="3.5">

I haven't checked the .sln files yet. As it's an attribute, you
probably will be able to load these files into vs.net 2005, but when
you're saving them, it's likely that attribute is gone, so you won't be
able to load them back into 2008 without conversion.

FB


--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
 
J

Jon Skeet [C# MVP]

On Nov 20, 9:39 am, "Frans Bouma [C# MVP]"

I haven't checked the .sln files yet. As it's an attribute, you
probably will be able to load these files into vs.net 2005, but when
you're saving them, it's likely that attribute is gone, so you won't be
able to load them back into 2008 without conversion.

There's more than you showed (at least on my box) - there's:

(VS2005)
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />

vs

(VS2008)
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

That's the bit that's caused me grief before now - using the 2005
version from 2008 works, but not vice versa.

Jon
 
F

Frank Rizzo

Jon said:
On Nov 20, 9:39 am, "Frans Bouma [C# MVP]"

I haven't checked the .sln files yet. As it's an attribute, you
probably will be able to load these files into vs.net 2005, but when
you're saving them, it's likely that attribute is gone, so you won't be
able to load them back into 2008 without conversion.

There's more than you showed (at least on my box) - there's:

(VS2005)
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />

vs

(VS2008)
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

That's the bit that's caused me grief before now - using the 2005
version from 2008 works, but not vice versa.

Well, that sucks, given the multitargeting feature.
 
J

Jon Skeet [C# MVP]

Frank Rizzo said:
Well, that sucks, given the multitargeting feature.

Well, they're somewhat different things - it's much more viable to
upgrade a whole development team to VS2008 than to require .NET 3.5 at
all deployments, in many cases.

However, it's really not an issue here - just create the project in
VS2005, add it to an existing 2008 solution, and all appears to be
well. Or just edit that part of the .csproj file manually. It's not too
bad.
 
F

Frans Bouma [C# MVP]

Jon said:
On Nov 20, 9:39 am, "Frans Bouma [C# MVP]"

I haven't checked the .sln files yet. As it's an attribute,
you probably will be able to load these files into vs.net 2005, but
when you're saving them, it's likely that attribute is gone, so you
won't be able to load them back into 2008 without conversion.

There's more than you showed (at least on my box) - there's:

(VS2005)
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />

vs

(VS2008)
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

That's the bit that's caused me grief before now - using the 2005
version from 2008 works, but not vice versa.

Hmm, indeed. Thanks for looking into that, I looked in a simple
project file.

FB

--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top