复制文件至指定目录
copy "$(ProjectDir)gdetgenv.ini" "$(TargetDir)"
copy "$(TargetFileName)" "$(TargetDir)\..\..\..\发布\" 

网站类型项目使用IIS设置调试

1.获取项目代码后,不要着急打开解决方案,在IIS上配置项目。
2.打开解决方案,如果项目名称,显示项目名称为:localhost:xxx则说明成功
3.若第二步失败,则打开解决方案,网站项目显示路径,此时在解决方案上点击右键,添加现有网站,在弹出的窗口左侧,选择本地IIS,删除IIS Express下的所有网站。
4 重新打开解决方案即可。

利用正则表达统计代码行数(免安装插件)

按CTRL+SHIFT+F (Find in files),勾上支持正则表达式,然后输入搜索内容:

^:b*[^:b#/]+.*$#开头和/开头或者空行都不计入代码量。如果需要只统计代码文件的代码量,可以选择查找文件的类型,比如什么*.xml, *.resx….可以不检查,只查*.cs,*.c,*.h…

搜索出来以后最后一行就是代码行数了。

 移除代码空行

^\s*\n 使用该正则表达式 进行查找,可以查找到所有换行,可以直接替换为空,这样就能移除代码的空行

 VS 使用类模版添加版权信息

创建类的模板文件
路径在:C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\ItemTemplates\CSharp\Code\2052\Class
博客园提供模板 http://www.cnblogs.com/betterchaner/archive/2013/02/17/2914611.html
/* ==============================================================================
   * 类名称:$safeitemrootname$
   * 类描述:
   * 创建人:$username$
   * 创建时间:$time$
   * 修改人:
   * 修改时间:
   * 修改备注:
   * @version 1.0
   * ==============================================================================*/
 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$
 {
     /// <summary>
     /// $safeitemrootname$
     /// </summary>
     public class $safeitemrootname$
     {
     }
 }
   
参数  说明 

clrversion 公共语言运行库 (CLR) 的当前版本。
itemname 用户在添加新项对话框中提供的名称。
machinename 当前的计算机名称(例如,Computer01)。
projectname 用户在新建项目对话框中提供的名称。
registeredorganization HKLM\Software\Microsoft\Windows NT\CurrentVersion\RegisteredOrganization 中的注册表项值。
rootnamespace 当前项目的根命名空间。此参数用于替换正向项目中添加的项中的命名空间。
safeitemname 用户在“添加新项”对话框中提供的名称,名称中移除了所有不安全的字符和空格。
safeprojectname 用户在“新建项目”对话框中提供的名称,名称中移除了所有不安全的字符和空格。
time 以 DD/MM/YYYY 00:00:00 格式表示的当前时间。
userdomain 当前的用户域。
username 当前的用户名。
year 以 YYYY 格式表示的当前年份。

修改后的模板
/* ==============================================================================
   * 文 件 名:$itemname$
   * 功能描述:
   * Copyright (c) 2012 武汉经纬视通科技有限公司
   * 创 建 人: $username$
   * 创建时间: $time$
   * 修 改 人: 
   * 修改时间: 
   * 修改描述: 
   * 版    本: V1.0.0.001
   * ==============================================================================*/
 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$
 {
     /// <summary>
     /// $safeitemrootname$
     /// </summary>
     public class $safeitemrootname$
     {
     }
 }
类模版

相关文章:

  • 2022-12-23
猜你喜欢
  • 2021-11-18
  • 2022-02-28
  • 2021-05-20
  • 2021-06-30
  • 2021-08-26
  • 2021-04-30
相关资源
相似解决方案