Compiler Error Message错误,常见错误!

本文介绍了解决 ASP.NET 编译错误的具体步骤。针对因页面类定义不正确导致的CompilationError,提供了详细的错误信息及修改建议。指出在代码文件中定义的类需与'inherits'属性匹配并继承正确的基类。

 Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: ASPNET: Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl).

Source Error:

 
Line 13: namespace QY.com.ADUnion
Line 14: {
Line 15:     public partial class User : System.Web.UI.Page
Line 16:     {
Line 17:         protected void Page_Load(object sender, EventArgs e)

 

解决方法:

.aspx 第一行配置信息Inherits="User" 应改为 Inherits="System.Web.UI.Page.User"

"D:\deveco\DevEco Studio\tools\node\node.exe" "D:\deveco\DevEco Studio\tools\hvigor\bin\hvigorw.js" --mode module -p module=entry@default -p product=default -p previewer.replace.page=pages/HomePage -p pageType=page -p compileResInc=true -p previewMode=true -p buildRoot=.preview PreviewBuild --watch --analyze=normal --parallel --incremental --daemon > hvigor WARN: The project has not explicitly set the 'targetSdkVersion' version at build-profile.json5. It is recommended to configure it. Reference: https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/ide-hvigor-build-profile-app#section45865492619 > hvigor UP-TO-DATE :entry:default@PreBuild... > hvigor Finished :entry:default@CreateModuleInfo... after 2 ms > hvigor UP-TO-DATE :entry:default@MergeProfile... > hvigor UP-TO-DATE :entry:default@CreateBuildProfile... > hvigor Finished :entry:default@PreCheckSyscap... after 1 ms > hvigor UP-TO-DATE :entry:default@GeneratePkgContextInfo... > hvigor UP-TO-DATE :entry:default@ProcessProfile... > hvigor UP-TO-DATE :entry:default@ProcessRouterMap... > hvigor UP-TO-DATE :entry:default@ProcessShareConfig... > hvigor Finished :entry:default@ProcessStartupConfig... after 3 ms > hvigor Finished :entry:default@PreviewProcessResource... after 3 ms > hvigor UP-TO-DATE :entry:default@GenerateLoaderJson... > hvigor Finished :entry:default@PreviewCompileResource... after 425 ms > hvigor Finished :entry:default@PreviewHookCompileResource... after 2 ms > hvigor Finished :entry:default@CopyPreviewProfile... after 11 ms > hvigor Finished :entry:default@ReplacePreviewerPage... after 5 ms > hvigor Finished :entry:buildPreviewerResource... after 1 ms > hvigor Finished :entry:default@PreviewUpdateAssets... after 4 ms > hvigor ERROR: Failed :entry:default@PreviewArkTS... > hvigor ERROR: 10605017 ArkTS Compiler Error Error Message: Indexed signatures are not supported (arkts-no-indexed-signatures) At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:10:3 10605091 ArkTS Compiler Error Error Message: Destructuring parameter declarations are not supported (arkts-no-destruct-params) At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:51:17 10605008 ArkTS Compiler Error Error Message: Use explicit types instead of "any", "unknown" (arkts-no-any-unknown) At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:57:13 10605008 ArkTS Compiler Error Error Message: Use explicit types instead of "any", "unknown" (arkts-no-any-unknown) At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:58:13 10605087 ArkTS Compiler Error Error Message: "throw" statements cannot accept values of arbitrary types (arkts-limited-throw) At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:75:7 10605008 ArkTS Compiler Error Error Message: Use explicit types instead of "any", "unknown" (arkts-no-any-unknown) At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:85:13 10605008 ArkTS Compiler Error Error Message: Use explicit types instead of "any", "unknown" (arkts-no-any-unknown) At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:87:13 10605087 ArkTS Compiler Error Error Message: "throw" statements cannot accept values of arbitrary types (arkts-limited-throw) At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:104:7 10605087 ArkTS Compiler Error Error Message: "throw" statements cannot accept values of arbitrary types (arkts-limited-throw) At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:132:11 10605087 ArkTS Compiler Error Error Message: "throw" statements cannot accept values of arbitrary types (arkts-limited-throw) At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:135:9 10605087 ArkTS Compiler Error Error Message: "throw" statements cannot accept values of arbitrary types (arkts-limited-throw) At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:138:7 10605008 ArkTS Compiler Error Error Message: Use explicit types instead of "any", "unknown" (arkts-no-any-unknown) At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:170:13 10605008 ArkTS Compiler Error Error Message: Use explicit types instead of "any", "unknown" (arkts-no-any-unknown) At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:170:39 10605087 ArkTS Compiler Error Error Message: "throw" statements cannot accept values of arbitrary types (arkts-limited-throw) At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:172:9 10605087 ArkTS Compiler Error Error Message: "throw" statements cannot accept values of arbitrary types (arkts-limited-throw) At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:181:7 10605038 ArkTS Compiler Error Error Message: Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals) At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:225:87 10605038 ArkTS Compiler Error Error Message: Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals) At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:235:89 10605038 ArkTS Compiler Error Error Message: Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals) At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:257:97 10605038 ArkTS Compiler Error Error Message: Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals) At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:259:99 10605038 ArkTS Compiler Error Error Message: Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals) At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:288:86 10605038 ArkTS Compiler Error Error Message: Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals) At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:701:43 10605038 ArkTS Compiler Error Error Message: Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals) At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:708:36 10605038 ArkTS Compiler Error Error Message: Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals) At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:757:36 10605038 ArkTS Compiler Error Error Message: Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals) At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:794:36 10605038 ArkTS Compiler Error Error Message: Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals) At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:840:43 10605038 ArkTS Compiler Error Error Message: Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals) At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:849:38 10605091 ArkTS Compiler Error Error Message: Destructuring parameter declarations are not supported (arkts-no-destruct-params) At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:859:43 10605029 ArkTS Compiler Error Error Message: Indexed access is not supported for fields (arkts-no-props-by-index) At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:860:9 10605038 ArkTS Compiler Error Error Message: Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals) At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:924:36 10605038 ArkTS Compiler Error Error Message: Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals) At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:959:36 10605038 ArkTS Compiler Error Error Message: Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals) At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:994:36 10505001 ArkTS Compiler Error Error Message: ';' expected. At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:1099:51 10505001 ArkTS Compiler Error Error Message: Property 'createHttpClient' does not exist on type 'typeof http'. At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:57:31 10505001 ArkTS Compiler Error Error Message: Property 'createHttpClient' does not exist on type 'typeof http'. At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:85:31 10505001 ArkTS Compiler Error Error Message: Conversion of type 'Promise<ValueType>' to type 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:200:19 10505001 ArkTS Compiler Error Error Message: Expected 1 arguments, but got 0. At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:342:7 10505001 ArkTS Compiler Error Error Message: Argument of type 'Alignment' is not assignable to parameter of type 'HorizontalAlign'. At File: C:/Users/Lenovo/Desktop/SmartFinanceAcademy/entry/src/main/ets/pages/HomePage.ets:1099:33 * Try: > Run with --stacktrace option to get the stack trace. > Run with --debug option to get more log output. > hvigor ERROR: BUILD FAILED in 11 s 255 ms Process finished with exit code -1
11-12
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值