Open Closed

VS Build Agent errors (LeptonX) after upgrade 5.X to 7.X #4805


User avatar
0
TonyH created

Hi Team,

I've recently upgraded my solution from 5.2 to 7.0.3.

I've checked the code into source control, and my remote VS Build Agent is attempting to build.

It keeps crashing out, with a couple of hundred errors. It appears to be failing on file copies ... the sample below shows a failure, then 3 successes, then another failure:

C:\agent\TestVx\_work\_tool\dotnet\sdk\7.0.202\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.targets(593,5): warning MSB3026: Could not copy "C:\Windows\ServiceProfiles\NetworkService\.nuget\packages\volo.abp.aspnetcore.components.web.leptonxtheme\2.0.5\staticwebassets\side-menu\libs\bootstrap-datepicker\css\bootstrap-datepicker.standalone.css" to "C:\agent\TestVx\_work\2\s\GUI\BlazorServer\src\TestCompany.TestApplication.BlazorServer.Blazor\obj\Debug\net7.0\PubTmp\Out\wwwroot\_content\Volo.Abp.AspNetCore.Components.Web.LeptonXTheme\side-menu\libs\bootstrap-datepicker\css\bootstrap-datepicker.standalone.css". Beginning retry 2 in 1000ms. Could not find a part of the path 'C:\agent\TestVx\_work\2\s\GUI\BlazorServer\src\TestCompany.TestApplication.BlazorServer.Blazor\obj\Debug\net7.0\PubTmp\Out\wwwroot\_content\Volo.Abp.AspNetCore.Components.Web.LeptonXTheme\side-menu\libs\bootstrap-datepicker\css\bootstrap-datepicker.standalone.css'.  [C:\agent\TestVx\_work\2\s\GUI\BlazorServer\src\TestCompany.TestApplication.BlazorServer.Blazor\TestCompany.TestApplication.BlazorServer.Blazor.csproj]

  Copying file from "C:\Windows\ServiceProfiles\NetworkService\.nuget\packages\volo.abp.aspnetcore.components.web.leptonxtheme\2.0.5\staticwebassets\side-menu\libs\bootstrap-datepicker\css\bootstrap-datepicker3.standalone.css" to "C:\agent\TestVx\_work\2\s\GUI\BlazorServer\src\TestCompany.TestApplication.BlazorServer.Blazor\obj\Debug\net7.0\PubTmp\Out\wwwroot\_content\Volo.Abp.AspNetCore.Components.Web.LeptonXTheme\side-menu\libs\bootstrap-datepicker\css\bootstrap-datepicker3.standalone.css".

  Copying file from "C:\Windows\ServiceProfiles\NetworkService\.nuget\packages\volo.abp.aspnetcore.components.web.leptonxtheme\2.0.5\staticwebassets\side-menu\libs\bootstrap-datepicker\css\bootstrap-datepicker.standalone.min.css" to "C:\agent\TestVx\_work\2\s\GUI\BlazorServer\src\TestCompany.TestApplication.BlazorServer.Blazor\obj\Debug\net7.0\PubTmp\Out\wwwroot\_content\Volo.Abp.AspNetCore.Components.Web.LeptonXTheme\side-menu\libs\bootstrap-datepicker\css\bootstrap-datepicker.standalone.min.css".

  Copying file from "C:\Windows\ServiceProfiles\NetworkService\.nuget\packages\volo.abp.aspnetcore.components.web.leptonxtheme\2.0.5\staticwebassets\side-menu\libs\bootstrap-datepicker\css\bootstrap-datepicker.standalone.css.map" to "C:\agent\TestVx\_work\2\s\GUI\BlazorServer\src\TestCompany.TestApplication.BlazorServer.Blazor\obj\Debug\net7.0\PubTmp\Out\wwwroot\_content\Volo.Abp.AspNetCore.Components.Web.LeptonXTheme\side-menu\libs\bootstrap-datepicker\css\bootstrap-datepicker.standalone.css.map".

##[warning]C:\agent\TestVx\_work\_tool\dotnet\sdk\7.0.202\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.targets(593,5): Warning MSB3026: Could not copy "C:\Windows\ServiceProfiles\NetworkService\.nuget\packages\volo.abp.aspnetcore.components.web.leptonxtheme\2.0.5\staticwebassets\side-menu\libs\bootstrap-datepicker\css\bootstrap-datepicker.standalone.min.css" to "C:\agent\TestVx\_work\2\s\GUI\BlazorServer\src\TestCompany.TestApplication.BlazorServer.Blazor\obj\Debug\net7.0\PubTmp\Out\wwwroot\_content\Volo.Abp.AspNetCore.Components.Web.LeptonXTheme\side-menu\libs\bootstrap-datepicker\css\bootstrap-datepicker.standalone.min.css". Beginning retry 2 in 1000ms. Could not find a part of the path 'C:\agent\TestVx\_work\2\s\GUI\BlazorServer\src\TestCompany.TestApplication.BlazorServer.Blazor\obj\Debug\net7.0\PubTmp\Out\wwwroot\_content\Volo.Abp.AspNetCore.Components.Web.LeptonXTheme\side-menu\libs\bootstrap-datepicker\css\bootstrap-datepicker.standalone.min.css'. 

The filename changes each time, but the error is the same: can't copy it, can't find part of a path, and with eventual "exceeded retry count". A quick scan seems to indicate that they're all related to leptonxtheme.

I've tried rebooting the build server, in case there are file locks etc ... but that hasn't helped.

Any idea what might be causing this, and how I might fix it?

Thanks!

T


9 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you try run abp clean command on your solution folder? and then run dotnet build command.

  • User Avatar
    0
    TonyH created

    I can, and have, done that.

    However, that just cleans my local folders. There is no problem with my local build. That's building correctly.

    It's only when I check the code in to source control, and then the remote VS Build Agent on the build server attempts to build it, that the problem arises. And only since I've upgraded.

    Each time the build server kicks off a build, the first thing it does is completely scrub the build target folders, so that it's starting afresh. So there's no bin/obj folders, or anything else for that matter ... it starts with an empty folder, pulls down all the source code, then performs a build. So it's "fresh" each time.

    Could this maybe have something to do with the fact I downloaded the LeptonX source code at one point? I was going to try to customise something, but then abandoned the idea. I deleted the downloaded folder ... but is it possible it may have corrupted something else?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can check the csporj files of your all projects. It may contain the wrong configuration.

  • User Avatar
    0
    TonyH created

    I've compared the Blazor project file against a clean project I generated for 7.0.3, and there are these additional lines in my current code:

    <Content Remove="C:\Users\TonyHansen\.nuget\packages\volo.abp.account.pro.admin.blazor.server\7.0.3\contentFiles\any\net7.0\Volo.Abp.Account.Pro.Admin.Blazor.Server.abppkg.json" />
        <Content Remove="C:\Users\TonyHansen\.nuget\packages\volo.abp.account.pro.public.blazor.server\7.0.3\contentFiles\any\net7.0\Volo.Abp.Account.Pro.Public.Blazor.Server.abppkg.json" />
        <Content Remove="C:\Users\TonyHansen\.nuget\packages\volo.abp.account.pro.public.web.impersonation\7.0.3\contentFiles\any\net7.0\Volo.Abp.Account.Pro.Public.Web.Impersonation.abppkg.analyze.json" />
        <Content Remove="C:\Users\TonyHansen\.nuget\packages\volo.abp.account.pro.public.web.impersonation\7.0.3\contentFiles\any\net7.0\Volo.Abp.Account.Pro.Public.Web.Impersonation.abppkg.json" />
        <Content Remove="C:\Users\TonyHansen\.nuget\packages\volo.abp.account.pro.public.web.openiddict\7.0.3\contentFiles\any\net7.0\Volo.Abp.Account.Pro.Public.Web.OpenIddict.abppkg.analyze.json" />
        <Content Remove="C:\Users\TonyHansen\.nuget\packages\volo.abp.account.pro.public.web.openiddict\7.0.3\contentFiles\any\net7.0\Volo.Abp.Account.Pro.Public.Web.OpenIddict.abppkg.json" />
        <Content Remove="C:\Users\TonyHansen\.nuget\packages\volo.abp.auditlogging.blazor.server\7.0.3\contentFiles\any\net7.0\Volo.Abp.AuditLogging.Blazor.Server.abppkg.json" />
        <Content Remove="C:\Users\TonyHansen\.nuget\packages\volo.abp.gdpr.blazor.server\7.0.3\contentFiles\any\net7.0\Volo.Abp.Gdpr.Blazor.Server.abppkg.json" />
        <Content Remove="C:\Users\TonyHansen\.nuget\packages\volo.abp.identity.pro.blazor.server\7.0.3\contentFiles\any\net7.0\Volo.Abp.Identity.Pro.Blazor.Server.abppkg.json" />
        <Content Remove="C:\Users\TonyHansen\.nuget\packages\volo.abp.languagemanagement.blazor.server\7.0.3\contentFiles\any\net7.0\Volo.Abp.LanguageManagement.Blazor.Server.abppkg.json" />
        <Content Remove="C:\Users\TonyHansen\.nuget\packages\volo.abp.openiddict.pro.blazor.server\7.0.3\contentFiles\any\net7.0\Volo.Abp.OpenIddict.Pro.Blazor.Server.abppkg.json" />
        <Content Remove="C:\Users\TonyHansen\.nuget\packages\volo.abp.texttemplatemanagement.blazor.server\7.0.3\contentFiles\any\net7.0\Volo.Abp.TextTemplateManagement.Blazor.Server.abppkg.json" />
        <Content Remove="C:\Users\TonyHansen\.nuget\packages\volo.saas.host.blazor.server\7.0.3\contentFiles\any\net7.0\Volo.Saas.Host.Blazor.Server.abppkg.json" />
    

    Worth noting that I've updated the ABP CLI, and then run a general ABP update on the solution. It has updated my package.json file to this:

    {
      "version": "1.0.0",
      "name": "my-app",
      "private": true,
      "dependencies": {
        "@volo/abp.aspnetcore.mvc.ui.theme.leptonx": "~2.1.0",
        "@volo/aspnetcore.components.server.leptonxtheme": "~2.1.0",
        "@volo/cms-kit-pro.admin": "~7.1.0",
        "@volo/account": "~7.1.0",
        "@volo/language-management": "~7.1.0"
      }
    }
    

    However, when I look at the package dependencies on the Blazor project, they're still 7.0.3 for the main Volosoft assemblies, and 2.0.5 for the LeptonX asemblies. That doesn't change, even after a clean/rebuild and refresh of NuGet packages.

    Lastly, I've just double-checked the files and paths in the error message below:

    ##[warning]C:\agent\TestVx\_work\_tool\dotnet\sdk\7.0.202\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.targets(593,5): Warning MSB3026: Could not copy "C:\Windows\ServiceProfiles\NetworkService\.nuget\packages\volo.abp.aspnetcore.components.web.leptonxtheme\2.0.5\staticwebassets\side-menu\libs\bootstrap-datepicker\css\bootstrap-datepicker.standalone.min.css" to "C:\agent\TestVx\_work\2\s\GUI\BlazorServer\src\TestCompany.TestApplication.BlazorServer.Blazor\obj\Debug\net7.0\PubTmp\Out\wwwroot\_content\Volo.Abp.AspNetCore.Components.Web.LeptonXTheme\side-menu\libs\bootstrap-datepicker\css\bootstrap-datepicker.standalone.min.css". Beginning retry 2 in 1000ms. Could not find a part of the path 'C:\agent\TestVx\_work\2\s\GUI\BlazorServer\src\TestCompany.TestApplication.BlazorServer.Blazor\obj\Debug\net7.0\PubTmp\Out\wwwroot\_content\Volo.Abp.AspNetCore.Components.Web.LeptonXTheme\side-menu\libs\bootstrap-datepicker\css\bootstrap-datepicker.standalone.min.css'. 
    

    The source file definitely existing, and the target folder definitely exists. I thought maybe it was something to do with the path length ... but I've just manually copied the contents of the bootstrap-datepicker folder from the source location to the target location without issue, so that's not the problem.

    What to try next?

  • User Avatar
    0
    TonyH created

    Sorry! Accidentally closed the issue. See above for where I'm at.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Can you share a project for me to reproduce the problem locally?

  • User Avatar
    0
    TonyH created

    Unfortunately, no:

    1. The Blazor project is one project in a solution with dozens of projects, and has many dependencies on those other projects
    2. I don't think you'd be able to reproduce it locally. I certainly can't. It only seems to happen on the build server

    Some more information...

    I've just worked my way through the ~20K+ lines of the build log, and it appears as though every error relates to attempts to copy the "Volo.Abp.AspNetCore.Components.Web.LeptonXTheme\side-menu\libs\bootstrap-datepicker" files. It appears to copy some, but not all. For example, these files in the CSS folder:

    ... but none of the files with ".standalone." in the name. Only these two files in the JS folder:

    And nothing comes across for the locales folder.

    Does that provide any clues?

    Is it possible to point the project to a different version of LeptonX, something other than 2.0.5, so I can see if that fixes the problem?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    If the local can't be reproduced, there is a problem with the build server.

    Does it use the correct net sdk?

    Based on these error messages, I can't troubleshoot the problem.

  • User Avatar
    1
    TonyH created

    I know there is a problem with the build server ... that's what I said in the initial problem description.

    The only change between the solution building, then the solution NOT building, was running through the process on your website was upgrading the application to use LeptonX.

    SOLVED First, note the log entry:

    Copying file from "C:\Windows\ServiceProfiles\NetworkService\.nuget\packages\volo.abp.aspnetcore.components.web.leptonxtheme\2.0.5\staticwebassets\side-menu\libs\bootstrap-datepicker\css\bootstrap-datepicker3.standalone.css" to "C:\agent\TestVx\_work\2\s\GUI\BlazorServer\src\TestCompany.TestApplication.BlazorServer.Blazor\obj\Debug\net7.0\PubTmp\Out\wwwroot\_content\Volo.Abp.AspNetCore.Components.Web.LeptonXTheme\side-menu\libs\bootstrap-datepicker\css\bootstrap-datepicker3.standalone.css".
    

    Note the target location. The overall length of the path exceeds the Windows limit of 260 characters. This means the file is never copied across to the build agent's work folder. It fails silently.

    Later in the build process, it is trying to integrate those files ... it can't find them, so a build error occurs.

    Upgrading to the LeptonX theme was enough to push the path over the 260-character limit, most likely due to the verbose naming of "Volo.Abp.AspNetCore.Components.Web.LeptonXTheme", combined with the long names attributed to the datepicker component files.

    I had to reduce my own project naming from "TestCompany.TestApplication.BlazorServer.Blazor" to "TestCompany.BlazorServer.Blazor" in order to sneak back under the 260-character limit (note: "TestCompany" and "TestApplication" are anonymized values ... but the actual values I was using are about the same length).

    After I got back under the 260-character limit, builds were once again successful.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 12, 2024, 07:15