Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find ILMerge executable #13

Closed
bassettb opened this issue Mar 28, 2018 · 16 comments
Closed

Cannot find ILMerge executable #13

bassettb opened this issue Mar 28, 2018 · 16 comments

Comments

@bassettb
Copy link

bassettb commented Mar 28, 2018

It is unable to find my ilmerge package.
Nuget packages can be stored under C:\Users%USERNAME%.nuget\packages
It might also be one level deeper under a version folder, like "packages\ilmerge\2.13.307"

@bassettb bassettb reopened this Mar 28, 2018
@emerbrito
Copy link
Owner

If both packages: "ILMerge-MSBuild-Task" and "ILMerge" are under the same "packages" folder, the build task should be able to resolve it, for example:

image

In above scenario it doesn't matter where "packages" is located, as long as your Visual Studio solution is aware of it and "ILMerge-MSBuild-Task" is running from there.

If you are still experiencing issues, please send your build log, it may help me narrow it down.

@TheGoctor
Copy link

I'm also seeing this. Build output shows:

Task lib location: C:\Users\%USERNAME%\.nuget\packages\ilmerge.msbuild.task\1.0.3\tools
Package location: C:\Users\%USERNAME%\.nuget\pacakges\ilmerge.msbuild.task
No folder starting with 'ILMerge' were found under C:\Users\%USERNAME%\.nuget\packages\ilmerge.msbuild.task.
...

By looking at ExeLocationHelper.cs, I can see it's only going up two levels from the Task lib location on line 134.

Sorry, I don't have time to open a PR myself, but hopefully that gives someone else a head start.

@M-Pixel
Copy link

M-Pixel commented Jun 10, 2018

Nuget changed its package layout since @emerbrito posted that screenshot - now instead of packages\assembly.version\tools\..., we have packages\assembly\version\tools\.... It's now necessary to go 3 levels up instead of 2, for that reason.

@gabbyrozow
Copy link

This issue still seems to be a problem. It works when the ILMerge nuget used is version 2.14.1203, but breaks with this error in more current versions for some reason

@emerbrito emerbrito added the bug label Nov 21, 2018
@emerbrito
Copy link
Owner

My apologies. My delay is due to email notifications issues that I hope I fixed for good this time.
Are you still experiencing this? I just tested it with the latest ILMerge package (3.0.21) and the latest extension version and it worked just fine.

If it is still an issue could you please provide me more details on how I can reproduce it so I can work on it ASAP? Please include versions of vs, .net framework and packages you are using.

@emerbrito emerbrito added help wanted and removed bug labels Nov 21, 2018
@Ahmed-Elrayes
Copy link

Ahmed-Elrayes commented Dec 2, 2018

well i got this issue for the latest Version of ILMerge check the pic in number 2 , when u download it from NuGet the ILMerge.exe is in a wrong folder it inside packages\ILMerge.3.0.21\tools\net452
but it should be like Number 1
packages\ILMerge.3.0.21\tools
when i copied it and pasted inside the correct destination it worked
image 2

@gabbyrozow
Copy link

gabbyrozow commented Dec 4, 2018 via email

@Ahmed-Elrayes
Copy link

it's ok am glad that i can help

@xuxuedong
Copy link

@emerbrito when i use vs2017 + ilmerge 3.0.21 + msbuild.ilmerge.task 1.0.5, it has following error
"system.io.filenotfoundexception: cannot find ilmerge executable."

@Ahmed-Elrayes
Copy link

@emerbrito when i use vs2017 + ilmerge 3.0.21 + msbuild.ilmerge.task 1.0.5, it has following error
"system.io.filenotfoundexception: cannot find ilmerge executable."

i guess this might fix your issue
#13 (comment)

@cnrat
Copy link

cnrat commented Jan 13, 2019

well i got this issue for the latest Version of ILMerge check the pic in number 2 , when u download it from NuGet the ILMerge.exe is in a wrong folder it inside packages\ILMerge.3.0.21\tools\net452
but it should be like Number 1
packages\ILMerge.3.0.21\tools
when i copied it and pasted inside the correct destination it worked
image 2

This issue still not be fixed. Thanks to this walk around.

@ltrzesniewski
Copy link

The ILMerge NuGet package sets a $(ILMergeConsolePath) property which ILMerge.MsBuild.Task could use to locate the tool.

@emerbrito
Copy link
Owner

emerbrito commented Jan 15, 2019

I tried several times but I still cannot reproduce what was described here (comment). Every time I install the package it goes to the expected folders.

I will try to improve the way it locates the executable in order to avoid this.

@emerbrito
Copy link
Owner

The ILMerge NuGet package sets a $(ILMergeConsolePath) property which ILMerge.MsBuild.Task could use to locate the tool.

I will look into this.
Meanwhile to anyone experiencing issues, there is an property in the configuration file where you can also manually specify the path of your ilmerge executable (as a last resort): "AlternativeILMergePath":

https://github.com/emerbrito/ILMerge-MSBuild-Task/wiki/Config-File

@emerbrito
Copy link
Owner

Moving forward we will use $(ILMergeConsolePath) as suggested by @ltrzesniewski since it can always provide the exact location of the executable.
Please refer to issue "#23 - Improve the way ilmerge executable is located" for more details.

There you will also find screenshots, logs and examples where the build task was able to successfully find the executable under different scenarios including the ones mentioned here.

This will be available on v1.0.5.

@emerbrito
Copy link
Owner

Shipped with v1.0.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants