在IIS中启用代码约定 [英] Enabling Code Contracts in IIS

查看:64
本文介绍了在IIS中启用代码约定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在IIS环境中尝试代码合同,理想情况下我希望在App_Code目录中按需编译代码。 但是,我不确定在web.config文件的编译
节点中启用各种代码协定选项的正确方法。 这有可能吗? 或者我是否需要通过vcproj构建库并使用dll?

I'm experimenting with code contracts in an IIS environment, and ideally I'd like the code to be compiled on-demand in the App_Code directory.  However, I'm not sure about the right way to enable the various code contract options in the compilation node in the web.config file.  Is this even possible?  Or will I need to build the library via the vcproj and consume the dll?

推荐答案

我对编译按需的工作方式一无所知。如果使用msbuild编译并调用我们的.targets文件,那么我认为应该发生正确的事情。所以也许与通过vcproj构建它是一回事(希望
是csproj或vbproj,因为我们不支持C ++项目)。

I don't know anything about how the compiling on-demand works. If it is compiled using msbuild and our .targets files are invoked, then I would think the right thing should happen. So maybe that is the same thing as building it via the vcproj (hope that is csproj or vbproj since we don't support C++ projects).


这篇关于在IIS中启用代码约定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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