Custom process step: build a .net project
-
wrote on 9 Jun 2022, 08:48 last edited by
Hello,
I have a solution with several Qt subprojects, which is set to build all through command line/qmake (no QtCreator).
Now I would like to insert a new .net project and configure the custom build for it, in order to have a complete build of all subprojects with only one command.
With QtCreator is quite simple disable the standard build steps and add a new custom process step, I made it. But in my solution I cannot count on QtCreator and the .pro.user file, but only on the .pro file.I have googled and I found that is possibile to use QMAKE_EXTRA_TARGETS in .pro file to add the custom build step so I wrote this in the .pro file:
CONFIG = debug_and_release DOTNET_SDK = FALSE system("dotnet --version"): DOTNET_SDK = TRUE equals(DOTNET_SDK, "FALSE") { error("Mandatory dotnet SDK not found!!!!") } dotenet_build.commands = dotnet.exe build ./mydotnetproject.csproj /property:GenerateFullPaths=true /consoleloggerparameters:NoSummary QMAKE_EXTRA_TARGETS += dotenet_build
But I have encountered two problems:
- The build execute some "standard" compilation steps that should be disabled (this project cannot be build with g++).
- The custom build step is not executed.
Can anybody help me?
-
Hi,
Wouldn't a custom compiler be better suited in this ?
-
Hi,
Wouldn't a custom compiler be better suited in this ?
wrote on 11 Jun 2022, 20:56 last edited by@SGaist said in Custom process step: build a .net project:
Hi,
Wouldn't a custom compiler be better suited in this ?
I wondered, but the configuration of the custom compiler seemed to me more oriented to having a list of sources to be processed in input and a list of files in output; In my case I just need a single command that takes in input a single file.
-
The fact that you only need to pass one file is not important. If the tool does what you want, it's all that matters.
-
The fact that you only need to pass one file is not important. If the tool does what you want, it's all that matters.
wrote on 16 Jun 2022, 12:38 last edited by@SGaist said in Custom process step: build a .net project:
The fact that you only need to pass one file is not important. If the tool does what you want, it's all that matters.
I finally managed to configure my custom build step, but a problem remains: as the first step always activates the compilation with the standard compiler, which in my case, since there are no sources to process, says that it has no file to work on. I wish only the build with the extra compiler would remain, deactivating the standard one.
1/5