VS 2022 Webforms Slow Build

Geoff Campbell 21 Reputation points
2022-03-17T19:43:48.757+00:00

Doing some work with a Webforms project Using VS 2022. The builds (even with no edit changes) are taking around 25 seconds.

When comparing this using VS 2019, a build (with no changes) is almost instantaneous. A build with slight changes takes about 3 seconds.

I've looked high and low searching for a solution - most recommendations are to update to the latest version (which I have done). I have also tried resetting "settings" to the default.

Yes, I know - a difference of 20 seconds doesn't seem that much - but mounts up for 50 or 60 builds in a day.

Any help would be appreciated.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,685 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Yijing Sun-MSFT 7,071 Reputation points
    2022-03-18T03:30:12.73+00:00

    Hi @Geoff Campbell ,
    Press Windows+R or open run from Start. Now type %temp% and delete everything from there... And then open Run again and type prefetch and delete everything from there also.
    Finally,open VS and see the performance.

    Best regards,
    Yijing Sun


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our  documentation  to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Geoff Campbell 21 Reputation points
    2022-03-18T14:04:43.18+00:00

    Thanks for the suggestion, but that made no difference whatsoever. I deleted many "temp" files - while the prefetch command didn't seemingly do anything.

    The VS 2022 build procedure still took over 20 seconds.


  3. Geoff Campbell 21 Reputation points
    2022-03-22T14:56:43.593+00:00

    Hi @Tianyu Sun-MSFT

    OK, build output below - for some reason it wouldn't let me attach a text file. Both build and rebuild are almost exactly the same and take about 20 seconds to build.

    Build started...
    ------ Build started: Project: MyProject_new, Configuration: Debug Any CPU ------
    Warning: Unable to update auto-refresh reference 'htmlagilitypack.dll'. Cannot find assembly 'D:\Users\Person\source\repos\ccme\packages\HtmlAgilityPack.1.4.9\lib\Net40\HtmlAgilityPack.dll'.
    Warning: Unable to update auto-refresh reference 'ajaxcontroltoolkit.dll'. Cannot find assembly 'D:\Users\Person\source\repos\ccme\packages\AjaxControlToolkit.18.1.1\lib\net40\AjaxControlToolkit.dll'.
    Warning: Unable to update auto-refresh reference 'ajaxcontroltoolkit.htmleditor.sanitizer.dll'. Cannot find assembly 'D:\Users\Person\source\repos\ccme\packages\AjaxControlToolkit.HtmlEditor.Sanitizer.18.1.1\lib\net40\AjaxControlToolkit.HtmlEditor.Sanitizer.dll'.
    Validating Web Site
    Building directory '/App_GlobalResources/'.
    Building directory '/App_Code/'.
    Building directory '/Account/'.
    Building directory '/App_LocalResources/'.
    Building directory '/'.
    Building directory '/Admin/'.
    Building directory '/bak/'.
    Building directory '/Management/'.
    Building directory '/Members/'.
    Building directory '/Compare/'.
    Building directory '/Forum/iphone/'.
    Building directory '/Forum/App_LocalResources/'.
    Building directory '/Forum/'.
    Building directory '/Guests/'.
    Building directory '/Palapa/'.
    Building directory '/Scripts/'.

    D:\Source\DotNet_Ver40\MyProject_new\BuilderTester.aspx(22,16): warning CS0219: The variable 'changed' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\PalapaMobile.aspx(20,16): warning CS0219: The variable 'xx' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\ActivityCheck.aspx(124,17): warning CS0162: Unreachable code detected
    D:\Source\DotNet_Ver40\MyProject_new\tester5.aspx(66,13): warning CS0219: The variable 'junk' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\Admin\RentalSpclMaint.aspx(144,45): warning CS0162: Unreachable code detected
    D:\Source\DotNet_Ver40\MyProject_new\Admin\RentalSpclMaint.aspx(229,37): warning CS0162: Unreachable code detected
    D:\Source\DotNet_Ver40\MyProject_new\Admin\RentalSpclMaint.aspx(264,16): warning CS0219: The variable 'lasttype' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\Admin\SQL_Utils.aspx(37,26): warning CS0168: The variable 'ex' is declared but never used
    D:\Source\DotNet_Ver40\MyProject_new\Admin\SQL_Utils.aspx(45,13): warning CS0219: The variable 'rslt' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\Admin\std_GridViewBAK.aspx(9,14): warning CS0169: The field 'ASP.admin_std_gridviewbak_aspx.dv' is never used
    D:\Source\DotNet_Ver40\MyProject_new\Admin\Admin0120.aspx(497,16): warning CS0219: The variable 'wk' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\Admin\ExpenseBudgetEdit.aspx(58,26): warning CS0168: The variable 'ex' is declared but never used
    D:\Source\DotNet_Ver40\MyProject_new\Members\SiteContent.aspx(61,13): warning CS0162: Unreachable code detected
    D:\Source\DotNet_Ver40\MyProject_new\Members\SiteContent.aspx(257,17): warning CS0219: The variable 'maxlen' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\Members\PhotoGallery.aspx(132,37): warning CS0219: The variable 'xx' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\Members\PhotoGallery.aspx(407,29): warning CS0162: Unreachable code detected
    D:\Source\DotNet_Ver40\MyProject_new\Management\DuesMaint.aspx(153,13): warning CS0219: The variable 'xx' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\Management\DuesMaint.aspx(158,13): warning CS0219: The variable 'xx' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\Management\Utilities.aspx(85,14): warning CS0219: The variable 'gt0' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\Management\Utilities.aspx(173,24): warning CS0219: The variable 'xx' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\Management\PalapaImport.aspx(305,17): warning CS0219: The variable 'gtVar' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\Management\PalapaImport.aspx(867,38): warning CS0168: The variable 'e1' is declared but never used
    D:\Source\DotNet_Ver40\MyProject_new\Management\PalapaMaint.aspx(158,13): warning CS0219: The variable 'xx' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\Management\PalapaMaint.aspx(163,13): warning CS0219: The variable 'xx' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\Management\Reports.aspx(545,32): warning CS0219: The variable 'xx' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\Management\LateFeesCalcTest.aspx(65,13): warning CS0219: The variable 'ctr' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\Management\UnitCommunication.aspx(237,22): warning CS0618: 'System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(string, string)' is obsolete: 'The recommended alternative is to use the Membership APIs, such as Membership.CreateUser. For more information, see http://go.microsoft.com/fwlink/?LinkId=252463.'
    D:\Source\DotNet_Ver40\MyProject_new\Management\LateFeesCalc.aspx(71,13): warning CS0219: The variable 'ctr' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\Management\RIF_Compute.aspx(44,17): warning CS0219: The variable 'xx' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\Management\ReportsPrint.aspx(546,32): warning CS0219: The variable 'xx' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\bak\UnitCommunication.aspx(213,22): warning CS0618: 'System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(string, string)' is obsolete: 'The recommended alternative is to use the Membership APIs, such as Membership.CreateUser. For more information, see http://go.microsoft.com/fwlink/?LinkId=252463.'
    D:\Source\DotNet_Ver40\MyProject_new\bak\Reports.aspx(545,32): warning CS0219: The variable 'xx' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\bak\ActivityCheckBAK.aspx(124,17): warning CS0162: Unreachable code detected
    D:\Source\DotNet_Ver40\MyProject_new\Palapa\PalapaTicketInputWebMethod.aspx(107,13): warning CS0162: Unreachable code detected
    Validation Complete

    ==========
    Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========

    Rebuild started...
    ------ Rebuild All started: Project: MyProject_new, Configuration: Debug Any CPU ------
    Warning: Unable to update auto-refresh reference 'htmlagilitypack.dll'. Cannot find assembly 'D:\Users\Person\source\repos\ccme\packages\HtmlAgilityPack.1.4.9\lib\Net40\HtmlAgilityPack.dll'.
    Warning: Unable to update auto-refresh reference 'ajaxcontroltoolkit.dll'. Cannot find assembly 'D:\Users\Person\source\repos\ccme\packages\AjaxControlToolkit.18.1.1\lib\net40\AjaxControlToolkit.dll'.
    Warning: Unable to update auto-refresh reference 'ajaxcontroltoolkit.htmleditor.sanitizer.dll'. Cannot find assembly 'D:\Users\Person\source\repos\ccme\packages\AjaxControlToolkit.HtmlEditor.Sanitizer.18.1.1\lib\net40\AjaxControlToolkit.HtmlEditor.Sanitizer.dll'.
    Validating Web Site
    Building directory '/App_GlobalResources/'.
    Building directory '/App_Code/'.
    Building directory '/Account/'.
    Building directory '/App_LocalResources/'.
    Building directory '/'.
    Building directory '/Admin/'.
    Building directory '/bak/'.
    Building directory '/Management/'.
    Building directory '/Members/'.
    Building directory '/Compare/'.
    Building directory '/Forum/iphone/'.
    Building directory '/Forum/App_LocalResources/'.
    Building directory '/Forum/'.
    Building directory '/Guests/'.
    Building directory '/Palapa/'.
    Building directory '/Scripts/'.

    D:\Source\DotNet_Ver40\MyProject_new\BuilderTester.aspx(22,16): warning CS0219: The variable 'changed' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\PalapaMobile.aspx(20,16): warning CS0219: The variable 'xx' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\ActivityCheck.aspx(124,17): warning CS0162: Unreachable code detected
    D:\Source\DotNet_Ver40\MyProject_new\tester5.aspx(66,13): warning CS0219: The variable 'junk' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\Admin\RentalSpclMaint.aspx(144,45): warning CS0162: Unreachable code detected
    D:\Source\DotNet_Ver40\MyProject_new\Admin\RentalSpclMaint.aspx(229,37): warning CS0162: Unreachable code detected
    D:\Source\DotNet_Ver40\MyProject_new\Admin\RentalSpclMaint.aspx(264,16): warning CS0219: The variable 'lasttype' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\Admin\SQL_Utils.aspx(37,26): warning CS0168: The variable 'ex' is declared but never used
    D:\Source\DotNet_Ver40\MyProject_new\Admin\SQL_Utils.aspx(45,13): warning CS0219: The variable 'rslt' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\Admin\std_GridViewBAK.aspx(9,14): warning CS0169: The field 'ASP.admin_std_gridviewbak_aspx.dv' is never used
    D:\Source\DotNet_Ver40\MyProject_new\Admin\Admin0120.aspx(497,16): warning CS0219: The variable 'wk' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\Admin\ExpenseBudgetEdit.aspx(58,26): warning CS0168: The variable 'ex' is declared but never used
    D:\Source\DotNet_Ver40\MyProject_new\Members\PhotoGallery.aspx(132,37): warning CS0219: The variable 'xx' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\Members\PhotoGallery.aspx(407,29): warning CS0162: Unreachable code detected
    D:\Source\DotNet_Ver40\MyProject_new\Members\SiteContent.aspx(61,13): warning CS0162: Unreachable code detected
    D:\Source\DotNet_Ver40\MyProject_new\Members\SiteContent.aspx(257,17): warning CS0219: The variable 'maxlen' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\Management\ReportsPrint.aspx(546,32): warning CS0219: The variable 'xx' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\Management\Utilities.aspx(85,14): warning CS0219: The variable 'gt0' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\Management\Utilities.aspx(173,24): warning CS0219: The variable 'xx' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\Management\RIF_Compute.aspx(44,17): warning CS0219: The variable 'xx' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\Management\LateFeesCalcTest.aspx(65,13): warning CS0219: The variable 'ctr' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\Management\UnitCommunication.aspx(237,22): warning CS0618: 'System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(string, string)' is obsolete: 'The recommended alternative is to use the Membership APIs, such as Membership.CreateUser. For more information, see http://go.microsoft.com/fwlink/?LinkId=252463.'
    D:\Source\DotNet_Ver40\MyProject_new\Management\DuesMaint.aspx(153,13): warning CS0219: The variable 'xx' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\Management\DuesMaint.aspx(158,13): warning CS0219: The variable 'xx' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\Management\PalapaImport.aspx(305,17): warning CS0219: The variable 'gtVar' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\Management\PalapaImport.aspx(867,38): warning CS0168: The variable 'e1' is declared but never used
    D:\Source\DotNet_Ver40\MyProject_new\Management\PalapaMaint.aspx(158,13): warning CS0219: The variable 'xx' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\Management\PalapaMaint.aspx(163,13): warning CS0219: The variable 'xx' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\Management\Reports.aspx(545,32): warning CS0219: The variable 'xx' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\Management\LateFeesCalc.aspx(71,13): warning CS0219: The variable 'ctr' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\bak\ActivityCheckBAK.aspx(124,17): warning CS0162: Unreachable code detected
    D:\Source\DotNet_Ver40\MyProject_new\bak\UnitCommunication.aspx(213,22): warning CS0618: 'System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(string, string)' is obsolete: 'The recommended alternative is to use the Membership APIs, such as Membership.CreateUser. For more information, see http://go.microsoft.com/fwlink/?LinkId=252463.'
    D:\Source\DotNet_Ver40\MyProject_new\bak\Reports.aspx(545,32): warning CS0219: The variable 'xx' is assigned but its value is never used
    D:\Source\DotNet_Ver40\MyProject_new\Palapa\PalapaTicketInputWebMethod.aspx(107,13): warning CS0162: Unreachable code detected
    Validation Complete

    ==========
    Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========