zoukankan      html  css  js  c++  java
  • Visual Studio 2017设置版权的方法

    1.VisualStudio2017设置版权  

    在团队开发或者公司开发中,我们一般都喜欢给自己所创建的类或者接口以及其它模板设置版权说明,但是每个类一个一个的去加又是非常的费劲,所以一般情况下我们都是设置模板来实现它,当您在VS中创建类或者接口等的时候自动将这些注释添加到您所在的类或者接口中。  

    我简单总结了一下给VS2017添加版权的说明  

    1.首先找到你的安装路径,如果你忘记了你所在的安装路径,不要紧,可以使用如下地址找到:找到VS图标,右键属性:弹出如图所示:

    找到如图红线所画的地址,复制,去掉最后devenv.exe和双引号,将路径拷贝之后打开我的电脑拷贝到路径地址,打开如图所示:

     3.继续往下查找,路径如下:(D:Program Files (x86)Microsoft Visual Studio2017EnterpriseCommon7IDEItemTemplatesCSharpCode2052

     4分别.打开Class和Interface文件夹,将下面的Class.cs和Interface.cs文件打开,将版权拷贝到里面,单击保存,配置完成,重新打开VS即可

      注:X未自定义输入

    Class.cs

    #region << 版 本 注 释 >>

    /****************************************************************************
    *Copyright (c) $year$ XXXXXX All Rights Reserved.
    *CLR版本: $clrversion$
    *机器名称:$machinename$
    *公司名称:XXXXXX
    *命名空间:$rootnamespace$
    *文件名: $safeitemrootname$
    *版本号: V1.0.0.0
    *唯一标识:$guid10$
    *当前的用户域:$userdomain$
    *创建人: XXX
    *电子邮箱:
    *创建时间:$time$
    *描述:
    *============================================================================
    *修改标记
    *修改时间:$time$
    *修改人: XXXX
    *版本号: V1.0.0.0
    *描述:
    *****************************************************************************/
    #endregion

    using System;
    using System.Collections.Generic;
    $if$ ($targetframeworkversion$ >= 3.5)using System.Linq;
    $endif$using System.Text;
    $if$ ($targetframeworkversion$ >= 4.5)using System.Threading.Tasks;
    $endif$
    namespace $rootnamespace$
    {
    class $safeitemrootname$
    {
    }
    }

    Interface.cs

    #region << 版 本 注 释 >>
    /****************************************************************************
    *Copyright (c) $year$ XXXXXX All Rights Reserved.
    *CLR版本: $clrversion$
    *机器名称:$machinename$
    *公司名称:XXXXXX
    *命名空间:$rootnamespace$
    *文件名: $safeitemrootname$
    *版本号: V1.0.0.0
    *唯一标识:$guid10$
    *当前的用户域:$userdomain$
    *创建人: XXXXXX
    *电子邮箱:
    *创建时间:$time$
    *描述:
    *============================================================================
    *修改标记
    *修改时间:$time$
    *修改人: XXXXXX
    *版本号: V1.0.0.0
    *描述:
    *****************************************************************************/
    #endregion

    using System;
    using System.Collections.Generic;
    $if$ ($targetframeworkversion$ >= 3.5)using System.Linq;
    $endif$using System.Text;
    $if$ ($targetframeworkversion$ >= 4.5)using System.Threading.Tasks;
    $endif$
    namespace $rootnamespace$
    {
    interface $safeitemrootname$
    {
    }
    }

  • 相关阅读:
    作业任务03
    作业任务02
    作业任务01
    Shell脚本编程01-shell编程与规范与变量
    Linux网络服务05-----DNS域名解析服务(二)
    Linux网络服务05-----DNS域名解析服务(一)
    Linux网络服务13----PXE 高效能批量网络装机
    网络基础知识
    Nginx 入门
    shell 脚本须知
  • 原文地址:https://www.cnblogs.com/m653458252/p/9008092.html
Copyright © 2011-2022 走看看