I am trying to create a new module using DNN Compiled Module Development in VS 2017. After the new project is created its showing compilation error for 2 DLL file under references i.e.
1. DotNetNuke.dll
2. Microsoft.ApplicationBlocks.Data
It is resulting in a compilation error. Can anybody help me to resolve this? where can I get these files?
Hi ,
Please find the compilation error details. Its related to DotNetNuke.dll & Microsoft.ApplicationsBlock.Data.dll
NuGet Package restore failed for project MyVsTestForm: Unable to find version '1.5.0.235' of package 'MSBuildTasks'. C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\: Package 'MSBuildTasks.1.5.0.235' is not found on source 'C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\'. https://api.nuget.org/v3/index.json: Unable to load the service index for source https://api.nuget.org/v3/index.json. An error occurred while sending the request. The remote name could not be resolved: 'api.nuget.org' . Please see Error List window for detailed warnings and errors. 1>------ Build started: Project: MyVsTestForm, Configuration: Release Any CPU ------ 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3245: 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. 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3245: 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. 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\Properties\AssemblyInfo.cs(34,32,34,44): warning CS7035: The specified version string does not conform to the recommended format - major.minor.build.revision 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\Components\FeatureController.cs(15,7,15,17): error CS0246: The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\Components\FeatureController.cs(16,7,16,17): error CS0246: The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\Data\DataProvider.cs(15,7,15,17): error CS0246: The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\Data\DataProvider.cs(16,7,16,17): error CS0246: The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\MyVsTestFormModuleBase.cs(13,7,13,17): error CS0246: The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\MyVsTestFormModuleSettingsBase.cs(13,7,13,17): error CS0246: The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\Edit.ascx.cs(15,7,15,17): error CS0246: The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\Providers\DataProviders\SqlDataProvider\SqlDataProvider.cs(14,7,14,17): error CS0246: The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\Providers\DataProviders\SqlDataProvider\SqlDataProvider.cs(15,7,15,17): error CS0246: The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\Settings.ascx.cs(14,7,14,17): error CS0246: The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\Settings.ascx.cs(15,7,15,17): error CS0246: The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\View.ascx.cs(14,7,14,17): error CS0246: The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\View.ascx.cs(15,7,15,17): error CS0246: The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\View.ascx.cs(16,7,16,17): error CS0246: The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\View.ascx.cs(17,7,17,17): error CS0246: The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\View.ascx.cs(18,7,18,17): error CS0246: The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\MyVsTestFormModuleSettingsBase.cs(17,51,17,69): error CS0246: The type or namespace name 'ModuleSettingsBase' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\MyVsTestFormModuleBase.cs(17,43,17,59): error CS0246: The type or namespace name 'PortalModuleBase' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\View.ascx.cs(35,57,35,68): error CS0246: The type or namespace name 'IActionable' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\Settings.ascx.cs(48,30,48,42): error CS0115: 'Settings.LoadSettings()': no suitable method found to override 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\Settings.ascx.cs(79,30,79,44): error CS0115: 'Settings.UpdateSettings()': no suitable method found to override 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\View.ascx.cs(49,16,49,38): error CS0246: The type or namespace name 'ModuleActionCollection' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\Providers\DataProviders\SqlDataProvider\SqlDataProvider.cs(38,26,38,47): error CS0246: The type or namespace name 'ProviderConfiguration' could not be found (are you missing a using directive or an assembly reference?) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Also attached snap of my Visual Studio
Hi Erwin,
As suggested, I took the files present in the DNN site folder. Now it is displaying error related to higher version of target framework.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3274: The primary reference "DotNetNuke" could not be resolved because it was built against the ".NETFramework,Version=v4.7.2" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.5.1".
Please suggest how to resolve this.
The details of error displayed.
1>------ Build started: Project: MyVsTestForm, Configuration: Release Any CPU ------ 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3274: The primary reference "DotNetNuke" could not be resolved because it was built against the ".NETFramework,Version=v4.7.2" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.5.1". 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\Properties\AssemblyInfo.cs(34,32,34,44): warning CS7035: The specified version string does not conform to the recommended format - major.minor.build.revision 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\Components\FeatureController.cs(15,7,15,17): error CS0246: The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\Components\FeatureController.cs(16,7,16,17): error CS0246: The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\Data\DataProvider.cs(15,7,15,17): error CS0246: The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\Data\DataProvider.cs(16,7,16,17): error CS0246: The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\MyVsTestFormModuleBase.cs(13,7,13,17): error CS0246: The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\MyVsTestFormModuleSettingsBase.cs(13,7,13,17): error CS0246: The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\Edit.ascx.cs(15,7,15,17): error CS0246: The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\Providers\DataProviders\SqlDataProvider\SqlDataProvider.cs(14,7,14,17): error CS0246: The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\Providers\DataProviders\SqlDataProvider\SqlDataProvider.cs(15,7,15,17): error CS0246: The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\Settings.ascx.cs(14,7,14,17): error CS0246: The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\Settings.ascx.cs(15,7,15,17): error CS0246: The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\View.ascx.cs(14,7,14,17): error CS0246: The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\View.ascx.cs(15,7,15,17): error CS0246: The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\View.ascx.cs(16,7,16,17): error CS0246: The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\View.ascx.cs(17,7,17,17): error CS0246: The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\View.ascx.cs(18,7,18,17): error CS0246: The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\MyVsTestFormModuleSettingsBase.cs(17,51,17,69): error CS0246: The type or namespace name 'ModuleSettingsBase' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\MyVsTestFormModuleBase.cs(17,43,17,59): error CS0246: The type or namespace name 'PortalModuleBase' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\View.ascx.cs(35,57,35,68): error CS0246: The type or namespace name 'IActionable' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\Settings.ascx.cs(48,30,48,42): error CS0115: 'Settings.LoadSettings()': no suitable method found to override 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\Settings.ascx.cs(79,30,79,44): error CS0115: 'Settings.UpdateSettings()': no suitable method found to override 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\View.ascx.cs(49,16,49,38): error CS0246: The type or namespace name 'ModuleActionCollection' could not be found (are you missing a using directive or an assembly reference?) 1>E:\DNN_CMS\Src_Module\MyVsTestForm\MyVsTestForm\Providers\DataProviders\SqlDataProvider\SqlDataProvider.cs(38,26,38,47): error CS0246: The type or namespace name 'ProviderConfiguration' could not be found (are you missing a using directive or an assembly reference?) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
These Forums are dedicated to the discussion of DNN Platform.
For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:
Awesome! Simply post in the forums using the link below and we'll get you started.