c# 编码规范3
来源:互联网 发布:小学生计算机编程 编辑:程序博客网 时间:2024/06/05 06:24
Project Settings and Project Structure
Always build your projects with Warning Level 4 (see Figure E-1).
Treat warnings as errors in the Release build (note that this is not the default of Visual Studio). Although it is optional, this standard recommends treating warnings as errors in Debug builds as well.
Avoid suppressing specific compiler warnings.
Always explicitly state your supported runtime versions in the application configuration file:
<?xml version="1.0"?>
<configuration>
<startup>
<supportedRuntime version="v2.0.5500.0"/>
<supportedRuntime version="v1.1.5000.0"/>
</startup>
</configuration>Figure E-1. The project Build pane
Avoid explicit custom version redirection and binding to CLR assemblies.
Avoid explicit preprocessor definitions (#define). Use the project settings for defining conditional compilation constants.
Do not put any logic inside AssemblyInfo.cs.
Do not put any assembly attributes in any file other than AssemblyInfo.cs.
Populate all fields in AssemblyInfo.cs, such as company name, description, and copyright notice.
All assembly references should use relative paths.
Disallow cyclic references between assemblies.
Avoid multi-module assemblies.
Avoid tampering with exception handling using the Exception window (Debug Exceptions).
Strive to use uniform version numbers on all assemblies and clients in the same logical application (typically, a solution). Use the SolutionInfo.cs technique from Chapter 5 to automate.
Name your Visual Studio 2005 application configuration file App.config, and include it in the project.
Modify the Visual Studio 2005 default project structure to your project's standard layout, and apply a uniform structure for project folders and files.
A release build should contain debug symbols (see Figure E-2).
Figure E-2. The Advanced Build Settings dialog
Always sign your assemblies, including the client applications.
Use password-protected keys.
- c# 编码规范3
- C# 编码规范
- C#编码规范
- C#编码规范
- C#编码规范
- C#程序编码规范
- C#程序编码规范
- C# 编码规范 zz
- C# 编码规范
- C#程序编码规范
- C#程序编码规范
- C#编码规范
- C# 编码规范
- C#编码规范
- C#编码规范
- C#程序编码规范
- C#程序编码规范
- C#程序编码规范
- 常用的书
- C# 编码规范1
- C# 编码规范2
- 一个移动文件的Windows服务的制作(主篇)
- 过年了
- c# 编码规范3
- c# 编码规范4
- vb6.0 还是用企业版好
- Struts2 之使用通配符简化配置
- vb制作简单的多窗口浏览器(8)--设置功能
- VS 2005 and VS 2008 Tip: 自动生成Property
- Java和PHP在Web开发方面的比较
- 事件与委托趣谈
- 论精力充沛与事业成功