在我的 .csproj 中,我添加了一些構建后事件,它復制構建的檔案并將它們復制到某個目錄:
<Target Name="CopyDLLs" AfterTargets="Build">
<Message Text="Executing CopyDLLs of $(ProjectName) task" Importance="High" />
<Copy
SourceFiles="$(TargetDir)$(ProjectName).dll;$(TargetDir)$(ProjectName).pdb;$(TargetDir)$(ProjectName).deps.json"
DestinationFolder="C:\Users\axeman\AppData\Local\MyApp\UserTiles\Dev" />
<Message Text="Copied build files" Importance="High" />
</Target>
在部分路徑中:
... 用戶\斧頭 ....
,我可以axeman作為一些普通用戶嗎?
uj5u.com熱心網友回復:
你正在尋找的是$(LocalAppData)讓你到達c:\users\{someUser}\AppData\Local
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/524197.html
標籤:C#。网构建后事件
