Starts in:
0 DAY
14 HRS
40 MIN
29 SEC
Starts in:
0 D
14 H
40 M
29 S
Open Closed

Unable to add Account module as Source Code to ABP.Commercial Application #2690


User avatar
0
alin.andersen created

Hey,

we are trying to add the Account module as source code to our project, but we get this error:

System.Exception: Build failed!
   at Volo.Abp.Cli.Build.DefaultDotNetProjectBuilder.BuildInternal(DotNetProjectInfo project, String arguments, ConcurrentBag`1 builtProjects) in D:\ci\Jenkins\workspace\abp-commercial-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\Build\DefaultDotNetProjectBuilder.cs:line 92
   at Volo.Abp.Cli.Build.DefaultDotNetProjectBuilder.BuildProjects(List`1 projects, String arguments) in D:\ci\Jenkins\workspace\abp-commercial-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\Build\DefaultDotNetProjectBuilder.cs:line 41
[14:01:31 ERR] Error occured while adding the module Volo.Account.Prowith source-code to the solution "0e3bb534-5f90-44ca-9b73-24b9c976a316".. System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.
Could not load file or assembly 'Volo.Abp.Core, Version=5.1.4.0, Culture=neutral, PublicKeyToken=null'. Could not find or load a specific file. (0x80131621)
Could not load file or assembly 'Volo.Abp.UI, Version=5.1.4.0, Culture=neutral, PublicKeyToken=null'. Could not find or load a specific file. (0x80131621)
Could not load file or assembly 'Volo.Abp.Core, Version=5.1.4.0, Culture=neutral, PublicKeyToken=null'. Could not find or load a specific file. (0x80131621)
Could not load file or assembly 'Volo.Abp.UI.Navigation, Version=5.1.4.0, Culture=neutral, PublicKeyToken=null'. Could not find or load a specific file. (0x80131621)
Could not load file or assembly 'Volo.Abp.Core, Version=5.1.4.0, Culture=neutral, PublicKeyToken=null'. Could not find or load a specific file. (0x80131621)
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.Assembly.GetTypes()
   at Volo.Abp.Cli.Bundling.BundlingService.GetStartupModule(String assemblyPath) in D:\ci\Jenkins\workspace\abp-commercial-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\Bundling\BundlingService.cs:line 277
   at Volo.Abp.Cli.Bundling.BundlingService.BundleAsync(String directory, Boolean forceBuild) in D:\ci\Jenkins\workspace\abp-commercial-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\Bundling\BundlingService.cs:line 61
   at Volo.Abp.Cli.Commands.BundleCommand.ExecuteAsync(CommandLineArgs commandLineArgs) in D:\ci\Jenkins\workspace\abp-commercial-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\Commands\BundleCommand.cs:line 45
   at Volo.Abp.Cli.ProjectModification.SolutionModuleAdder.RunBundleForBlazorAsync(String[] projectFiles, ModuleWithMastersInfo module) in D:\ci\Jenkins\workspace\abp-commercial-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\SolutionModuleAdder.cs:line 203
   at Volo.Abp.Cli.ProjectModification.SolutionModuleAdder.AddAsync(String solutionFile, String moduleName, String version, Boolean skipDbMigrations, Boolean withSourceCode, Boolean addSourceCodeToSolutionFile, Boolean newTemplate, Boolean newProTemplate) in D:\ci\Jenkins\workspace\abp-commercial-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\SolutionModuleAdder.cs:line 134
   at Volo.Abp.Cli.Commands.AddModuleCommand.ExecuteAsync(CommandLineArgs commandLineArgs) in D:\ci\Jenkins\workspace\abp-commercial-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\Commands\AddModuleCommand.cs:line 68
   at Volo.Abp.Suite.Controllers.AbpSuiteController.AddModuleAsync(AddModuleInput input)
System.IO.FileLoadException: Could not load file or assembly 'Volo.Abp.Core, Version=5.1.4.0, Culture=neutral, PublicKeyToken=null'. Could not find or load a specific file. (0x80131621)
File name: 'Volo.Abp.Core, Version=5.1.4.0, Culture=neutral, PublicKeyToken=null'
 ---> System.IO.FileLoadException: Could not load file or assembly 'Volo.Abp.Core, Version=5.1.4.0, Culture=neutral, PublicKeyToken=null'.
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromPath(IntPtr ptrNativeAssemblyLoadContext, String ilPath, String niPath, ObjectHandleOnStack retAssembly)
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at System.Reflection.Assembly.LoadFromResolveHandler(Object sender, ResolveEventArgs args)
   at System.Runtime.Loader.AssemblyLoadContext.InvokeResolveEvent(ResolveEventHandler eventHandler, RuntimeAssembly assembly, String name)
   at System.Runtime.Loader.AssemblyLoadContext.OnAssemblyResolve(RuntimeAssembly assembly, String assemblyFullName)
System.IO.FileLoadException: Could not load file or assembly 'Volo.Abp.UI, Version=5.1.4.0, Culture=neutral, PublicKeyToken=null'. Could not find or load a specific file. (0x80131621)
File name: 'Volo.Abp.UI, Version=5.1.4.0, Culture=neutral, PublicKeyToken=null'
 ---> System.IO.FileLoadException: Could not load file or assembly 'Volo.Abp.UI, Version=5.1.4.0, Culture=neutral, PublicKeyToken=null'.
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromPath(IntPtr ptrNativeAssemblyLoadContext, String ilPath, String niPath, ObjectHandleOnStack retAssembly)
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at System.Reflection.Assembly.LoadFromResolveHandler(Object sender, ResolveEventArgs args)
   at System.Runtime.Loader.AssemblyLoadContext.InvokeResolveEvent(ResolveEventHandler eventHandler, RuntimeAssembly assembly, String name)
   at System.Runtime.Loader.AssemblyLoadContext.OnAssemblyResolve(RuntimeAssembly assembly, String assemblyFullName)
System.IO.FileLoadException: Could not load file or assembly 'Volo.Abp.Core, Version=5.1.4.0, Culture=neutral, PublicKeyToken=null'. Could not find or load a specific file. (0x80131621)
File name: 'Volo.Abp.Core, Version=5.1.4.0, Culture=neutral, PublicKeyToken=null'
 ---> System.IO.FileLoadException: Could not load file or assembly 'Volo.Abp.Core, Version=5.1.4.0, Culture=neutral, PublicKeyToken=null'.
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromPath(IntPtr ptrNativeAssemblyLoadContext, String ilPath, String niPath, ObjectHandleOnStack retAssembly)
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at System.Reflection.Assembly.LoadFromResolveHandler(Object sender, ResolveEventArgs args)
   at System.Runtime.Loader.AssemblyLoadContext.InvokeResolveEvent(ResolveEventHandler eventHandler, RuntimeAssembly assembly, String name)
   at System.Runtime.Loader.AssemblyLoadContext.OnAssemblyResolve(RuntimeAssembly assembly, String assemblyFullName)
System.IO.FileLoadException: Could not load file or assembly 'Volo.Abp.UI.Navigation, Version=5.1.4.0, Culture=neutral, PublicKeyToken=null'. Could not find or load a specific file. (0x80131621)
File name: 'Volo.Abp.UI.Navigation, Version=5.1.4.0, Culture=neutral, PublicKeyToken=null'
 ---> System.IO.FileLoadException: Could not load file or assembly 'Volo.Abp.UI.Navigation, Version=5.1.4.0, Culture=neutral, PublicKeyToken=null'.
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromPath(IntPtr ptrNativeAssemblyLoadContext, String ilPath, String niPath, ObjectHandleOnStack retAssembly)
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at System.Reflection.Assembly.LoadFromResolveHandler(Object sender, ResolveEventArgs args)
   at System.Runtime.Loader.AssemblyLoadContext.InvokeResolveEvent(ResolveEventHandler eventHandler, RuntimeAssembly assembly, String name)
   at System.Runtime.Loader.AssemblyLoadContext.OnAssemblyResolve(RuntimeAssembly assembly, String assemblyFullName)
System.IO.FileLoadException: Could not load file or assembly 'Volo.Abp.Core, Version=5.1.4.0, Culture=neutral, PublicKeyToken=null'. Could not find or load a specific file. (0x80131621)
File name: 'Volo.Abp.Core, Version=5.1.4.0, Culture=neutral, PublicKeyToken=null'
 ---> System.IO.FileLoadException: Could not load file or assembly 'Volo.Abp.Core, Version=5.1.4.0, Culture=neutral, PublicKeyToken=null'.
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromPath(IntPtr ptrNativeAssemblyLoadContext, String ilPath, String niPath, ObjectHandleOnStack retAssembly)
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at System.Reflection.Assembly.LoadFromResolveHandler(Object sender, ResolveEventArgs args)
   at System.Runtime.Loader.AssemblyLoadContext.InvokeResolveEvent(ResolveEventHandler eventHandler, RuntimeAssembly assembly, String name)
   at System.Runtime.Loader.AssemblyLoadContext.OnAssemblyResolve(RuntimeAssembly assembly, String assemblyFullName)

The reason is this:

C:\Program Files\dotnet\sdk\6.0.200\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.targets(363,5): warning MSB3026: Could not copy "obj\Debug\net6.0\Acme.Blazor.dll" to "D:\NET\Acme\src\Acme.Blazor\bin\Debug\net6.0\wwwroot\_framework/Acme.Blazor.dll". Beginning retry 1 in 1000ms. The process cannot access the file 'D:\NET\Acme\src\Acme.Blazor\bin\Debug\net6.0\wwwroot\_framework\Acme.Blazor.dll' because it is being used by another process.  [D:\NET\Acme\src\Acme.Blazor\Acme.Blazor.csproj]
C:\Program Files\dotnet\sdk\6.0.200\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.targets(363,5): warning MSB3026: Could not copy "obj\Debug\net6.0\Acme.Blazor.dll" to "D:\NET\Acme\src\Acme.Blazor\bin\Debug\net6.0\wwwroot\_framework/Acme.Blazor.dll". Beginning retry 2 in 1000ms. The process cannot access the file 'D:\NET\Acme\src\Acme.Blazor\bin\Debug\net6.0\wwwroot\_framework\Acme.Blazor.dll' because it is being used by another process.  [D:\NET\Acme\src\Acme.Blazor\Acme.Blazor.csproj]
C:\Program Files\dotnet\sdk\6.0.200\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.targets(363,5): warning MSB3026: Could not copy "obj\Debug\net6.0\Acme.Blazor.dll" to "D:\NET\Acme\src\Acme.Blazor\bin\Debug\net6.0\wwwroot\_framework/Acme.Blazor.dll". Beginning retry 3 in 1000ms. The process cannot access the file 'D:\NET\Acme\src\Acme.Blazor\bin\Debug\net6.0\wwwroot\_framework\Acme.Blazor.dll' because it is being used by another process.  [D:\NET\Acme\src\Acme.Blazor\Acme.Blazor.csproj]
C:\Program Files\dotnet\sdk\6.0.200\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.targets(363,5): warning MSB3026: Could not copy "obj\Debug\net6.0\Acme.Blazor.dll" to "D:\NET\Acme\src\Acme.Blazor\bin\Debug\net6.0\wwwroot\_framework/Acme.Blazor.dll". Beginning retry 4 in 1000ms. The process cannot access the file 'D:\NET\Acme\src\Acme.Blazor\bin\Debug\net6.0\wwwroot\_framework\Acme.Blazor.dll' because it is being used by another process.  [D:\NET\Acme\src\Acme.Blazor\Acme.Blazor.csproj]
C:\Program Files\dotnet\sdk\6.0.200\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.targets(363,5): warning MSB3026: Could not copy "obj\Debug\net6.0\Acme.Blazor.dll" to "D:\NET\Acme\src\Acme.Blazor\bin\Debug\net6.0\wwwroot\_framework/Acme.Blazor.dll". Beginning retry 5 in 1000ms. The process cannot access the file 'D:\NET\Acme\src\Acme.Blazor\bin\Debug\net6.0\wwwroot\_framework\Acme.Blazor.dll' because it is being used by another process.  [D:\NET\Acme\src\Acme.Blazor\Acme.Blazor.csproj]
C:\Program Files\dotnet\sdk\6.0.200\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.targets(363,5): warning MSB3026: Could not copy "obj\Debug\net6.0\Acme.Blazor.dll" to "D:\NET\Acme\src\Acme.Blazor\bin\Debug\net6.0\wwwroot\_framework/Acme.Blazor.dll". Beginning retry 6 in 1000ms. The process cannot access the file 'D:\NET\Acme\src\Acme.Blazor\bin\Debug\net6.0\wwwroot\_framework\Acme.Blazor.dll' because it is being used by another process.  [D:\NET\Acme\src\Acme.Blazor\Acme.Blazor.csproj]
C:\Program Files\dotnet\sdk\6.0.200\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.targets(363,5): warning MSB3026: Could not copy "obj\Debug\net6.0\Acme.Blazor.dll" to "D:\NET\Acme\src\Acme.Blazor\bin\Debug\net6.0\wwwroot\_framework/Acme.Blazor.dll". Beginning retry 7 in 1000ms. The process cannot access the file 'D:\NET\Acme\src\Acme.Blazor\bin\Debug\net6.0\wwwroot\_framework\Acme.Blazor.dll' because it is being used by another process.  [D:\NET\Acme\src\Acme.Blazor\Acme.Blazor.csproj]
C:\Program Files\dotnet\sdk\6.0.200\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.targets(363,5): warning MSB3026: Could not copy "obj\Debug\net6.0\Acme.Blazor.dll" to "D:\NET\Acme\src\Acme.Blazor\bin\Debug\net6.0\wwwroot\_framework/Acme.Blazor.dll". Beginning retry 8 in 1000ms. The process cannot access the file 'D:\NET\Acme\src\Acme.Blazor\bin\Debug\net6.0\wwwroot\_framework\Acme.Blazor.dll' because it is being used by another process.  [D:\NET\Acme\src\Acme.Blazor\Acme.Blazor.csproj]
C:\Program Files\dotnet\sdk\6.0.200\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.targets(363,5): warning MSB3026: Could not copy "obj\Debug\net6.0\Acme.Blazor.dll" to "D:\NET\Acme\src\Acme.Blazor\bin\Debug\net6.0\wwwroot\_framework/Acme.Blazor.dll". Beginning retry 9 in 1000ms. The process cannot access the file 'D:\NET\Acme\src\Acme.Blazor\bin\Debug\net6.0\wwwroot\_framework\Acme.Blazor.dll' because it is being used by another process.  [D:\NET\Acme\src\Acme.Blazor\Acme.Blazor.csproj]
C:\Program Files\dotnet\sdk\6.0.200\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.targets(363,5): warning MSB3026: Could not copy "obj\Debug\net6.0\Acme.Blazor.dll" to "D:\NET\Acme\src\Acme.Blazor\bin\Debug\net6.0\wwwroot\_framework/Acme.Blazor.dll". Beginning retry 10 in 1000ms. The process cannot access the file 'D:\NET\Acme\src\Acme.Blazor\bin\Debug\net6.0\wwwroot\_framework\Acme.Blazor.dll' because it is being used by another process.  [D:\NET\Acme\src\Acme.Blazor\Acme.Blazor.csproj]
C:\Program Files\dotnet\sdk\6.0.200\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.targets(363,5): error MSB3027: Could not copy "obj\Debug\net6.0\Acme.Blazor.dll" to "D:\NET\Acme\src\Acme.Blazor\bin\Debug\net6.0\wwwroot\_framework/Acme.Blazor.dll". Exceeded retry count of 10. Failed.  [D:\NET\Acme\src\Acme.Blazor\Acme.Blazor.csproj]
C:\Program Files\dotnet\sdk\6.0.200\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.targets(363,5): error MSB3021: Unable to copy file "obj\Debug\net6.0\Acme.Blazor.dll" to "D:\NET\Acme\src\Acme.Blazor\bin\Debug\net6.0\wwwroot\_framework/Acme.Blazor.dll". The process cannot access the file 'D:\NET\Acme\src\Acme.Blazor\bin\Debug\net6.0\wwwroot\_framework\Acme.Blazor.dll' because it is being used by another process. [D:\NET\Acme\src\Acme.Blazor\Acme.Blazor.csproj]

It seems some files can not be copied.We made sure VisualStudio is not running. We even tried restarting the PC and creating a fresh new ABP Commercial Application. But we get the same issue.

Do you have any suggestions to solve this problem?


4 Answer(s)
  • User Avatar
    0
    alper created
    Support Team Director

    we're checking the issue.

  • User Avatar
    0
    yekalkan created
    Support Team Fullstack Developer

    Hi @alin.andersen,

    The exception is thrown by the bundling step. Luckly this doesn't seem to be a fatal error. The error message is displayed but the process continues in the background.

    So you can run abp bundle command in the Blazor project of your solution and then it will be ok.

    I'll create an internal issue for this problem and will solve it soon.

    note: I also faced a problem with automapper after intstalling Accoun.Pro module. You may need to add the 15th line in the SS below.

  • User Avatar
    0
    alin.andersen created

    Ok I found out that I had different versions for ABP Libraries and ABP Suite.

    ABP Libraries were on 5.1.4 and ABP Suite was on version 5.1.3. Updating ABP Suite to 5.1.4 fixed the problem.

    Thanks for the AutoMapper code, yes this change was necessary for the Blazor app to work properly.

  • User Avatar
    0
    yekalkan created
    Support Team Fullstack Developer

    Actually, adding ConcurrencyStamp property to PersonalInfoModel class in Volo.Abp.Account.Pro.Public.Blazor/Pages/Account/Manage.razor file would be a better solution.

    public class PersonalInfoModel
    {
        ...
    
        public string ConcurrencyStamp { get; set; }
    }
    
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06