Is it possible to build pre .NET targets with MSBuild?

Hi,
I'm new to MSBuild and I'm wondering if it is able to build pre .NET targets, e.g. VB6, C++6 kind of targets?
Best regards,
Jnvr
[155 byte] By [jnvr] at [2007-12-17]
# 1

MSBuild is a multipurpose build engine. Just because it is written in managed code does not mean it has any preference for building managed code.

However, that isn't all the story.

-- In Whidbey, MSBuild will only ship with build rules (*.targets files) and tasks for managed projects. You'd have to write your own targets and tasks, etc, or use the Exec task to call VC tools. This would be some work, but perfectly possible. In the next release, we hope to support VC/unmanaged build specifically too, and we're already prototyping it
-- VC6, VB6 project files aren't in MSBuild format. You'd need to create MSBuild format project files that listed all the files, properties, etc and have them import your build rules

In short, it's quite possible, but you'd have to do a bit of work. If folks out there want to collaborate amongst themselves to do it, we'd wish them well!

[This posting is provided "AS IS" with no warranties, and confers no rights]

DanMoseley at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio MSBuild...
# 2

When you say "managed projects" does that include projects made in VS.Net 2003?

DerrickPowell at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio MSBuild...
# 3

Hello, i am facing the same problem.

"error MSB4075: The project file must be opened in VS IDE and converted to latest version before it can be build by MSBuild."

I have seen a solution for IDE building previous .net framework. I have project in VS2003 and .NET 1.1 framework.
Is MSBuild only for 2.0 framework?

Thanks.
Nike

-nike at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio MSBuild...
# 4
The VS2003 project must be converted to MSBuild format before it can be built by MSBuild. The conversion happens the first time you load that project into Visual Studio 2005. Alternatively, we have a command-line tool that does the same thing ... called MSBuildConvert.exe ... I'm working on getting this tool posted publicly somewhere. In the meantime, it's very easy to whip together this tool yourself since the main logic for doing the conversion is in Microsoft.Build.Conversion.dll which is installed by VS 2005. All you have to do is write a Console Application that references Microsoft.Build.Conversion.dll, uses the Microsoft.Build.Conversion namespace and has this code:

ProjectFileConverter projectFileConverter = new ProjectFileConverter();
projectFileConverter.OldProjectFile = pathToOldProjectFile;
projectFileConverter.NewProjectFile = pathToNewProjectFile;
projectFileConverter.IsUserFile = true if this is a .USER file, false otherwise.
projectFileConverter.Convert(pathToDotNetFramework20);

You would need to convert both the main .CSPROJ/.VBPROJ file as well as the .USER file to MSBuild format in order for MSBuild to process it.

The shipping MSBuild only runs on the 2.0 framework, and can only build projects that produces assemblies that run on the 2.0 framework. However, if you follow the blogs by Jomo Fisher and Robert McLaws, there is a kit that allows you to use MSBuild to build applications that target the 1.1 framework. However, the fact remains that you still must convert your VS 2003 projects to MSBuild format (aka, VS 2005 format) before this is possible.

Hope this helps.

--Rajeev

RajeevGoelmsft at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio MSBuild...
# 5
Hello Dan,

I want to build VB6 projects with MSbuild, can you point me to relevant how to information? How do I create "MSBuild format project files" and build rules? Please note that I have no experience with MSbuild.

Best regards,
jnvr

jnvr at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio MSBuild...
# 6
See www.freetodev.com to do this.
FreeToDev at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio MSBuild...

Visual Studio

Site Classified