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

ILMergeHelper uses incorrect TargetKind #312

Closed
rasmuskl opened this issue Jan 28, 2014 · 7 comments

Comments

@rasmuskl
Copy link

commented Jan 28, 2014

When running the ILMerge task it doesn't convert the TargetKind parameter to the correct string. When running with the default TargetKind (default is Library) it results in the following target parameter to ilmerge:

 /target:"fake.ilmergehelper+targetkind"
@forki

This comment has been minimized.

Copy link
Member

commented Jan 28, 2014

Can you please send a pull request?

@rasmuskl

This comment has been minimized.

Copy link
Author

commented Jan 28, 2014

I'm not that proficient at F# yet, so I'm hesitant to make a pull request. But I'd imaging that it could be handled by removing target from stringParams in ILMergeHelper.fs and replacing it with a parameter like the one below in lieu with internalize:

let target = 
    match parameters.TargetKind with
    | Library -> Some("target", "library")
    | Exe -> Some("target", "exe")
    | WinExe -> Some("target", "winexe")

@forki forki closed this in 8ec37cf Jan 28, 2014

forki added a commit that referenced this issue Jan 28, 2014
forki added a commit that referenced this issue Jan 28, 2014
@forki

This comment has been minimized.

Copy link
Member

commented Jan 28, 2014

Thanks for reporting.

There even was a test that asserted " /target:"fake.ilmergehelper+targetkind"" - WTF

@rasmuskl

This comment has been minimized.

Copy link
Author

commented Jan 28, 2014

Thanks for the quick fix. Your solution was more elegant that what I suggested, as I thought.

Nice test! Hah.

@forki

This comment has been minimized.

Copy link
Member

commented Jan 28, 2014

Will be released in a couple of on nuget with #2.7.0.34-alpha and #2.6.7.0

@forki

This comment has been minimized.

Copy link
Member

commented Jan 28, 2014

Would be interesting to learn a bit about the background of your use case and what we can do to improve docs in this case

@rasmuskl

This comment has been minimized.

Copy link
Author

commented Jan 28, 2014

I was actually quite fine with the docs. Ilmerge doesn't actually complain about the target being set to the wrong string. But I was using the ilmerge task to run ilrepack (similar project - and uses a parameter subset, but also works on Mono) with an alternate toolpath set to ilrepack.exe - this works fine except ilrepack throws up when you have invalid target.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.