Closed jimitndiaye closed 13 years ago
It seems to work both for me and our build server, could it be that you have service location GAC:ed?
On Thu, Sep 29, 2011 at 2:35 PM, Jimit Ndiaye < reply@reply.github.com>wrote:
Working with the latest commit (f8777c483815333d9b737e6a7426d267ddf6db50), I tried building the source but ILMerge fails:
ILMerge version 2.10.219.0 Copyright (C) Microsoft Corporation 2004-2006. All rights reserved. ILMerge /keyfile:NServiceBus.snk /out:build\output\host\NServiceBus.Host.exe build\hosting\NServiceBus.Hosting.Windows.exe build\hosting\NServiceBus.Hosting.dll build\hosting\Microsoft.Practices.ServiceLocation.dll build\hosting\Magnum.dll build\hosting\Topshelf.dll /internalize:ilmerge.exclude /target:exe /xmldocs /log:build\output_windowshost.txt /targetplatform:v4,C:\Windows\Microsoft.NET\Framework\v4.0.30319 Set platform to 'v4', using directory 'C:\Windows\Microsoft.NET\Framework\v4.0.30319' for mscorlib.dll Running on Microsoft (R) .NET Framework v4.0.30319 mscorlib.dll version = 4.0.0.0 Read 6 lines from the exclusion file 'ilmerge.exclude'. The list of input assemblies is: build\hosting\NServiceBus.Hosting.Windows.exe build\hosting\NServiceBus.Hosting.dll build\hosting\Microsoft.Practices.ServiceLocation.dll build\hosting\Magnum.dll build\hosting\Topshelf.dll Trying to read assembly from the file 'C:\dev\Tools\NServicebus\git\build\hosting\NServiceBus.Hosting.Windows.exe'. Successfully read in assembly. There were no errors reported in NServiceBus.Hosting.Windows's metadata. Trying to read assembly from the file 'C:\dev\Tools\NServicebus\git\build\hosting\NServiceBus.Hosting.dll'. Successfully read in assembly. There were no errors reported in NServiceBus.Hosting's metadata. Could not find the file 'build\hosting\Microsoft.Practices.ServiceLocation.dll'. An exception occurred during merging: ILMerge.Merge: Could not find the file 'build\hosting\Microsoft.Practices.ServiceLocation.dll'. at ILMerging.ILMerge.Merge() at ILMerging.ILMerge.Main(String[] args)
Reply to this email directly or view it on GitHub: https://github.com/NServiceBus/NServiceBus/issues/130
I do, but to be on the safe side since the file is required for ILMerge don't you think it makes sense to force copylocal so it works regardless of the environment?
Yes, that makes sense!
On Fri, Oct 7, 2011 at 1:03 PM, Jimit Ndiaye < reply@reply.github.com>wrote:
I do, but to be on the safe side since the file is required for ILMerge don't you think it makes sense to force copylocal so it works regardless of the environment?
Reply to this email directly or view it on GitHub: https://github.com/NServiceBus/NServiceBus/issues/130#issuecomment-2320134
Set the ServiceLocation.dll to copy local in all projects where it's used
Awesome :) Thanks.
Working with the latest commit (f8777c483815333d9b737e6a7426d267ddf6db50), I tried building the source by running build.bat but ILMerge fails:
ILMerge version 2.10.219.0 Copyright (C) Microsoft Corporation 2004-2006. All rights reserved. ILMerge /keyfile:NServiceBus.snk /out:build\output\host\NServiceBus.Host.exe build\hosting\NServiceBus.Hosting.Windows.exe build\hosting\NServiceBus.Hosting.dll build\hosting\Microsoft.Practices.ServiceLocation.dll build\hosting\Magnum.dll build\hosting\Topshelf.dll /internalize:ilmerge.exclude /target:exe /xmldocs /log:build\output_windowshost.txt /targetplatform:v4,C:\Windows\Microsoft.NET\Framework\v4.0.30319 Set platform to 'v4', using directory 'C:\Windows\Microsoft.NET\Framework\v4.0.30319' for mscorlib.dll Running on Microsoft (R) .NET Framework v4.0.30319 mscorlib.dll version = 4.0.0.0 Read 6 lines from the exclusion file 'ilmerge.exclude'. The list of input assemblies is: build\hosting\NServiceBus.Hosting.Windows.exe build\hosting\NServiceBus.Hosting.dll build\hosting\Microsoft.Practices.ServiceLocation.dll build\hosting\Magnum.dll build\hosting\Topshelf.dll Trying to read assembly from the file 'C:\dev\Tools\NServicebus\git\build\hosting\NServiceBus.Hosting.Windows.exe'. Successfully read in assembly. There were no errors reported in NServiceBus.Hosting.Windows's metadata. Trying to read assembly from the file 'C:\dev\Tools\NServicebus\git\build\hosting\NServiceBus.Hosting.dll'. Successfully read in assembly. There were no errors reported in NServiceBus.Hosting's metadata. Could not find the file 'build\hosting\Microsoft.Practices.ServiceLocation.dll'. An exception occurred during merging: ILMerge.Merge: Could not find the file 'build\hosting\Microsoft.Practices.ServiceLocation.dll'. at ILMerging.ILMerge.Merge() at ILMerging.ILMerge.Main(String[] args)
Update: Upon further investigation it seems this occurs because Microsoft.Practices.ServiceLocation.dll was found in the GAC and so wasn't copied into the output directory. It can be fixed by either forcing copy-local (setting "Private" to "true" in the assembly reference or deleting the assembly from the GAC (not recommended).