visual-studio-2013sharepoint-2013sharepoint-workflow

Why Visual studio 2013 takes long time(45 mins) to build for SP 2013 workflow project?


I am developing SharePoint 2013 workflow (SP 2013 on premise) using Visual studio 2013. everything works fine like workflow designer, opening files etc. works just fine, no delays at all but when starts build it takes around 45 mins., why?

In the solution, just 3 workflow projects and one cs project (dll). if I build cs project (dll) it builds in few seconds, even any other project from other solutions, build takes normal time but workflow projects takes long time and i don't get it why it takes so much time?

I used "Process Monitor" application against devenv.exe when build started and found where the lags are occurring, its on a NotifyChangeDirectory. There are more than 15000 entries against "NotifyChangeDirectory". When I put a filter to just show the ones w/a duration .5 seconds or more... 5000+ of them.

Can anyone help me here?


Solution

  • I found the solution. Now build completes within a min.

    As I mentioned earlier, build takes time when it calls "ExpressionTranslationBuildTask". I researched on it and found that "during build, Any expressions in the workflows are translated into expression activities before the workflow is uploaded to Workflow Manager ". So I worked on reducing expressions translation jobs & able to solved it.

    Earlier in workflow email body OR in task email body was I used string concatenation which causes the build problem.

    For example,

    "...."+

    "..."+

    ""

    I simply removed all the concatenations from the email body string and problem solved.