VS 2019两个编译问题 [英] VS 2019 two compilation questions

查看:225
本文介绍了VS 2019两个编译问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Cuestion 1.-在VS 2017中,我有一个名为Common的课程,其中包括其他课程的各种有用功能。



如果我提取一个这些函数并将它包含在一个新类中,当我尝试编译类Common时,它告诉我我提取的类不存在。

提取的类无法编译如果我不先编译Common类。解决方案?



Cuestion 2.-在VS 2017我有一个不同dll的项目。在编译时我希望所有的dll都包含在编译中作为单个dll。



我尝试过:



全部在互联网上所有在互联网上所有在互联网

Cuestion 1.- In VS 2017 I have a class called "Common" that includes various useful functions to the rest of the classes.

If I extract one of the functions and include it in a new class, when I try to compile the class "Common" it tells me that the class that I have extracted does not exist.
The extracted class can not be compiled if I do not compile the "Common" class first. Solution?

Cuestion 2.- In VS 2017 I have a project with different dlls. When compiling I want all the dlls to be included in the compiled as a single dll.

What I have tried:

All in the internet All in the internet All in the internet

推荐答案

问题1:这将取决于哪里这些类是:如果你在项目之间移动,那么是的,你需要在修改后的程序集可以在另一个程序中使用之前编译项目。想想看:如果你同时为两个程序集编写代码,你不需要中途的部分代码。

所以将类添加到程序集A,编译它,然后编辑程序集B并且它将使用修订版本。

问题2:这不是它的工作方式:DLL是单独的程序集,并且是单独的文件,因此它们只能与一个副本一起使用安装在机器上并由许多其他应用程序共享。
Question 1: That's going to depend on where these classes are: if you are moving between projects then yes, you will need to compile projects before the revised assembly can be used in a different one. Think about it: if you are writing code for two assemblies at the same time, you don't want partial code halfway through.
So add you class to Assembly A, compile it, then edit Assembly B and it will use the revised version.
Question 2: That's not how it's meant to work: the DLLs are separate assemblies, and are intended to be separate files so that they can be used with just one copy installed on the machine and shared by many other apps.


这篇关于VS 2019两个编译问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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