teamcity-dotnet-plugin
teamcity-dotnet-plugin copied to clipboard
Custom command for dotnet
Would like to see support for migrations, i.e. dotnet ef
commands, specifically dotnet ef database update
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.
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.
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 did you try to add ".NET Process Runner" build step?
@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" 😆
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
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.