测试项目仅在一台机器上的 VS2008 中显示为文件夹

发布于 2024-07-26 07:18:05 字数 680 浏览 2 评论 0原文

我在笔记本电脑上创建了一些项目,它们在那里运行得很好。 我刚刚将它们添加到我家用电脑上的 Subversion 存储库中,并在该电脑上的 VS 中加载,却发现测试项目没有显示; 它们仅显示为文件夹图标,您在根目录下看不到任何内容。 文件夹图标旁边有一个展开图标,但单击它不会执行任何操作。

有两种解决方案刚刚发生过这种情况。 第一个是类库,第二个是 ASP.NET MVC 应用程序。 他们都使用MSTest,第一个也使用Rhino Mocks,第二个有MVC参考等。

我以前在PC上有VS2008 Standard,但现在安装了Professional。

我确实认为在提交/从颠覆中检索时有些东西丢失/损坏了,但是在记事本中查看项目文件等,一切看起来都很好。

另一个奇怪的事情是,我有另外一个 MVC 解决方案,它也发生了同样的情况(从笔记本电脑提交到 svn,在 PC 上打开),其中测试项目运行良好。 它再次使用 Rhino Mocks,但使用 NUnit 而不是 MSTest。 因此我想知道这是否与 MSTest 有关。 该引用是 C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies 中的 dll,在 PC 上看起来很好,即使引用存在一些问题,您也不会期望出现这种行为。

对于可能导致这种情况的原因有什么想法吗?

I have some projects that I created on my laptop, and they work fine there. I have just added them to the Subversion repository on my home PC, and loaded in VS on that PC only to find that the test projects do not display; they just show as a folder icon, and you can't see anything under the root. There is an expand icon next to the folder icon but clicking it does nothing.

There are 2 solutions this has just happened with. The first is a class library, the second an ASP.NET MVC application. They both use MSTest, the first uses Rhino Mocks also, and the second has MVC references etc.

I did previously have VS2008 Standard on the PC, but have now installed Professional.

I did consider that something had gone missing/ got corrupted in the commit/ retrieve from subversion, but looking at the project files etc in notepad it all looks fine.

Another odd thing is that I have 1 other MVC solution which has had the same happen to it (commit to svn from laptop, open on PC), where the test project is working fine. It uses Rhino Mocks again, but NUnit instead of MSTest. I'm therefore wondering if this is something related to MSTest. The reference is to a dll in C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies and that looks fine on the PC, and even if there was some problem with the reference you wouldn't expect this behaviour.

Any ideas for what could be causing this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

极度宠爱 2024-08-02 07:18:05

发现并解决了问题,现在发布问题感觉很傻,但也许其他人会发现这很有用,或者可以解释发生这种情况的原因;

通过将其添加到项目文件的开头来修复;

<?xml version="1.0" encoding="utf-8"?>

它位于正在运行的项目文件的开头,而不是那些不起作用的项目文件的开头。

致力于 svn 并在笔记本电脑上更新,并且仍然可以在那里工作,所以工作完成了。 不明白为什么这种情况发生在笔记本电脑上并在那里工作,一定与创建测试项目的方式有关,它们是通过 Visual Studio 以各种方式完成的,但我不记得哪些是以哪种方式完成的

Found and fixed the problem, feel silly for posting question now but maybe someone else will find this useful, or can explain the reason for this happening;

Fixed by adding this to the start of the project files;

<?xml version="1.0" encoding="utf-8"?>

Which was at the start of the project file that was working, but not the ones that weren't.

Committed to svn and updated on laptop and still works there, so job done. Don't understand why this happened on laptop and worked there, must have been something to do with the way the test projects were created, they were done in various ways through Visual Studio, but I can't remember which were done in which way

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文