1

有什么办法可以防止 Resharper 插入的文件头被双重注释。

我正在使用默认文件头模板并在代码清理中打开插入文件头。

(Resharper 版本 7.1.2)

// #region Copyright © 2013 xxx Systems, Incorporated
// //
// // All rights are reserved. Reproduction or transmission in whole or in part, in
// // any form or by any means, electronic, mechanical or otherwise, is prohibited
// // without the prior written consent of the copyright owner.
// //
// // Filename: xxx.cs
// // Date:     27/02/2013
// // Author:   xxx
// // 
// #endregion

这是模板:

#region Copyright © $CURRENT_YEAR$ xxx Systems, Incorporated
//
// All rights are reserved. Reproduction or transmission in whole or in part, in
// any form or by any means, electronic, mechanical or otherwise, is prohibited
// without the prior written consent of the copyright owner.
//
// Filename: $FILENAME$
// Date:     $CURRENT_DAY$/$CURRENT_MONTH$/$CURRENT_YEAR$
// Author:   $USER_LOGIN$
// 
#endregion
4

1 回答 1

6

您应该创建不带 // 的模板,它应该只包含

All rights are reserved. Reproduction or transmission in whole or in part,
any form or by any means, electronic, mechanical or otherwise, is prohibited
without the prior written consent of the copyright owner.

Filename: $FILENAME$
Date:     $CURRENT_DAY$/$CURRENT_MONTH$/$CURRENT_YEAR$
Author:   $USER_LOGIN$

然后在“将文件头包含在带有名称的区域”字段中(就在文件模板下方)你应该写

Copyright © $CURRENT_YEAR$ xxx Systems, Incorporated
于 2013-02-28T00:34:20.367 回答