chucknorris / roundhouse

RoundhousE is a Database Migration Utility for .NET using sql files and versioning based on source control

Home Page:http://projectroundhouse.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RH MsBuild NuGet Package

jochenjonc opened this issue · comments

After installing the RH msbuild package from nuget I'm unable to build my application. The reason is that the roundhouse.dll contains FluentNHibernate. Here's the error:

error CS0433: The type 'FluentNHibernate.Cfg.Fluently' exists in both '...\Source\packages\FluentNHibernate.1.2.0.712\lib\FluentNHibernate.dll' and '...\Source\packages\roundhouse.msbuild.0.8.0.332\lib\roundhouse.dll'
error CS0433: The type 'FluentNHibernate.Cfg.Db.MsSqlConfiguration' exists in both '...\Source\packages\FluentNHibernate.1.2.0.712\lib\FluentNHibernate.dll' and '...\Source\packages\roundhouse.msbuild.0.8.0.332\lib\roundhouse.dll'

Is it possible to internalize FluentNHibernate in RoundhousE with ILMerge? Or reference the FluentNHibernate NuGet package?

An other possibility is that the nuget package doesn't add the roundhouse.dll and roundhouse.tasks.dll to the references of the project. It should do what the normal rh nuget package does, just a a txt file that can easily be removed.

Another issue I have is that I can't just use roundhouse.tasks.dll directly from the NuGet packages directory because of the dependency on log4net.

This is the line in MSBuild:

Is it possible to ILMerge log4net in the roundhouse.tasks.dll and remove the nuget reference to log4net?

This is all over the place for you. :D

I am actually working on removing the dependency for log4net.

As far as NHibernate, we can unmerge all of that as well. I am merging everything for the task so that all you need is the dll (much like rh.exe). I take it you are using FluentNHibernate elsewhere in your tasks.

FNH is indeed referenced, but I like the idea that stuff get's ILMerged rather than a lot of separate assemblies.
The problem can be solved by using the /Internalize switch of ILMerge.
http://www.bjoernrochel.de/2009/07/07/how-to-shoot-yourself-in-the-foot-with-ilmerge/

There is some part of FNH that can not be internalized, but for the most part it can be.

If I can get it down to this: #8 - would that work?

Your issue is with FNH merging, not NH merging. We may be exploring some other options...

Take a look at this - #16

I think it will. I have a test project on Google code that Pascal and I will
use for an upcomming session on RH.

http://code.google.com/p/roundhouse-workshop

If you use the tag alongtimeago and add rh.msbuild via nuget, you will
notice the problem immediatly.

Jochen

Op 22 sep 2011 13:01 schreef "Rob Reynolds" <
reply@reply.github.com>:

If I can get it down to this:
#8 - would that work?

Reply to this email directly or view it on GitHub:
#15 (comment)

I just pushed up the change. Pull the latest and build from master/trunk and let me know if that solves the NHibernate issues you are seeing.

Let's log removing the dependency on log4net as a separate issue.