0

我正在处理我的第一个 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
4

4 回答 4

2

如果您使用我的模板http://christoctemplate.codeplex.com请务必遵循 DNN 开发环境设置说明http://www.christoc.com/tutorials/aid/1

模板遵循非常特定的开发格式,经过多年的 DNN 开发进行了调整,如果您遵循该格式,您会发现 DNN 开发容易得多。

于 2013-08-21T16:22:22.360 回答
2

这也可能是因为您有一个项目是针对比 DNN 更旧版本的 .Net 进行编译的。例如,您的项目是 .Net 3.5,而 DNN 编译的版本是 .Net 4.0。

于 2013-12-28T04:40:49.657 回答
1

看起来该项目无法找到 DotNetNuke.dll 和 Microsoft.ApplicationBlocks.Data.dll。

查看您的参考资料部分,您应该在这两个参考资料上看到警告符号。只需删除它们并使用正确的路径添加引用。

或者 - 理想情况下使用 NuGet 来获取包 - http://mitchelsellers.com/blogs/2013/07/25/enterprise-extension-development-with-dnn-part-two.aspx

于 2013-08-21T15:49:50.293 回答
0

我有同样的问题,现在解决了

删除 的引用DotNetNukeDotNetNuke.web然后Microsoft.ApplicationBlocks.Data.dll导航到您在 IIS 中配置的 DNN 网站,例如dnndev.me转到bin文件夹并找到这些引用,只需添加它们,您的问题就会得到解决

于 2016-06-07T06:30:39.147 回答