gpt4 book ai didi

visual-studio-2010 - 立即窗口, "The expression cannot be evaluated...."

转载 作者:行者123 更新时间:2023-12-03 07:35:04 24 4
gpt4 key购买 nike

当我尝试在设计时计算立即窗口中的表达式时,出现错误:

The expression cannot be evaluated while in design mode.

如果我编译 ASP.NET 项目并尝试在 Debug模式下运行它,我会收到另一个错误:

The expression cannot be evaluated while in run mode.

为什么我会收到这些错误?我过去曾使用过“立即窗口”,即使在设计模式下它也能正常工作。

最佳答案

假设您在立即窗口中没有缺少 > 运算符,如果您尝试在多项目解决方案甚至是一个项目中的设计时计算表达式,则可能会出现问题网络项目。

根据MSDN :

If you are attempting to evaluate a function in a project that is not the startup project for the solution and you receive an error, try selecting the project in Solution Explorer and attempt the evaluation again.

另外:

You cannot use design time expression evaluation in project types that require starting up an execution environment, including Visual Studio Tools for Office projects, Web projects, Smart Device projects, and SQL projects.

关于visual-studio-2010 - 立即窗口, "The expression cannot be evaluated....",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5867344/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com