Last post Jul 25, 2018 02:17 PM by rrkreitler
Jul 18, 2018 02:25 PM|rrkreitler|LINK
I have an ASP Core 2.0 project that builds via VS2017 (community) in 2.5 minutes. When I build with dotnet (same machine) it takes 8.5 minutes.
I see similar issues with other projects as well. When I first started investigating this the ASP project took 20+ minutes to build. I discovered that Windows Defender was the culprit there. I added some exceptions (for Nuget and project file locations)
and that lowered the time to 8+ minutes.
I am at a loss as to why there is such a difference between VS and CLI.
Machine is a MacBook Pro, I7, 16GB RAM running Windows 10 Pro via Bootcamp. It is a dev box so installed software is mostly tools (VS, Code, Sublime, Postman, Fiddler).
Taskman is not showing anything mysterious running or consuming resources.
If anyone can shed any light on this it would be appreciated.
Jul 19, 2018 02:42 AM|Edward Z|LINK
For building in VS 2017, it will process more tasks.
Do you build the project or run the project?
I suggest you follow tips below:
In addition, I suggest you follow Tools... Options... Projects and Solutions.... MSBuild project build output verbosity - set to "Normal" or "Detailed", and the build time will appear in the output window, and share us which part cause long time.
Jul 20, 2018 02:12 PM|bruce (sqlwork.com)|LINK
Jul 25, 2018 02:03 PM|rrkreitler|LINK
Yes, I assumed that more tasks are being processed by VS, that is one reason why it is a mystery that the CLI takes longer.
Also, I have been through the steps in that article without seeing much difference.
Since I posted my original question, I have made a couple changes that seem to have made some difference.
First, I turned off the option to automatically restore packages in VS.
Next, I have started doing restores, builds, and runs as separate steps from the command line. While this results in more steps, the total time for processes to complete seems to be less and everything runs faster. I wonder if I was running into too many
threads trying to compete for processor time and they were getting in each others way (one project I am working on has 158 packages installed - the auto restore feature was hammering the system).
At this point the performance is acceptable and I am moving forward.
Thanks for the suggestions Edward,
Jul 25, 2018 02:17 PM|rrkreitler|LINK
I tried cleaning and it did not really change much. Versioning and debug/release all match. I think the automated restore features for the package management were a significant part of my issues (see my above response to Edward).
As for the Mac o/s, I just haven't had time. I have been using Windows for many years so I have been working in the environment I know. Also, I find Mac systems difficult to do dev work on because so much of the system is locked down. I like the access to
resource that Windows allows. I realize that with experience I can do most of the same things on the Mac, I just have't had time to go there yet. Right now I am concentrating on learning a new tool set and code base. I am at a new job and the standard platform
is MacBooks and they allow us to choose the dev environment we are most comfortable with. For the back end devs most of us run Windows. Not an endorsement/criticism of either platform, just my current reality :-)
One last note to both Edward and Bruce, thanks for the responses and apologies for my slow reply. I (literally) had a death in the family and have been away from the forums.