diff --git a/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj b/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj
index 5ec6217ca2..2b2f815b7c 100644
--- a/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj
+++ b/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj
@@ -19,7 +19,7 @@
-
+
diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/DerivedClassFinder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/DerivedClassFinder.cs
index 52a2fb93b1..5462f3e9fb 100644
--- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/DerivedClassFinder.cs
+++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/DerivedClassFinder.cs
@@ -54,8 +54,14 @@ public class DerivedClassFinder : ITransientDependency
protected bool IsDerived(string csFile, string baseClass)
{
var root = CSharpSyntaxTree.ParseText(File.ReadAllText(csFile)).GetRoot();
- var namespaceSyntax = root.DescendantNodes().OfType().First();
- var classDeclaration = (namespaceSyntax.DescendantNodes().OfType()).First();
+ var namespaceSyntax = root.DescendantNodes().OfType().FirstOrDefault();
+ var classDeclaration = (namespaceSyntax?.DescendantNodes().OfType())?.FirstOrDefault();
+
+ if (classDeclaration == null)
+ {
+ classDeclaration = root.DescendantNodes().OfType().First();
+ }
+
var baseTypeList = classDeclaration.BaseList?.Types.Select(t => t.ToString()).ToList();
if (baseTypeList == null)
diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs
index babfabdc56..a3637266bc 100644
--- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs
+++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs
@@ -704,13 +704,13 @@ public class SolutionModuleAdder : ITransientDependency
new NugetPackageInfo
{
Name = $"{module.Name}.Blazor.WebAssembly",
- ModuleClass = $"{module.Name}.Blazor.{moduleProjectName}BlazorWebAssemblyModule",
+ ModuleClass = $"{module.Name}.Blazor.WebAssembly.{moduleProjectName}BlazorWebAssemblyModule",
Target = NuGetPackageTarget.BlazorWebAssembly
},
new NugetPackageInfo
{
Name = $"{module.Name}.Blazor.Server",
- ModuleClass = $"{module.Name}.Blazor.{moduleProjectName}BlazorServerModule",
+ ModuleClass = $"{module.Name}.Blazor.Server.{moduleProjectName}BlazorServerModule",
Target = NuGetPackageTarget.BlazorServer
},
new NugetPackageInfo