Problem solved, can you try again?
Hi
I will test the situation in version 4.4.2 as soon as possible and reply to you.
The problem will be solved within 2 hours. I'll let you know when it's resolved.
Hello, we do not support this directly, but I will create an internal issue as a feature request.
However, there is a quick method by which you can do this.
With Suite, create a new module with the same name as your existing module (Suite will automatically handle the project dependencies). Then only replace the path of the reference given to the modules in the csproj files. Then you can delete the module you just created.
Problem solved, thanks for your patience.
Hi, sorry for this temporary problem. You can try again.
Hello,
I tried what you want to do in my own project and it worked fine.
Here are my steps:
1-) I create a new file named test.css in wwwroot
2-) I change the MyProjectNameBundleContributor as below.
public class Test123BundleContributor : IBundleContributor
{
public void AddScripts(BundleContext context)
{
}
public void AddStyles(BundleContext context)
{
context.Add("main.css");
context.BundleDefinitions.ReplaceOne(x => x.Source == "_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/bootstrap/css/bootstrap.min.css",
new BundleDefinition
{
Source = "test.css"
});
}
}
As you can see from the code, I removed bootstrap.min.css and added test.css instead.
You can access other sources here.
3-) Run the abp bundle -f command in the Blazor project
4-) Check the global.css in wwwroot
5-) Run the application.
Note: I understand that you have an urgency and this is perfectly normal, but you are not the only one we need to take care of so I think you will appreciate short-term (e.g. 1 day) delayed responses. Also, it would be much better if you provide a minimal reproducible example for this kind of urgent business.
Why is a minimally reproducible example necessary?
For example, when you were describing the first problem, you explained it as follows.
I have run abp bundle command so it's showing script and styles bundled and I can see changes in my index.html file as well but If I run site so in browser no changes are done like it's not reducing js or css calls.
That sounds pretty self-explanatory, I can repeat that.
In your next reply, you replied as follows.
I checked my development.json file as well so it 's empty also If I try to add my custom css or js files in bundlecontributor.cs class and removing same js or css from index.html page and run abp bundle so it's not updating global.js or global.css files.
That sounds pretty self-explanatory, also. However, now you say you replace a resource.
So, both can be repeated for themselves, but there is difference between the two definitions. What I understood when I read the first definition is different from what I understood when I read the second definition. (Maybe I got it wrong, but it doesn't matter who misunderstood. The important thing is to solve the problem.)
As a result, while trying to reproduce the problem, I interpret and answer according to my own understanding. I make an effort to understand the problem, but nevertheless, if I misunderstood, I am not able to give an immediate response to your urgent problem. This is why a minimally reproducible example is vital.
Run below commands in EzpandCC.EntityFrameworkCore.DbMigrations/
dotnet ef migrations add "Initial" --context EzpandCCMigrationsDbContext
dotnet ef migrations add "Initial" --context EzpandCCSecondDbContext
These two commands need to be run sequentially, not together.
If you changed the name of the second DbContext you created, if EzpandCCSecondDbContext is different from this name, it should change accordingly in the command.
For example:
My second DB context name is MyNewDbContext and so I have to write the following code.
dotnet ef migrations add "Initial" --context MyNewDbContext
Hello, I have explained how to do this step by step below. You can do it this way too. If you have any questions, please don't hesitate to ask.
EzpandCCSecondDbContext.cs in EzpandCC.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EzpandCCSecondDbContextFactory.cs in EzpandCC.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EzpandCCMigrationsDbContext in EzpandCC.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/builder.ConfigureAuditLogging();
MigrateAsync method in EntityFrameworkCoreEzpandCCDbSchemaMigrator class in EzpandCC.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/await _serviceProvider
.GetRequiredService<EzpandCCSecondDbContext>()
.Database
.MigrateAsync();
ConfigureServices metod in EzpandCCEntityFrameworkCoreDbMigrationsModule class in EzpandCC.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/context.Services.AddAbpDbContext<EzpandCCSecondDbContext>();
Default for all appsettings.json."AbpAuditLogging": "Server=(LocalDb)\\MSSQLLocalDB;Database=EzpandCC;Trusted_Connection=True"
EzpandCC.EntityFrameworkCore.DbMigrations/dotnet ef migrations add "Initial" --context EzpandCCMigrationsDbContext
dotnet ef migrations add "Initial" --context EzpandCCSecondDbContext
EzpandCC.DbMigrator project.