Visual Studio C# - 我的代码是灰色的吗? [英] Visual studio C# - MY CODE IS GREY?
本文介绍了Visual Studio C# - 我的代码是灰色的吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,所以突然我的C#代码是灰色的,我不知道为什么,它不会说这是一个错误。当我运行我的应用程序时,它似乎也没有工作。我的代码与我的电脑不兼容吗?我的电脑是32位,
我尝试过:
我尝试谷歌并运行但没有找到解决方案。
解决方案
检查代码是否在条件排除代码的#if部分内。看看 #if(C#参考) [ ^ ]
今天升级VS后,我的一位同事经历了类似的事情,原来他的项目或解决方案文件已被更改, Program.cs 文件被排除在外!
Hello guys, so suddenly my C# code is grey and I dont know why, it wont say it is a error though. When I run my Application it doesnt seem to work either. Is my code not compatible with my computer? My computer is 32-bit,
What I have tried:
I tried to Google it and run it but didnt find a solution.
解决方案
Check that the code isn't inside #if section where the condition excludes the code. Have a look at #if (C# Reference)[^]
After upgrading VS today a colleague of mine experienced something similar, it turned out his project or solution file had been changed and the Program.cs file was excluded !
这篇关于Visual Studio C# - 我的代码是灰色的吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文