teamcity-dotnet-plugin icon indicating copy to clipboard operation
teamcity-dotnet-plugin copied to clipboard

Custom command for dotnet

Open holotrek opened this issue 7 years ago • 6 comments

Would like to see support for migrations, i.e. dotnet ef commands, specifically dotnet ef database update

holotrek avatar Aug 14 '17 15:08 holotrek

We could not implement UI for all cases, but we could provide dotnet custom command where user could specify any arguments for dotnet executable like ef database update in this case.

dtretyakov avatar Sep 16 '17 21:09 dtretyakov

I was able to do this using runner type "Command Line" (not dotnet CLI but OS command line) and in "custom script" field i simply wrote "dotnet ef migrations add Initial" for example, and it got called. I got other erros but i think i can fix them. Also, dont forget to "dotnet CLI restore" before doing that.

SirGordon avatar Nov 03 '17 07:11 SirGordon

It would be useful if the "Command" field can also be blank because I want to run a compiled .net core assembly like this: dotnet.exe MyCompiledDotNetCoreAssembly.dll OneParameter TwoParameter, not dotnet.exe run, not dotnet.exe ef, just dotnet.exe.

RickyLin avatar Dec 06 '17 02:12 RickyLin

@RickyLin did you try to add ".NET Process Runner" build step?

SirGordon avatar Dec 06 '17 06:12 SirGordon

@SirGordon Yes. But it seems to be used for full .NET Framework 2.0, 3.5, 4.x, not for .NET Core. Anyway, I can also use "Command Line", so it's not a huge problem. I mentioned it here to show one more scenario besides "dotnet ef" 😆

RickyLin avatar Dec 06 '17 13:12 RickyLin

Being able to enter a custom command like dotnet lambda package would be particularly useful. I'm sure I can get it working through other means, but being able to enter a custom command might be simpler.

https://github.com/aws/aws-lambda-dotnet/blob/master/Libraries/src/Amazon.Lambda.Tools/README.md

theerikpowell avatar Feb 20 '18 16:02 theerikpowell

Closing this issue since the custom command in .NET runner is already presented. It allows to run dotnet executable with arbitrary parameters. You could install or use a .NET tool or run executables.

Please, feel free to reopen if it doesn't work for you for some reason.

mchechulnikov avatar Oct 30 '23 17:10 mchechulnikov