Activities of "sid@extranerds.com"

That seems to have fixed the issue. Thank you!

I actually don't know which file it should be looking for. If it's instead trying to locate the ClientAddressesDataSeedContributor.cs file then it's looking for the incorrect file in the correct folder of the correct project.

So either the folder name or the file name is incorrect, though I can confirm the project name was fixed.

I have installed CLI and ABP Suite to 8.0.2, and I updated my project's NPM and NuGet packages. After performing this update I compiled the application and tested it. No problems.

Next I tried to perform the actions that resulted in this ticket being created. I'm sorry to say that the fix mentioned did not solve the problem. Look at the screen shot below. It's slightly different than the one I provided previously (see the areas highlighted with red boxes). In this example, I have an entity called "AddressType" and another entity called "ClientAddress". I am attempting to edit the ClientAddress entity by adding a 1-n navigation property to AddressType.

Notice that previously (before I upgraded to 8.0.2) this incorrect path was being used, which resulted in the error I initially reported: \test\AProInspector.TestBase\AddressType\AddressTypesDataSeedContributor.cs In other words, it was searching for the correct file in the correct folder of the incorrect project.

Now, after the 8.0.2 update, the same error occurs but for a different reason. Now, this incorrect path is being used: \test\AProInspector.Domain.Tests\ClientAddresses\AddressTypesDataSeedContributor.cs In other words, it's searching for the correct file in the incorrect folder of the correct project. The folder it's looking is in "ClientAddress", but it should be looking in "AddressTypes". The confusion is probably because "ClientAddress" is the entity I'm currently editing instead of the entity I am trying to create a navigation property link to.

The correct path should be this. \test\AProInspector.Domain.Tests\AddressType\AddressTypesDataSeedContributor.cs In other words, I think that it should look into the "{ProjectName}.Domain.Tests" project, in the "{ReferencedEntity}" folder for the "{ReferencedEntity}DataSeedContributor.cs" file.

So it's now looking in the correct project (that was fixed), but now it's look in the incorrect folder (that was broken in the process).

Please advise.

Thank you for the response, the info about 8.0.2, and the temporary workaround. Can you tell me which Github issue or pull request the fix relates too?

Here's a screenshot of Visual Studio after ABP Suite generates the error. Note the two areas in the red squares. The file paths don't match.

  • ABP Framework version: v8.0.0

  • UI Type: Blazor WASM

  • Database System: EF Core (SQL Server)

  • Tiered (for MVC) or Auth Server Separated (for Angular): no

  • Exception message and full stack trace:

  • System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Code\extranerds\AProInspector\test\AProInspector.TestBase\AddressTypes\AddressTypesDataSeedContributor.cs'. at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options) at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable1 unixCreateMode) at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable1 unixCreateMode) at System.IO.File.OpenText(String path) at Volo.Abp.IO.FileHelper.ReadAllTextAsync(String path) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Core\Volo\Abp\IO\FileHelper.cs:line 59 at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Commands.UnitTestCommandCommand.mgaozo0CnE(String ) at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Commands.UnitTestCommandCommand.LshoDsMRxy(TestDataObject , Int32 ) at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Commands.UnitTestCommandCommand.ipuoypI5wn() at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Commands.UnitTestCommandCommand.ExecuteAsync(CrudPageCommandOptions options) at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.CommandManager.ExecuteAllAsync(CrudPageCommandOptions options) at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Commands.CrudPageGenerator.GenerateAsync(EntityModel entity, Solution solution, EntityModel masterEntity) at Volo.Abp.Suite.Controllers.CrudPageGeneratorController.SaveAndGenerateEntityAsync(Guid solutionId, EntityModel entity) at lambda_method2022(Closure, Object) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)PS C:\Code\extranerds\AProInspector> Shutting down...

  • Steps to reproduce the issue:

  1. Create a new project
  2. Add a new entity using ABP Suite named "AddressType" (AddressTypes plural)
  3. Add another new entity using ABP Suite named "ClientAddress" (ClientAddresses plural) with a 1-n navigation property referencing AddressTypes
  4. Save and Generate

Notice that the exception is the result of the process trying to locate "AProInspector.TestBase\AddressTypes\AddressTypesDataSeedContributor.cs". However, that file exists elsewhere at "AProInspector.Domain.Tests\AddressTypes\AddressTypesDataSeedContributor.cs".

Please provide a temporary workaround if possible. I'm dealing with a deadline. Thank you.

  • ABP Framework version: v7.3.3 and v7.4.0
  • UI Type: Blazor Server
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace: N/A
  • Steps to reproduce the issue:

I installed ABP, ABP CLI, and ABP Suite several weeks ago. At that time I was using ABP Suite 7.3.3 and created my first project. Everything worked great. Fast forward several weeks. Time to create a new project. I updated ABP to 7.4.0 and created my new project. Everything worked great. But now I have two projects. One was built on 7.3.3 and the other was 7.4.0. I tried to upgrade the 7.3.3. project to 7.4.0 but encountered all kinds of errors. So I decided to keep it on 7.3.3 for now.

Next, I needed to add an entity in my 7.3.3. project. In ABP Suite I got an error when attempting this because I'm running 7.4.0 and trying to create entities in a 7.3.3. project. Fortunately, I figured out the solution... remove ABP Suite 7.4.0 and install ABP Suite 7.3.3. Then I could open my 7.3.3. project in ABP Suite and make changes. Great.

But now I need to work in my 7.4.0 project again. Unfortunately, I'm getting ABP Suite errors again because I'm trying to use 7.3.3 to add an entity into a 7.4.0 project. Yes, I could remove 7.3.3 and install 7.4.0. So it appears that every time I need to make a change in one of my projects, however minor, I need to remove ABP Suite and re-install it using the correct version before opening my project in ABP Suite. That's cumbersome if, like me, you create multiple projects for several customers and need to manage them all... sometimes touching on 2-3 projects at a time and needing to switch back and forth between them several times in a given work week.

Is this what you must do every time you want to work with a project that was created on a different version of ABP Suite? Or, is there some way to launch ABP using a specific version? You might sau, just upgrade everything to 7.4.0. But that's easier said then done. It's sort of a complex process involving creating an empty project on both the old and new version then using WinMerge to determine the difference and manually editing the older project. It's pretty messy. So I don't agree that upgrading is always the best solution, especially for complex projects where entities classes, pages, etc created in ABP Suite might have been drastically altered.

Short question. What's the best way to manage ABP projects of varying versions?

A great answer would be something like... "Just type 'abp suite install --version 7.3.3' and 'abp suite install --version 7.4.4' to install both versions and then type 'abp suite --version 7.4.0'" to open ABP Suite using one of the many versions of it (eg 7.4.0) that you might have installed. That way, if I need to switch to the 7.3.3. project I can just exit ABP Suite and type 'abp suite --version 7.3.3.' to work on the other project. Is something like this possible? If not, can you make it happen?

  • ABP Framework version: v7.4.0
  • UI Type: Blazor Server
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

Quick background. My app relates to the exchange of foreign currencies. I have two entities... a "Currency" (eg. UD dollar, Japanese Yen, etc.) and a "CurrencyPair" (eg. USD/JPY, EUR/USD, etc.). So I have a "Currency" entity with a GUID ID and a name (eg. "USD", "EUR", "JPY", etc.), and I have a "CurrencyPair" entity with a GUID ID and a name (e. "EUR/USD", "USD/JPY", etc.). I created both entities. At this point, there is no relationship between them, and each entity only has an ID and a Name. I was able to "Save and Generate" these entities, which built the code. And I ran the app with no issues.

Now I am trying to define the navigation properties. A "CurrencyPair" must reference two "Currency" entities. For the currency pair called "USD/JPY", "USD" is called the "quote" currency and "JPY" is referred to as the "base" currency. So I have two navigation properties I need called "QuoteCurrency" and "BaseCurrency". So, I defined these as follows when defining the navigation properties on the "CurrencyPair" entity:

  1. On the "Basic" tab I selected "Currencies.cs" for the Entity.
  2. For Display Property I selected "Name".
  3. I toggled the "Required" checkbox ON.
  4. On the "Advanced" tab the only thing I changed was to rename Property Name in the Others section from "CurrencyId" to "QuoteCurrencyId"
  5. I repeated the above steps for the "base" currency navigation property, thus renaming "CurrencyId" to "BaseCurrencyId"
  6. I clicked "Save and Generate"

ABP, after several seconds, produced this error: Error occurred on DB migration step! Make sure the project is compiled and working. Command output: Build started... Build failed. Use dotnet build to see the errors.

Using ABP Suite to define an entity with a 1-n navigation property that is flagged as required... It seems that any time I flag a navigation property as "required" ABP Suite will fail to "Save and generate" the code. When it attempts to, I receive the error provided above. Interestingly, If I remove the required flag on these navigation properties, the issue goes away. If I check the "required" box and try again the error comes back. After seeing this error I switched over to Visual Studio and tried to build the solution. This is what I see.

The issue appears to be with this line of generated code: <Select TValue="Guid"

If I manually change it to: <Select TValue="Guid?"

... in other words, make it nullable, now the solution builds without errors.

Shouldn't this be defined as Guid? always, even if the navigation property is required? This is select item for a filter. Although a value for this property is required in the entity definition, it shouldn't be required to filter by this property. Or may there's something I don't understand about this. Please clarify if you can.

At any rate, vanilla code produced by ABP Suite (before any custom modifications) should not produce ABP Suite and build errors... unless I'm doing something wrong. Please advise.

Thank you. Since the "libs" folder is not included in the code by default when pushing to a Git repo, can anyone provide steps (YAML code) to restore the contents of the "libs" folder during an Azure DevOps build pipeline?

After sending stdout to a log file I was able to see the source of the problem...

Volo.Abp.AbpException: Could not find file '/libs/bootstrap/css/bootstrap.css'

In my Azure app service my "wwwroot" folder did not have a libs folder, and this was the reason for the error. So I investigated to find out why the libs folder is missing. It turns out that the .gitignore file produced by ABP Suite contains the following...

# Use abp install-libs to restore.
**/wwwroot/libs/*

So, when I committed my code, the contents of the "lib" folder were being ignored. I commented out the second line above and committed the entire contents of the "libs" folder to my code repo. Azure CI/CD then compiled, packaged, and deployed to the Azure app service. Finally the app loaded without errors.

I would like to understand more about why the .gitignore file generated by ABP Suite is configured by default to ignore the libs folder when it is clearly needed for the app to function. Is there an assumption that the developer will execute abp install-libs in the Azure DevOps build pipeline or on the server where the application is ultimately deployed?

Showing 1 to 10 of 15 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 01, 2024, 05:35