我使用 copyprojectDll.ps1 powershell。
我的文件夹结构如下
- 类库
第三方
网站/Bin
复制projectDll.ps1
网站.sln
ClassLibraries 是我的项目 DAL 的代码类。
网站项目仅包含 web 文件、aspx、aspx.cs ..
第三方是必需的库,AjaxToolkit 等。
我编译 ClassLibraries.sln
我运行 CopyprojectDll.ps1
之后我使用 Website.sln。
示例 powershell 文件如下。
$文件夹 = @();
$folders +="IB.Security"
$folders +="ClassLibraries/Core.Classes"
函数 CopyDllsToWebBin($dll_files)
{
if ($dll_files -eq $null)
{
返回;
}
$targetfolder = "./Kod/bin/"
foreach($dll in $dll_files)
{
copy-item $dll.FullName -destination "$targetfolder" -force #-Verbose
}
}
函数 CopyDllsToThirdParty($dll_files)
{
$targetfolder = "./ThirdParty/"
foreach($dll in $dll_files)
{
copy-item $dll.FullName -destination "$targetfolder" -force #-Verbose
}
}
$dll_output_folder = "/bin/debug";
foreach($folders 中的$folder)
{
$dll_files = Get-ChildItem -Path $folder$dll_output_folder -include *.dll -Recurse |排序对象名称
CopyDllsToWebBin($dll_files)
$dll_files = Get-ChildItem -Path $folder$dll_output_folder -include *.pdb -Recurse |排序对象名称
CopyDllsToWebBin($dll_files)
$dll_files = Get-ChildItem -Path $folder$dll_output_folder -include *.xml -Recurse |排序对象名称
CopyDllsToWebBin($dll_files)
"复制的 $folder$dll_output_folder"
}
$dll_files = Get-ChildItem -Path "ThirdParty" -include *.dll -Recurse |排序对象名称
CopyDllsToWebBin($dll_files)
$dll_files = Get-ChildItem -Path "ThirdParty" -include *.pdb -Recurse |排序对象名称
CopyDllsToWebBin($dll_files)
$dll_files = Get-ChildItem -Path $folder$dll_output_folder -include *.xml -Recurse |排序对象名称
CopyDllsToWebBin($dll_files)
“复制的第三方”
日期