Visual Studio 2017选项:对每个项目使用托管兼容模式 [英] Visual Studio 2017 Option: Use Managed Compatibility Mode per project

查看:637
本文介绍了Visual Studio 2017选项:对每个项目使用托管兼容模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从事两个不同的项目.一个是asp.net Web项目,另一个是arcmap.exe的插件.为了调试插件,必须设置选项使用托管的兼容模式",否则在启动应加载扩展程序的程序时会发生错误(请参见

I work on two different projects. One is an asp.net web project, the other an addin for an arcmap.exe. For debugging the addin the option "Use Managed Compatibility Mode" must be set, otherwise an error occurs when starting the programm that should load the extension (see Start ArcMap AddIn for .net 4.5). Starting the asp.net project needs a long time, so code editing during running is desired. But when "Use Managed Compatibility Mode" is enabled, code editing while debugging does not work.

所以到目前为止,对我来说解决方案是在加载项目后更改选项.是否有可能根据项目设置选项?

So the solution for me until now was to change the option after loading the project. Is there any possibility to have the option set on a projects basis?

推荐答案

目前的解决方案没有扩展.如切换到托管兼容性中所述在Visual Studio 2013模式下,可以手动在.csproj文件中添加配置:

The solution for now is without an extension. As described in Switching to Managed Compatibility Mode in Visual Studio 2013 it is possible to add a configuration in the .csproj file by hand:

<PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    ...
    <DebugEngines>{351668CC-8477-4fbf-BFE3-5F1006E4DB1F}</DebugEngines> <!-- add this line -->
    ...
</PropertyGroup>

必须对启动项目"进行此操作.设置项目的属性后,可以在设置-调试"中取消选中使用托管的兼容模式"选项.

This has to be done for the "Startup Project". After setting the property for the project, The option "Use Managed Compatibility Mode" can be unchecked in Settings - Debug.

这篇关于Visual Studio 2017选项:对每个项目使用托管兼容模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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