简体   繁体   English

Visual Studio 2010多项目解决方案添加类

[英]Visual Studio 2010 Multi Project Solution Add class

I'm a rookie to this sort of thing so please bear with me. 我是这种菜鸟的新秀,所以请多多包涵。 I have a Visual Studio 2010 solution that is made up of 4 different projects (Windows app). 我有一个由4个不同项目(Windows应用程序)组成的Visual Studio 2010解决方案。

All of the dependencies are set up so they compile in the proper order when you build. 所有依赖项均已设置,因此在构建时它们会以正确的顺序进行编译。

I just added a new class to one of the projects. 我刚刚向其中一个项目添加了新课程。 I need to access this class from one of the other projects, but for some reason my new class is invisible to the other projects within the solution. 我需要从其他项目之一访问该类,但是由于某种原因,我的新类对于解决方案中的其他项目是不可见的。 All of the other classes in the project are visible to other projects. 项目中的所有其他类对其他项目可见。 My new class is the only one that is not. 我的新班级不是唯一的一堂课。

When you add a new class in a scenario such as mine, is there something else you need to do other than add the file with the class and then click build? 当您在诸如我的场景中添加新类时,除了将文件添加到类中然后单击“生成”之外,您还需要做其他事情吗?

Got it. 得到它了。

It seems as if the secondary projects were set to go to "Release" and they were compiling to "Release", but my Main Project was looking for them in "Debug" 似乎辅助项目设置为“ Release”,并且正在编译为“ Release”,但是我的主项目正在“ Debug”中寻找它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM