在VS 2017中调试/构建应用程序 [英] Debugging / Build application in VS 2017

查看:123
本文介绍了在VS 2017中调试/构建应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我希望我能解释清楚。

我刚开始使用VS 2017,之后我使用了VS 2015在VS 2015中,我有一个包含2个项目的解决方案,只有一个用于调试和设置(安装程序项目)。如果我查看引用,有一些文件,如system.core,system.data,Microsoft.Sqlserver.smo
等。如果我查看我的设置(安装程序项目),我看到检测到的依赖项中的相同文件夹。但是在VS2017中,我看到了我的项目中的相同引用,但是在安装项目的检测到的依赖项文件夹中有更多文件。像Microsoft.visualstudio.utilities.dll,
Microsoft.visualstudio.Validation.dll,Microsoft.visualstudio.Text.Data.dll等等。在调试我的项目时,所有这些文件(.dll)都被复制到我的调试目录中。我需要这些文件,还是在VS2017中有所改变?我是否必须在调试或构建选项中更改
的内容?

I just started with VS 2017, before I used VS 2015. In VS 2015 I had a solution with 2 projects, just one for debugging and a setup (installer project). If I look at the references, there are some files like system.core, system.data, Microsoft.Sqlserver.smo etc. If I look in my setup (installer project) I see the same files in the detected dependencies folder. But in VS2017 I see, the same references in my project but  a lot more files in the detected dependencies folder of the setup project. Like Microsoft.visualstudio.utilities.dll, Microsoft.visualstudio.Validation.dll, Microsoft.visualstudio.Text.Data.dll and a lot more. And while debugging my project, all those files (.dll's) are copied to my debug directory. Do I need those files, or is something changed in VS2017? Do I have to change something in the Debug or Build options?

问候,

标记

推荐答案

嗨Mark,

>>只需一个用于调试和设置(安装程序项目)。

>>just one for debugging and a setup (installer project).

你是如何创建这个安装项目的,点击一次或其他?

How did you create this setup project, click-once or others?

我的理解是即使一个项目,两个项目在VS2015中也能正常工作参考另一个。

My understanding is that two projects work normally in VS2015 even if one project refer to another one.

但现在您将此解决方案更新为VS2017版本,该版本具有不同的程序集(版本或其他)参考。我是对的吗?

But now you will update this solution to the VS2017 version which has different assemblies(version or others) reference. Am I right?

不是真正的设置专家,但我可以提供一些我知道的建议或有用的信息:)

Not the real setup expert, but I could provide some suggestions or useful information what I know:)

一些dll文件是与.NET Framework版本相关,但每个VS版本都有自己的.NET Framework版本。就像VS2010使用.NET 4.0一样,VS2012使用.NET 4.5等等。

Some dll files were related to the .NET Framework version, but every VS version has his own matched .NET Framework version. Like the VS2010 uses the .NET 4.0, VS2012 use the .NET 4.5 and so on.

因此,如果您打开具有更高VS版本的旧VS版本项目,通常会更新项目例如,VS2017将使用更高的.net框架来更新您的项目,因此某些dll文件已更新到VS2017(.NET Framework 4.6.1),
然后您可以正常调试或构建您的应用程序。

So if you open the old VS version project with higher VS version, generally it would update the project, for example, the VS2017 will use the higher .net framework to update your project, so certain dll files were updated to the VS2017(.NET Framework 4.6.1), and then you could debug or build your app normally.

但即使大多数应用程序正常运行,并非所有项目都兼容,因此可能存在风险,通常我会在更新项目之前进行备份,然后再次检查。  您可以查看输出或错误列表以获取更多信息。

But not all projects are compatible even if most apps work normally, so maybe it is a risk, generally I will take a backup before I update the project, check it again. You could check the output or error list to get more information.

https://www.visualstudio.com/en-us/productinfo/vs2017-compatibility-vs

当然,如果该项目在VS2017中兼容,我认为您还可以在项目属性中更改.NET Framework版本。

Of course, if the project was compatible in VS2017, I think you could also change the .NET Framework version in your project property.

>>&nbs p;在调试我的项目时,所有这些文件(.dll)都被复制到我的调试目录中。我需要这些文件,还是在VS2017中有所改变?我是否必须在调试或构建选项中更改某些内容?

>> And while debugging my project, all those files (.dll's) are copied to my debug directory. Do I need those files, or is something changed in VS2017? Do I have to change something in the Debug or Build options?

根据上述建议,如果项目在不同的VS版本中兼容,则不会影响结果。实际上它与参考文件的复制本地属性有关,并且此功能是从VS2015添加的。

Based on above suggestion, it would not impact the result if the project was compatible during different VS version. Actually it would be related to the copy local property for the reference files, and this feature was added from VS2015.

https://connect.microsoft.com/VisualStudio/feedback/details/ 1572417 / the-default-setting-for-local-copy-of-references-is-now-true

当然,如果可能的话,你可以测试一下退一步后,如果安装项目有任何问题,请告诉我如何创建安装应用程序,也许我可以为您提供更合适的安装项目论坛。

Of course, if possible, you could test it after you take a back, if the setup project has any issue, please tell me how you create the setup app, maybe I could provide you a more appropriate setup project forum.

如果我有误解了这个问题,请随时告诉我。

If I have misunderstood this issue, please feel free to let me know.

此致,

杰克


这篇关于在VS 2017中调试/构建应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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