如何修复Specflow“<<未知项目>" Visual Studio中的问题 [英] How do you fix Specflow "<unknown project>" issue in Visual Studio

查看:140
本文介绍了如何修复Specflow“<<未知项目>" Visual Studio中的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在从事一个项目,发现我的Specflow场景之一需要更新.

I have been working on a project and noticed that one of my Specflow Scenarios needed updating.

我通过将Specflow场景分为两个不同的场景(一个用于无效测试,一个用于有效测试)来更新了该场景.

I updated the Specflow Scenario by splitting it into two different scenarios (one for an invalid test and one for a valid test).

此后,我重新生成了feature.cs文件,清理并重建了解决方案.

After this I then regenerated the feature.cs file, cleaned and rebuilt the solution.

(我正在使用Microsoft Visual Studio Enterprise 2019版本16.4.1)

(I am using Microsoft Visual Studio Enterprise 2019 Version 16.4.1)

这是未知项目"出现在我的测试资源管理器中的时候,它包含一项测试...我已更改的一项.它不能运行,但是也不能删除.

This is when the "unknown project" appeared in my Test Explorer that consists of one test... the one I have changed. It cannot be run, however it cannot be removed either.

这是我所看到的:

至少在短时间内,我唯一能够解决此问题的方法是删除整个解决方案,然后再次将其拉回,这是不理想的.

The only way I have been able to get rid of this, for a brief period at least, is by deleting my entire solution and then pulling it back down again, which is less than ideal.

以下是我尝试解决此问题的列表;

Here is a list of what I have tried to resolve this;

  • 将解决方案中的所有Nuget软件包更新为最新版本.
  • 重新启动测试浏览器
  • 重新启动Visual Studios
  • 已删除feature.cs文件并重新生成
  • 清洁和重建的解决方案
  • 更新的Visual Studios(这似乎使情况经常出现)
  • 删除解决方案并将其拉低(直到我必须更改现有测试然后重新启动Visual Studio为止,此方法才有效)

以前有没有人看过此书,或者知道如何解决此问题?

推荐答案

因此,经过与我的团队一天的努力,我们终于解决了该问题.

So after a day of trying to figure this out with my team we have finally resolved the issue.

此问题是由缓存的(隐藏).vs文件引起的.删除并重新启动解决方案时,未知项目消失了.

The issue was caused by the cached (hidden) .vs file. When deleting this and restarting the solution the unknown project was gone.

这篇关于如何修复Specflow“<<未知项目>" Visual Studio中的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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