The file designer.cs is incorrectly nested in the Solution Explorer and cannot be moved

廉价感情. 提交于 2019-12-13 05:21:52

问题


I am using DotNetNuke 9.0.01. Here I created a module in Visual Studio and installed it in the DNN extensions. I didn't use the installation file but the one with the source code. Unfortunately now the file View.ascx.designer.cs is not below the View.ascx. It is outside the code-behind.

This also leads to the problem that intellisense doesn't know the attributes and therefore I can't use them. This in turn leads to the fact that I cannot compile. So it's not just a display problem.

I have tried to exclude the files from the project and include them again. But that doesn't work. I have also tried to modify the .csproj file. But that doesn't work either. I have also looked up at the properties but didn't find a solution.

I expected the datastructure to be like that:

>View.ascx
>>View.ascx.cs
>>View.ascx.designer.cs

But it is like that:

>View.ascx
>>View.ascx.cs
>View.ascx.designer.cs

回答1:


I've solved the problem by myself. So basically I have to say that I use DotNetNuke (DNN) 9.0.01 as I already wrote in my question. For this I created a new module via Visual Studio and then installed this module in the DotNetNuke web interface. It is important to use the Install.zip and not the source.zip. Furthermore the location of the module is very important. This must be located in the folder "DesktopModules". Already when creating the module! If you want to edit the module now, you have to open in Visual Studio the solution of the module and not the whole DotNetNuke project. That was my mistake. If you open the solution of the module, all files are nested correctly. If you now make changes to the module and rebuild the module, all changes in the entire DotNetNuke project will be applied.

Thanks anyway to everyone who tried to help me.



来源:https://stackoverflow.com/questions/56921116/the-file-designer-cs-is-incorrectly-nested-in-the-solution-explorer-and-cannot-b

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!