Use msbuild instead of csc/vbc

Description

Need to see whether MSBuild can handle everything that NAnt can, and maybe switch if so.

Environment

None

Activity

Show:

Alex Zaytsev May 1, 2017 at 3:40 AM

Closing issues resolved in 4.1.0

Johannes Rauber February 20, 2016 at 5:50 PM

Johannes Rauber February 20, 2016 at 2:32 AM
Edited

Considering the effort of #2 i started with #1 instead and changed the nant script to trigger msbuild. Works quite well only subtle differences in the build output do exist. Hope to fix them tomorrow.

  • The HbmXsd.exe does not prefix with the namespace "NHibernate.Tool".

  • The NHibernate.dll differs in size. The one that msbuild did provide is 4kb smaller.

  • Currently there is a difference in the flow of the nant script that i do not understand.

Johannes Rauber February 18, 2016 at 8:05 PM

I had a look into the NAnt-Build-Definitions : common.xml, common-project.xml, NHibernate.build and default.build. Seems to be rather complex and the nant syntax (msbuild isn’t better) makes it even harder to someone who doesn't use nant frequently to understand what is going on.
Currently I see two possibilities to do the switch.

1. Change whats already there: Only switch the csc –task and use msbuild instead inside the common.compile-tests, common.compile-dll and common.compile-exe targets. The file gathering currently used would have to change as it pushes a list of *.cs files to the csc-task. Instead only the solution should be passed. As the build output of the msbuild task deviates from the one that csc does output the structure that the later running ant-tasks expect has to be reproduced. The ant task for msbuild is located in a contrib project whose latest release is last updated in mid 2012 but seems to be functional. I tested a simple “msbuild Nhibernate.sln” which did work out of the box.

2. Do it all over: Use a different build tool like FAKE or CAKE who support msbuild out of the box and provide a less verbose syntax than nant and msbuild and their XML-Files. Build a minimum viable build job and add functionality when needed. A complete remodeling of the current seems to be a vast amount of work. Maybe there are some parts in the current implementation that are not used anymore. Might be the solution that is more future proof considering the changes that will be necessary to tackle NH-3807.

Alex Zaytsev January 4, 2016 at 10:57 PM

without switching to msbuild (at least as replacement of csc) we cannot move forward

Fixed

Details

Assignee

Reporter

Labels

Components

Fix versions

Affects versions

Priority

Who's Looking?

Open Who's Looking?

Created November 10, 2006 at 5:25 AM
Updated May 1, 2017 at 3:40 AM
Resolved February 26, 2016 at 11:23 AM
Who's Looking?