designer.cs没有显示在解决方案中 [英] designer.cs not showing in solution

查看:57
本文介绍了designer.cs没有显示在解决方案中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio Community 2015,需要查看我的一个Web窗体的designer.cs文件.但是,当我在解决方案资源管理器中展开aspx文件时,它没有显示.如何强制Visual Studio向我显示designer.cs文件?

I'm using Visual Studio Community 2015 and need to view the designer.cs file for one of my webforms. However, when I expand the aspx file in the solution explorer, it does not show up. How do I force Visual Studio to show me the designer.cs file?

这是我在解决方案资源管理器中看到的内容:

Here's what I see in Solution Explorer:

此外,我似乎无法手动编辑项目文件(.csproj),因为它无法显示包含代码的文件夹中的项目文件,所以它只能显示designer.cs文件.这是该文件夹的屏幕截图:

Also, I seem unable to edit the project file (.csproj) by hand so that it will show the designer.cs file because I can't find the project file in the folder containing the code. Here's a screenshot of that folder:

文件夹内容

推荐答案

上面注释中的Per Dave-看来您的项目被配置为网站而不是Web应用程序.我建议您通过创建一个新项目并重新添加文件,将您的项目转换为Web应用程序.您可以在 MSDN

Per Dave in the comments above - It appears that your project is configured as a web site instead of a web application. I would recommend that you convert your project to a web application by creating a new project and re-adding the files. You can read up on the differences between the two models here on MSDN

这篇关于designer.cs没有显示在解决方案中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆