# MSBuild very slow

**URL:** https://www.finalbuilder.com/forums/t/msbuild-very-slow/7514
**Category:** Discussion
**Created:** [July 19, 2024, 2:25pm UTC](https://www.finalbuilder.com/forums/t/msbuild-very-slow/7514 "2024-07-19T14:25:14Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![dev1](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dev1](https://www.finalbuilder.com/forums/u/dev1)
#### Post date: [July 19, 2024, 2:25pm UTC](https://www.finalbuilder.com/forums/t/msbuild-very-slow/7514/1 "2024-07-19T14:25:14Z")

</div>

From Finalbuilder when execute a rebuild with msbuild the task is very very slow.  
From VS 2022 about 2 minutes with Finalbuilder about 40 minutes.  
I suppose that this mistake is become when i update to the last minor version of Finalbuider.  
Any idea?

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [July 20, 2024, 12:12am UTC](https://www.finalbuilder.com/forums/t/msbuild-very-slow/7514/2 "2024-07-20T00:12:54Z")

</div>

There are 2 possible explainations

1. Logging - check the Log detail level on the Build tab. Also, running with live logging turned on and a high log level can really slow things down.

2. Antivirus software scanning log files - although this usually results in an error when FB cannot write to the log file.

---

<div class="post-metadata">

### Author: ![dev1](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dev1](https://www.finalbuilder.com/forums/u/dev1)
#### Post date: [August 8, 2024, 3:06pm UTC](https://www.finalbuilder.com/forums/t/msbuild-very-slow/7514/3 "2024-08-08T15:06:05Z")

</div>

Thanks for the answer but i have already disabled log and antivirus.  
I saw that if i start the compilation from VS 2022 there are 8 processes of MSBUILD.exe, meanwhile if i start from FB8 with the Task for compilation VS Solution this start only 4 processes of MSBUILD.exe.  
It’s possible to configure how much processes use for compile the solution?  
From VS 90 seconds from FB8 1200 seconds (:-

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [August 9, 2024, 12:18am UTC](https://www.finalbuilder.com/forums/t/msbuild-very-slow/7514/4 "2024-08-09T00:18:56Z")

</div>

On the MSBuild tab of the action properties dialog, add -m to the “Extra MSBuild parameters” field

 ![image](https://www.finalbuilder.com/forums/uploads/default/original/2X/e/e00064ce268117df9fac2083d13b8bee6559864d.png)

-m tells msbuild to use all cores available

> **[MSBuild Command-Line Reference - MSBuild](https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild-command-line-reference?view=vs-2022)**
>
> Learn how to use MSBuild.exe command line to build a project or solution file, and several switches you can include.
