NeuCharFramework (NCF)
  • NCF - NeuCharFramework
  • 项目

    • 准备
    • 基础库源码分析
    • 动态WebApiEngine
    • 部署
    • MCP (Model Context Protocol) 模块
    • Senparc.AI
  • 帮助

    • 在线资源
    • 问答社区
    • QQ群(147054579)
    • Senparc微信SDK
  • Gitee
  • GitHub
  • English
  • 简体中文
GitHub
  • NCF - NeuCharFramework
  • 项目

    • 准备
    • 基础库源码分析
    • 动态WebApiEngine
    • 部署
    • MCP (Model Context Protocol) 模块
    • Senparc.AI
  • 帮助

    • 在线资源
    • 问答社区
    • QQ群(147054579)
    • Senparc微信SDK
  • Gitee
  • GitHub
  • English
  • 简体中文
GitHub
  • NCF 概要

    • NCF - NeuCharFramework
    • 关于 NCF
    • 环境要求
    • 前后端分离模式
    • Xncf模块简介
  • 准备开发

    • 获取 NCF 模板源码
    • 使用 Visual Studio 运行 NCF
    • 使用 CLI 运行 NCF
    • 安装
    • 管理员登录
    • 管理员后台
    • appsettings.json 配置
    • 模块管理
    • 获取文档
  • 配置

    • 入口文件
    • 数据库设置
    • appsettings.json 配置
    • Docker
    • Dapr
    • 配置多租户
    • Redis 缓存
  • 模块化开发

    • NCF 模块化开发思想
    • Xncf 的构成
    • 创建第一个 Xncf 模块
    • Xncf 模块 Sample 详解
    • 实现自己的业务逻辑
    • 更新 Xncf 模块
    • 模块之间如何调用
    • 发布Xncf 模块到nuget.org
    • 更新基础库
    • Xncf 模块开发
    • 嵌入静态资源文件到NCF中
    • 发布本地Nuget包
    • 进阶
  • 数据库

    • 数据库设置
    • 多数据库支持
    • 指定数据库
    • 更新 Senparc.Service 项目的数据库迁移文件(Migrations)
    • 多数据库原理
    • 数据库停机坪(DatabasePlant)
    • 停机坪操作数据库迁移和更新
  • 单元测试

    • NCF 单元测试介绍
    • 开始开发
    • 进阶
    • 附录
  • Q&A

    • NCF名词解释
    • NCF常见问题
  • 新发布

    • 新功能
    • 升级指导
    • 日志

NCF常见问题

编译报错的问题

问题:rzc generate exited with code 2.

Image text

解决方案请参考:

Image text

<LangVersion>preview</LangVersion>

修改Mysql的配置后,启动报错

Image text

解决方案请参考:如何切换Mysql

如何修改默认数据库连接字符串

1.打开文件 /src/Senparc.Web/App_Data/Database/SenparcConfig.config 文件

2.直接编辑 <ConnectionStringFull> 节点下的连接字符串,例如:

    <ConnectionStringFull>
        <![CDATA[Server=.\;Database=NCF;User ID=sa;Pwd=sa;Trusted_Connection=True;integrated security=True;]]>
    </ConnectionStringFull>

Image text

注意:

1、不需要修改其他任何内容,其他设置日后会另作他用,乃为黑客设置“迷宫”而设。

2、正式版发布后,此连接字符串将会被加密,我们会提供加密工具。

创建自定义 Xncf 模块后,报错“rzc generate exited with code -2147450730”

Image text

解决方案:安装 sdk dotnet 2.1

下载地址:https://dotnet.microsoft.com/en-us/download/dotnet/2.1

.NET CLI 命令 dotnet ef 执行报错

错误信息:

Could not execute because the specified command or file was not found.
Possible reasons for this include:
  * You misspelled a built-in dotnet command.
  * You intended to execute a .NET Core program, but dotnet-ef does not exist.
  * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.

解决方案: 使用的命令为

dotnet ef database update

查看当前dot版本为3.0

解决办法:

需要更新 dotnet tool,使用的命令为:

dotnet tool update --global dotnet-ef --version 3.0.0-preview7.19362.6

执行此命令之后再更新数据库就执行成功了。

参考地址:https://blog.csdn.net/topdeveloperr/article/details/101282099

NCF如何调试

参考地址:https://www.cnblogs.com/szw/p/debug-remote-source-code.html

后台UI框架

参考地址:https://element.eleme.cn/#/zh-CN

图标参考

参考地址:https://colorlib.com/polygon/gentelella/icons.html

模块化:不同模块是通过什么方式传递数据的

模块本身还是由类和方法构成的,一些关键的方法(Functions、Services、WebApis,等等),都是可以在代码层面调用的,如果要通过http(s)来调用,那一般就是用 WebApi,通过 Json 传递。

使用2021-03-28以后的Developer/master分支版本在使用XncfBuilder模块后,执行生成,并未生成任何内容

原因及解决方案:

  1. 代码不是最新的:请拉取最新的代码。

  2. 本地未安装XNCF命令:

打开命令行工具,命令行中执行:

dotnet new install Senparc.Xncf.XncfBuilder.Template

注:.NET 7 runtime 之前的 CLI 命令需要使用 --install:

dotnet new --install Senparc.Xncf.XncfBuilder.Template

执行完成后会看到以下内容

Image text

在根据XncfBuilder模块去生成模块,以下图片中选本地已安装即可

Image text

  1. .NET 7 的 CLI 有一个生成模板的 bug,请等待官方修复,或使用 .NET 6.0 的 CLI。

NeuChar Sample的地址

NeuChar-App-Sample

在 GitHub 上编辑此页
上次更新:
贡献者: Jeffrey Su, MLTechnology
Prev
NCF名词解释