提交代码
This commit is contained in:
@@ -27,4 +27,24 @@
|
||||
<Content Remove="..\HardwareControl.Core\Models\4.highvalue_expert_logits.onnx" />
|
||||
</ItemGroup>
|
||||
|
||||
<!--
|
||||
前端构建产物:pnpm build 生成的 dist 在发布时自动复制到 wwwroot。
|
||||
避免发布目录继续使用旧的前端包(旧包把识别等待时间写死为 30 秒)。
|
||||
未执行 pnpm build 时 dist 不存在,该配置不会产生任何文件。
|
||||
-->
|
||||
<ItemGroup>
|
||||
<Content Include="..\Hardware-Vue\dist\**\*"
|
||||
Link="wwwroot\%(RecursiveDir)%(Filename)%(Extension)"
|
||||
CopyToPublishDirectory="PreserveNewest" />
|
||||
</ItemGroup>
|
||||
|
||||
<!--
|
||||
ASP.NET Core 的静态 Web 资源清单会把项目 wwwroot 作为内容根目录,
|
||||
目录不存在时 Development 环境启动会在 WebApplication.CreateBuilder
|
||||
抛 DirectoryNotFoundException。这里在构建前确保目录存在。
|
||||
-->
|
||||
<Target Name="EnsureWwwRootDirectory" BeforeTargets="PrepareForBuild">
|
||||
<MakeDir Directories="$(MSBuildProjectDirectory)\wwwroot" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user