问题
I have successfully installed DNN 8 and all configuration. i am also referring video to develop module in visual studio. https://www.youtube.com/watch?v=AKCYRPuoXF4
when i am trying to build the project then error comes like:
Error 17 The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?) C:\websites\dnndev.me\DesktopModules\MyDNNModule\MyDNNModuleModuleSettingsBase.cs 13 7 MyDNNModule
Please help to solve that. thank you in advance.
回答1:
Make sure to add a Reference to dotnetnuke.dll in the c:\websites\dnndev.me\bin folder
I honestly haven't done anything with DNN 8 CTP yet, I would stick with 7.4.1 until 8 is official released.
回答2:
Working with DNN8, sometimes I get a set of errors with message
The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?)
, probably 10 or 15 of them, and all located on top of one ascx file. (My dotnetnuke.dll is correctly placed in DNN's bin folder). Taking a better look (scroll down!), I can see that - except them - there are some more error messages (maybe just one of them), and that those additional errors are perfectly clear and logical. So I correct my source code in order to avoid those additional messages, and when I do that - those problematic messages also disappear!
回答3:
In my case it took me a while to find the solution to this problem, since it only got triggered when I made a change to the View.ascx
file.
You need the Visual Studio project to target framework to 4.5 instead of 4.5.1.
I got this solution from here.
来源:https://stackoverflow.com/questions/31747596/dotnetnuke-8-module-development-error-in-visual-studio-2013