的Visual Studio 2013 - 项目显示为"其他文件"文件、项目、Studio、Visual

2023-09-03 07:23:44 作者:临时男友

这是一个奇怪的。我有我的解决方案中的一个C#类库项目。如果我这个项目中打开一个的.cs 文件,在项目在code编辑器显示下拉它属于「杂项文件

This is a weird one. I have a C# Class Library project within my solution. If I open a .cs file within this project, the Project drop-down on the code editor shows that it belongs to 'Miscellaneous Files'.

其他症状:如果我去该项目的性质,看看大会信息,所有的值都为空,尽管现有的的AssemblyInfo.cs 文件。

Other symptoms: if I go to the properties of the project and look at Assembly Information, all values are blank, despite the values existing in the AssemblyInfo.cs file.

这两者都是烦人的,但问题是,

Both of these are annoying, but the problem is that

在我没有得到智能感知上的任何文件的项目 在我似乎无法步骤通过它在调试器(它告诉我,该文件不属于解决方案,因此不能进行调试)。

我曾尝试:

通过 .csproj的文件梳理和比较,以他人的溶液(无欢) 重新创建 .csproj的文件并覆盖旧的(工作,直到我合并的支进后备箱,那么问题重新出现) 在敲我的头在键盘上(头痛) Combing through the .csproj file and comparing to others in the solution (no joy) Re-creating the .csproj file and overwriting the old one (worked until I merged the branch into trunk, then the problem re-appeared) Banging my head on the keyboard (headache)

谷歌已经变成了什么。没有人有任何想法,这是怎么回事呢?

Google has turned up nothing. Does anyone have any ideas as to what's going on here?

推荐答案

我有完全一样的问题,事实证明,一些在我的项目中的XAML文件被设置为使用动作XamlAppDef建设(即建设它作为一个XAML工作流),当我把它回编译,我的项目下拉瞬间从(杂项文件中去),以正确的项目。

I had exactly the same problem and it turned out that some of the XAML files in my project were set to be built using the action 'XamlAppDef' (ie build it as a XAML Workflow) and when I turned it back to 'Compile', my Project dropdown instantly went from (Miscellaneous files) to the correct project.