Application.xaml 不属于解决方案中的任何项目

2024-04-17

我刚刚工作并尝试向我的项目添加资源。加载后出现以下错误。我今天早些时候对我的视觉工作室 VS Pro 2022 64x (17.3.5) 进行了更新,所以我不知道这是否是导致此问题的原因?我查看备份一个多月了,但我什至从未见过这个文件曾经存在过?我有点困惑有人遇到过这个问题或者知道如何解决吗?我确实运行了清理并重建,但没有帮助。谢谢!

=====================
10/5/2022 11:42:01 AM
Recoverable
Microsoft.VisualStudio.ProjectSystem.Query.QueryExecutionException: The file P:\Projects\MyPortal\MyPortal\Application.xaml is not part of any project in the solution so it cannot be opened.  Add the file to a project and try again. ---> System.ArgumentException: The file P:\Projects\MyPortal\MyPortal\Application.xaml is not part of any project in the solution so it cannot be opened.  Add the file to a project and try again.
   at Microsoft.VisualStudio.Shell.Design.Serialization.DocData..ctor(IServiceProvider provider, String fileName)
   at Microsoft.VisualStudio.ProjectSystem.VS.WPF.ApplicationXamlFileAccessor.<<TryGetApplicationXamlFileAsync>g__GetDocDataAsync|11_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.ProjectSystem.VS.WPF.ApplicationXamlFileAccessor.<TryGetApplicationXamlFileAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.ProjectSystem.VS.WPF.ApplicationXamlFileAccessor.<GetStartupUriAsync>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.ProjectSystem.Properties.WPFValueProvider.<GetPropertyValueAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.ProjectSystem.Properties.InterceptedProjectProperties.<GetUnevaluatedPropertyValueAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.ProjectSystem.PropertyPages.PageProperty.<GetUnevaluatedValueFromDataSourceAsync>d__41.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.ProjectSystem.VS.Query.UIPropertyValueDataProducer.<CreateUIPropertyValueValueAsync>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.ProjectSystem.VS.Query.UIPropertyValueDataProducer.<CreateUIPropertyValueValueAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.VisualStudio.ProjectSystem.VS.Query.UIPropertyValueDataProducer.<CreateUIPropertyValueValuesAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.ProjectSystem.VS.Query.QueryDataFromProviderStateProducerBase`1.<SendRequestAsync>d__0.MoveNext()
   --- End of inner exception stack trace ---
   at Microsoft.VisualStudio.ProjectSystem.Query.QueryExecution.QuerySubscription`1.<RunQueryOnceAsync>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.ProjectSystem.Query.QueryExecution.QuerySubscription`1.<>c__DisplayClass8_0.<<Start>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.PropertyPages.Designer.ProjectPropertyDataAccess.Observer.<InitializeAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.PropertyPages.Designer.ProjectPropertyDataAccess.Observer.<CreateAsync>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.PropertyPages.Designer.ProjectPropertiesEditor.<>c__DisplayClass0_0.<<-ctor>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.PropertyPages.Designer.AsyncLoadContent.<>c__DisplayClass0_0.<<Initialize>b__0>d.MoveNext()
===================

显然,在较新版本的 Visual Studio 2022 中,有一个标记设置为使用 WPF,这会导致在 WinForms 项目中找不到 Application.xaml。

为了解决这个问题,我打开了 .vbproj 文件并将 UseWPF 从 true 更改为 false,然后我能够再次打开我的项目属性。 ​

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Application.xaml 不属于解决方案中的任何项目 的相关文章

  • MySQL C++ 连接器未解决的依赖关系(VS 2015)

    我正在尝试在 Windows Visual Studio 2015 上编译 MySQL Connector C 我根据以下内容使用CMake生成了项目文件官方说明 https dev mysql com doc connector cpp
  • Visual Studio - 在哪里定义自定义路径宏?

    我刚刚打开了其他人的 Visual Studio 项目 在他们的构建属性中 他们有一些用于包含和 lib 目录的自定义路径宏 宏名称是这样的 MY WHATEVER INCLUDE DIR 我可以手动将每个宏替换为真实路径 但最好只使用宏
  • Azure Web 部署“发布失败”

    各位开发人员大家好 我目前正在努力解决最新的 Visual Studio 2017 Professional 版本 15 8 1 中的问题 自从更新到版本 15 8 以来 我无法通过 Web 部署发布任何 Azure Functions 每
  • 防止从 false 到指针的静默转换

    我有一个函数 void foo int bar 如果我像这样调用 foo Visual Studio 2012 现在将顺利编译且不会出现警告 int main foo false return 0 但是 如果我将 foo false 更改为
  • 如何进行Visual Studio格式字典初始化?

    所有 Visual Studio 也包括 2012 不格式化以下内容 messageProcessor new Dictionary
  • 无法使用数据源配置向导在 Web 项目中添加数据源

    Problem 我想将报告 rdlc 添加到我的 Web 项目中 我需要报表使用对象数据源 而不是直接连接到数据库 我的问题是 当我运行 报告向导 或向报告添加新数据集时 数据源配置向导 only允许我使用数据库 然而 在图书馆项目中数据源
  • 字符串到数组,按第三个字/列排序

    我有一个包含数字 单词和换行符的字符串 我将其拆分为一个数组 如果我跑Array Sort lines 它将按第 1 列对数组进行数字排序 Number 我怎样才能按第 3 列的字母顺序对数组进行排序 Color 注意 它们不是真正的列 只
  • 如何从 powershell 中设置 bash 的环境变量?

    使用powershell我该如何设置 https askubuntu com q 1205227 45156 the 环境 https stackoverflow com q 5327495 262852变量 这里 特别 https sta
  • 如何让 MSIX 应用安装程序在每次生成/发布期间输出正确的设置?

    问题 如何获取 MSIXappinstaller在每次构建 发布期间输出正确的设置 Context 这是一个后续问题启用侧面加载后 为什么 MSIX 不会在每次应用程序运行时自动检查更新 https stackoverflow com q
  • 发送WM_SETTEXT时如何避免EN_CHANGE通知?

    我有一个 CEdit 派生控件 当基本数据为空时 该控件显示字符串 N A 我最近添加了代码 以在控件获得焦点时清空控件 SetWindowText 并在用户离开焦点时将其设置回 N A SetWindowText N A 控空 唯一的问题
  • 在工作区中找不到文件

    我使用 Visual Studio 2010 professional 和 TFS 作为源代码控制 一切正常 早上我来打开我的解决方案 它以离线状态打开 我尝试上网 它说 Workspace for this solution could
  • 多个 Visual Studio 项目抱怨临时文件丢失,因此无法打开。错误代码 &H80070003

    我在终端服务器上运行 Visual Studio 2010 并且已经运行了一段时间 问题相对较少 今天早上 我启动了我的电脑 在英国的长周末期间 似乎出现了以下问题 我有很多项目 但不是我的所有项目 也不是给定解决方案中的所有项目 抱怨无法
  • 未定义条件编译符号

    我无法让 Visual Studio 按照我的预期运行 我创建了 2 个配置文件 一个定义了符号 FOO 另一个定义了符号 BAR 我有这个代码 static class MyClass if FOO public static strin
  • Visual Studio 2012 - 数据库发布向导已停止?

    我正在使用 VS 2012 和 SQL Server 2008 刚刚注意到服务器资源管理器中缺少 发布到提供商 选项 据此 数据库发布向导已停止使用 http forums asp net post 5122271 aspx http fo
  • 由于继承抽象类而禁用设计器?

    我有一个项目的解决方案 那个项目中有 40 或 50 种形式 我制作了 4 个基本形式 所有其他形式都可以继承 所有 4 个基本表单都继承 System Windows Forms Form 几乎 90 的形式继承了前 2 个基本形式之一
  • 这种没有推送寄存器的交换有多安全?

    我对汇编非常陌生 下面的代码应该通过两个不同的函数交换两个整数 首先使用swap c然后使用swap asm 但我怀疑 我是否需要push 我的意思是保存 汇编代码之前寄存器的每个值和pop稍后 就在返回之前 main 换句话说 如果我返回
  • TypeError [ERR_INVALID_ARG_TYPE]:“listener”参数必须是 Function 类型

    我这里有一个小问题 events js 200抛出新错误 ERR INVALID ARG TYPE listener Function listener 类型错误 ERR INVALID ARG TYPE 侦听器 参数必须是类型 功能 收到
  • 连接到 Visual Studio 中的构建过程

    我正在编写一个 Visual Studio 扩展 它允许编辑项目中特定类型的文件 该文件用作进一步自动代码生成的描述 类似于实体框架 我需要在构建项目之前执行代码生成 其中包含描述文件 代码生成算法 当前 放置在描述文件的编辑器内 有没有办
  • 如何在 Visual Studio 2010 中处理 TODO 注释?

    我希望 Visual Studio 列出开头包含 TODO 的所有行 通常在注释符号之后 注释符号可能会根据文件类型而变化 这些行可以在解决方案中的任何文本文件中找到 无论是 C VB F T SQL ASPX XAML 或只是 TXT 在
  • 根据所选单选按钮启用文本框

    我有一个单选按钮列表 其中列出了不同的业务类别 最后一个选项是Other类别 当用户选择Other类别 我希望能够启用一个文本框 用户可以输入更多信息来解释Other选择 目前 我正在尝试 If rblCategory SelectedIn

随机推荐