ravibpatel / ILRepack.Lib.MSBuild.Task

MSBuild task for ILRepack which is an open-source alternative to ILMerge.
Other
107 stars 30 forks source link

`LogFile` has no effect #14

Closed uecasm closed 5 years ago

uecasm commented 5 years ago

https://github.com/ravibpatel/ILRepack.Lib.MSBuild.Task/blob/212bbb44a7c60070a1596d2f5e7588bbd659a73a/ILRepack.Lib.MSBuild.Task/ILRepack.cs#L271

The problem is that nothing ever calls Open on the logger to give it a filename, so no log file is ever created.

See this code in the command-line version of ILRepack:

https://github.com/gluck/il-repack/blob/3f3371a5eb7b80ac37530cc08c2f683a63c990a9/ILRepack/Application.cs#L21-L28

(Also note the finally clause.)

ravibpatel commented 5 years ago

Thanks for pointing it out. I will fix it asap.

ravibpatel commented 5 years ago

It seems that ILRepack.Lib doesn't expose the RepackLogger class so there is no way to provide logger to ILRepack constructor.

uecasm commented 5 years ago

That's true, but you can copy its implementation and pass it in as an ILogger.