ビジュアルスタジオのパフォーマンスを向上させるためにいくつかのことを試しましたが、最終的には制限を回避する必要がありました。ウイルス対策を無効にするなど、IOに関するいくつかの項目を試してみました。私も視覚スタジオとさまざまな隠しフォルダの回避策でソースコントロールを無効にしようとしました。私は最終的に、ソリューションから完全に材料アイコンフォルダを削除することを選択し、公開プロセス中に追加し直しました。私はまた、実際に使用したアイコンだけが公開されるような、いくつかの「木の揺れ」をしなければならなかった。私はアイコンの使用のためにすべてのcsとcshtmlファイルをスキャンし、それらのファイルをコピーするだけでこれを行いました。それが他の人を助ける場合のスクリプトです:
function Publish-MaterialIcons{
[cmdletbinding()]
param(
[Parameter(Position=0, Mandatory=$true)]
[string]$path
)
process{
$mdPath = "D:\media\material-design-icons"
$publishPath = $(Join-Path $path "wwwroot\lib\material-design-icons")
if (!(Test-Path $publishPath))
{
robocopy $mdPath $publishPath /e /xf *.* | Out-Null
}
"Adding $publishPath"
$includeFonts = ls -Recurse -Include "*.cs", "*.cshtml" |% {cat $_} |? {$_ -match "([\w_]+)\</i\>"} |% {$matches[1]} | select -Unique |% {"*$_*.png","*$_*.svg"}
$mdPathR = $mdPath -replace "\\", "\\"
$publishPathR = $publishPath -replace "\\", "\\"
$(ls $mdPath -Recurse -include $includeFonts) + $(ls $mdPath -Recurse -Exclude "*.png", "*.svg") |% {
$newPath = join-path $($(Split-Path $_.FullName) -replace $mdPathR, $publishPathR) $_.Name
cp $_.FullName $newPath -Force
}
}
}