Iko icon indicating copy to clipboard operation
Iko copied to clipboard

VS task runner uses hardcoded paths

Open shrayasr opened this issue 8 years ago • 14 comments

/u/opium_tm says (permalink):

VS runner is implemented completely wrong way. Paths to VS are hardcoded in lib. For VS before 2017 you should get installation paths from well known registry branch. For VS 2017 you should use documented COM interfaces to enumerate (possibly side by side) VS 2017 installations.

Fair point. Everything in the project is in a "works-for-me" kind of situation.

Basically we're currently at:

  • [X] ~~Make it work~~
  • [ ] Make it right
  • [ ] Make it fast

shrayasr avatar Oct 09 '17 03:10 shrayasr

Hello I am interested in solving this issue. Are you still active in this project?

SpartanX1 avatar Apr 21 '18 13:04 SpartanX1

Oh yes. I use it everyday :) Please go ahead.

shrayasr avatar Apr 21 '18 14:04 shrayasr

Hey you did not mention how to and where to place the config file?

SpartanX1 avatar Apr 22 '18 05:04 SpartanX1

Which config file @SpartanX1? The base iko config is placed at ~/iko.toml

shrayasr avatar Apr 22 '18 15:04 shrayasr

Do i need to install toml or something ? or just create a file with this name

SpartanX1 avatar Apr 22 '18 15:04 SpartanX1

I have made changes for vs17 , but i need to check how it works. Here's the syntax. I hope there is a space between path and @params?

var path = GetVisualStudioInstallationFolder();

Process.Start("cmd", $@"/c start "+path+" "[email protected]);

SpartanX1 avatar Apr 22 '18 15:04 SpartanX1

I am not clear on how to run and test the application. Could you please provide the steps? @shrayasr

SpartanX1 avatar Apr 22 '18 15:04 SpartanX1

Do i need to install toml or something ? or just create a file with this name

Not at all. TOML is a plain text file in a certain format. Just creating a file with the name is enough.

I am not clear on how to run and test the application. Could you please provide the steps?

  • Build it
  • dotnet \path\to\iko.dll <task name>

This assumes that you have already defined the tasks in the TOML file. In your case, the TOML file could be:

[ikosln]
cmd = 'vs17'
path = 'c:\users\spartanx1\projects\iko\iko.sln'

and run it as

dotnet \path\to\iko.dll ikosln

shrayasr avatar Apr 23 '18 03:04 shrayasr

Thanks I will test it out

SpartanX1 avatar Apr 23 '18 09:04 SpartanX1

You're welcome. Thank you for working on this 🎉

shrayasr avatar Apr 23 '18 11:04 shrayasr

Hello could you review my pull request @shrayasr

SpartanX1 avatar Apr 26 '18 10:04 SpartanX1

Will do it soon, @SpartanX1. Held up at work at the moment

shrayasr avatar Apr 26 '18 10:04 shrayasr

Sure thanks:)

SpartanX1 avatar Apr 29 '18 19:04 SpartanX1

@shrayasr Is this issue still open?

aintabb avatar Aug 19 '20 23:08 aintabb