我正在开发我的第一个DotNetNuke项目,当我创建新项目时,我在第一次编译时得到了这个错误列表:
Warning 1 Namespace or type specified in the Imports 'DotNetNuke.Entities.Modules' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\Components\FeatureController.vb 11 9 DNNModule1
Warning 2 Namespace or type specified in the Imports 'DotNetNuke.Services.Search' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\Components\FeatureController.vb 12 9 DNNModule1
Warning 3 Namespace or type specified in the Imports 'DotNetNuke.Entities.Modules' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\DNNModule1ModuleBase.vb 11 9 DNNModule1
Error 4 Type 'PortalModuleBase' is not defined. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\DNNModule1ModuleBase.vb 24 14 DNNModule1
Warning 5 Namespace or type specified in the Imports 'DotNetNuke.Entities.Modules' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\DNNModule1SettingsBase.vb 11 9 DNNModule1
Error 6 Type 'ModuleSettingsBase' is not defined. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\DNNModule1SettingsBase.vb 24 14 DNNModule1
Warning 7 Namespace or type specified in the Imports 'DotNetNuke' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\Data\DataProvider.vb 11 9 DNNModule1
Error 8 'Framework' is not declared. It may be inaccessible due to its protection level. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\Data\DataProvider.vb 36 33 DNNModule1
Warning 9 Namespace or type specified in the Imports 'DotNetNuke.Entities.Modules.Actions' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\Edit.ascx.vb 10 9 DNNModule1
Warning 10 Namespace or type specified in the Imports 'DotNetNuke.Entities.Modules' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\Edit.ascx.vb 11 9 DNNModule1
Warning 11 Namespace or type specified in the Imports 'DotNetNuke.Services.Exceptions' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\Edit.ascx.vb 12 9 DNNModule1
Warning 12 Namespace or type specified in the Imports 'DotNetNuke.Services.Localization' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\Edit.ascx.vb 13 9 DNNModule1
Error 13 Event 'Load' cannot be found. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\Edit.ascx.vb 39 86 DNNModule1
Error 14 'Exceptions' is not declared. It may be inaccessible due to its protection level. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\Edit.ascx.vb 43 13 DNNModule1
Warning 15 Namespace or type specified in the Imports 'Microsoft.ApplicationBlocks.Data' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\Providers\DataProviders\SqlDataProvider\SqlDataProvider.vb 13 9 DNNModule1
Warning 16 Namespace or type specified in the Imports 'DotNetNuke.Common.Utilities' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\Providers\DataProviders\SqlDataProvider\SqlDataProvider.vb 15 9 DNNModule1
Warning 17 Namespace or type specified in the Imports 'DotNetNuke.Framework.Providers' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\Providers\DataProviders\SqlDataProvider\SqlDataProvider.vb 16 9 DNNModule1
Error 18 Type 'ProviderConfiguration' is not defined. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\Providers\DataProviders\SqlDataProvider\SqlDataProvider.vb 43 43 DNNModule1
Error 19 Type expected. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\Providers\DataProviders\SqlDataProvider\SqlDataProvider.vb 56 32 DNNModule1
Error 20 'Config' is not declared. It may be inaccessible due to its protection level. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\Providers\DataProviders\SqlDataProvider\SqlDataProvider.vb 61 33 DNNModule1
Error 21 'DotNetNuke' is not declared. It may be inaccessible due to its protection level. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\Providers\DataProviders\SqlDataProvider\SqlDataProvider.vb 121 20 DNNModule1
Warning 22 Namespace or type specified in the Imports 'DotNetNuke' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\Settings.ascx.vb 10 9 DNNModule1
Warning 23 Namespace or type specified in the Imports 'DotNetNuke.Services.Exceptions' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\Settings.ascx.vb 11 9 DNNModule1
Error 24 sub 'LoadSettings' cannot be declared 'Overrides' because it does not override a sub in a base class. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\Settings.ascx.vb 47 26 DNNModule1
Error 25 Reference to a non-shared member requires an object reference. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\Settings.ascx.vb 49 17 DNNModule1
Error 26 'ProcessModuleLoadException' is not declared. It may be inaccessible due to its protection level. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\Settings.ascx.vb 62 13 DNNModule1
Error 27 sub 'UpdateSettings' cannot be declared 'Overrides' because it does not override a sub in a base class. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\Settings.ascx.vb 75 26 DNNModule1
Error 28 Type 'Entities.Modules.ModuleController' is not defined. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\Settings.ascx.vb 77 35 DNNModule1
Error 29 'ProcessModuleLoadException' is not declared. It may be inaccessible due to its protection level. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\Settings.ascx.vb 87 13 DNNModule1
Warning 30 Namespace or type specified in the Imports 'DotNetNuke' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\View.ascx.vb 10 9 DNNModule1
Warning 31 Namespace or type specified in the Imports 'DotNetNuke.Entities.Modules.Actions' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\View.ascx.vb 11 9 DNNModule1
Warning 32 Namespace or type specified in the Imports 'DotNetNuke.Entities.Modules' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\View.ascx.vb 12 9 DNNModule1
Warning 33 Namespace or type specified in the Imports 'DotNetNuke.Services.Exceptions' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\View.ascx.vb 13 9 DNNModule1
Warning 34 Namespace or type specified in the Imports 'DotNetNuke.Services.Localization' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\View.ascx.vb 14 9 DNNModule1
Error 35 Type 'IActionable' is not defined. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\View.ascx.vb 29 16 DNNModule1
Error 36 Event 'Load' cannot be found. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\View.ascx.vb 40 86 DNNModule1
Error 37 'Exceptions' is not declared. It may be inaccessible due to its protection level. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\View.ascx.vb 44 13 DNNModule1
Error 38 Type 'ModuleActionCollection' is not defined. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\View.ascx.vb 59 49 DNNModule1
Error 39 Type 'IActionable' is not defined. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\View.ascx.vb 59 83 DNNModule1
Error 40 Type 'ModuleActionCollection' is not defined. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\View.ascx.vb 61 32 DNNModule1
Error 41 'GetNextActionID' is not declared. It may be inaccessible due to its protection level. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\View.ascx.vb 62 25 DNNModule1
Error 42 'Localization' is not declared. It may be inaccessible due to its protection level. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\View.ascx.vb 62 42 DNNModule1
Error 43 'LocalResourceFile' is not declared. It may be inaccessible due to its protection level. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\View.ascx.vb 62 79 DNNModule1
Error 44 'Entities' is not declared. It may be inaccessible due to its protection level. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\View.ascx.vb 62 99 DNNModule1
Error 45 'EditUrl' is not declared. It may be inaccessible due to its protection level. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\View.ascx.vb 62 161 DNNModule1
Error 46 'DotNetNuke' is not declared. It may be inaccessible due to its protection level. c:\users\administrateur\documents\visual studio 2012\Projects\DNNModule1\DNNModule1\View.ascx.vb 62 179 DNNModule1
Warning 47 Could not resolve this reference. Could not locate the assembly "DotNetNuke". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. DNNModule1
Warning 48 Could not resolve this reference. Could not locate the assembly "Microsoft.ApplicationBlocks.Data". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. DNNModule1
Warning 49 The referenced component 'DotNetNuke' could not be found. DNNModule1
Warning 50 The referenced component 'Microsoft.ApplicationBlocks.Data' could not be found. DNNModule1
答案 0 :(得分:2)
如果您使用我的模板http://christoctemplate.codeplex.com,请务必遵循DNN开发环境设置说明http://www.christoc.com/tutorials/aid/1
模板遵循非常特定的开发格式,经过多年的DNN开发后已经过调整,如果你遵循这种格式,你会发现DNN开发更容易。
答案 1 :(得分:2)
这也可能是因为你有一个项目是针对旧版本的.Net进行编译而不是DNN。例如,您的项目是.Net 3.5,DNN编译的版本是.Net 4.0。
答案 2 :(得分:1)
看起来该项目无法找到DotNetNuke.dll和Microsoft.ApplicationBlocks.Data.dll。
查看您的参考资料部分,您应该在这两个参考资料中看到警告符号。只需删除它们并使用正确的路径添加引用。
OR - 理想情况下使用NuGet来获取包 - http://mitchelsellers.com/blogs/2013/07/25/enterprise-extension-development-with-dnn-part-two.aspx
答案 3 :(得分:0)
我有同样的问题,现在解决了
删除DotNetNuke
,DotNetNuke.web
和Microsoft.ApplicationBlocks.Data.dll
的引用,而不是导航到您在IIS中配置的DNN网站,例如dnndev.me
转到bin
文件夹,找到这些参考只是添加它们,你的问题将得到解决