Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "goldstar25"

I upgraded the project,I'll try again later.

I has use EmbeddedResources in .NET Core project. I found these following bug: 1._ViewImports.cshtml does not work 2. Can't use AreaAttribute. For the first point, My plus project's project.json is:

"buildOptions": {
    "embed": {
      "include": [
        "Views/*.*",
        "Views/**/*.*",
        "Localization/*.xml"
      ]
    }
  }

And error is: The name 'MetronicConsts' does not exist in the current context attachment is compilation source. And the _ViewImports.cshtml content is: @using Magicodes.Theme.Metronic @using Abp.Localization @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

<cite>ismcagdas: </cite> Hi,

Your code seems correct to me. Let me try the same scenario and get back to you.

Thanks.

I use .NET Core. Thanks!

1.I has enable PlugInSources:

return services.AddAbp<AdminWebMvcModule>(options =>
            {
                var plusPath = Path.Combine(_hostingEnvironment.WebRootPath, "PlugIns");
                if (!Directory.Exists(plusPath))
                    Directory.CreateDirectory(plusPath);
                options.PlugInSources.AddFolder(plusPath);
            });

2.I write a RazorPageBase.cs :

public abstract class RazorPageBase<TModel> : AbpRazorPage<TModel>
    {
        protected RazorPageBase()
        {
            LocalizationSourceName = DemoConsts.LocalizationSourceName;
        }
    }

3.And add _ViewImports.cshtml:

@using Abp.Localization
@inherits Magicodes.UI.Demo.Views.RazorPageBase<TModel>
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

4.When I use L method(E.g @L("UICollorCollection")) in view,I will get exception:

An unhandled exception occurred while processing the request.

FileNotFoundException: 未能加载文件或程序集“Magicodes.UI.Demo, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null”或它的某一个依赖项。系统找不到指定的文件。
System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes)

[attachment=0]exception.png[/attachment]

Thanks.My English is so so.

<cite>ismcagdas: </cite> Hi,

Probably I understand you wrongly. If you are referencing this dll via nuget package, why do you need to copy it into PlugIns folder ?

Can you explain it in a bit more detailed.

Thanks.

I want dynamic loading plugin assembly,but if plugin project referenced orther project or orther assembly,It will not work.I do not know how to deal with it,Hope you can give pointers.

It's Ok and no exception.but if I not referenced these dlls ,I can't use these dlls in plus project.

thanks,this is OK!

<cite>ismcagdas: </cite> Hi,

I have tried this scenario and it didn't throw any exception for me.

  • I have referenced this package to my web project <a class="postlink" href="http://www.nuget.org/packages/Magicodes.Sms.Alidayu.Core/">http://www.nuget.org/packages/Magicodes ... dayu.Core/</a>.
  • Then copied it's dll to PugIns folder.
  • Then I removed nuget package from my project.

Can you try it in this way ?

And your project's Target Framework must be .Net Framework 4.6.1

  1. I Add a project name's "Magicodes.Abp.Sms.Application",and referenced this package " Magicodes.Sms.Alidayu.Core" from nuget,this is project.json:
{
  "version": "1.0.0-*",

  "dependencies": {
    "Abp": "1.2.1",
    "Magicodes.Abp.Sms.Core": "1.0.0-*",
    "Magicodes.Admin.Application": "1.0.0.0-*",
    "Magicodes.Sms.Alidayu.Core": "1.0.4"
  },

  "frameworks": {
    "net461": {}
  }
}
  1. I copy these dlls to web project’s "wwwroot\PlugIns" folder:

Magicodes.Abp.Sms.Core.dll Magicodes.Sms.Alidayu.Core.dll Magicodes.Sms.Core.dll

  1. I run this project,and get this exception:
AbpInitializationException: Could not get module types from assembly: Magicodes.Sms.Alidayu.Core, Version=1.0.4.0, Culture=neutral, PublicKeyToken=null
Abp.PlugIns.FolderPlugInSource.GetModules()
Abp.PlugIns.PlugInSourceExtensions.GetModulesWithAllDependencies(IPlugInSource plugInSource)
System.Linq.Enumerable+<SelectManyIterator>d__16.MoveNext()
System.Linq.Enumerable+<DistinctIterator>d__63.MoveNext()
System.Collections.Generic.List..ctor(IEnumerable<T> collection)
System.Linq.Enumerable.ToList<TSource>(IEnumerable<TSource> source)
Abp.Modules.AbpModuleManager.FindAllModuleTypes(out List<Type> plugInModuleTypes)
Abp.Modules.AbpModuleManager.LoadAllModules()
Abp.AbpBootstrapper.Initialize()
Abp.AspNetCore.AbpApplicationBuilderExtensions.UseAbp(IApplicationBuilder app)
Magicodes.Admin.Web.Startup.Startup.Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) in Startup.cs
+
            app.UseAbp(); //Initializes ABP framework.
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
Microsoft.AspNetCore.Hosting.ConventionBasedStartup.Configure(IApplicationBuilder app)
Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()

so I think orthers dll no AbpModule can't put in plus folder. even if can put in this folder,will not find it.

<cite>ismcagdas: </cite> Hi,

Normally this is possible. Which assembly do you try ? Can you send it to <a href="mailto:[email protected]">[email protected]</a> ?

Also, the assembly in the PlugIns folder must not be referenced in the project.

My run environment is .NET Core. I referenced Magicodes.Sms.Alidayu.Core,you can get it from nuget.I think plus assembly in plus folder can't referenced any assembly ,Including other plugins assembly.

I find a method "GetAdditionalAssemblies",Do not know if there is any use?

Showing 31 to 40 of 46 entries