65 lines
2.3 KiB
XML
65 lines
2.3 KiB
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
<!--<Import Project="../../../Directory.Version.props" />-->
|
|
<PropertyGroup>
|
|
<TargetFramework>net9.0</TargetFramework>
|
|
<ImplicitUsings>enable</ImplicitUsings>
|
|
<Nullable>enable</Nullable>
|
|
<!-- 确保 NuGet 包的 DLL 被复制 -->
|
|
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<None Remove="i18n\en-US.json" />
|
|
<None Remove="i18n\zh-CN.json" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<AvaloniaResource Include="i18n\en-US.json" />
|
|
<AvaloniaResource Include="i18n\zh-CN.json" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="OpcUaHelper" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<ProjectReference Include="..\..\..\Cowain.Base\Cowain.Base.csproj" />
|
|
<ProjectReference Include="..\Cowain.Driver\Plugin.Cowain.Driver.csproj" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<Compile Update="Views\OpcUaParamDialog.axaml.cs">
|
|
<DependentUpon>OpcUaParamDialog.axaml</DependentUpon>
|
|
</Compile>
|
|
</ItemGroup>
|
|
|
|
|
|
<Target Name="CopyFilesToDestination" AfterTargets="AfterBuild" Condition="true">
|
|
<!-- 确定相对路径到目标目录 -->
|
|
<PropertyGroup>
|
|
<!-- 这里使用 MSBuild 的内置属性来构造正确的路径 -->
|
|
<TargetDirectory>../../../Cowain.TestProject/Plugins/DeviceOpcUa</TargetDirectory>
|
|
</PropertyGroup>
|
|
<!-- 确保目标目录存在 -->
|
|
<MakeDir Directories="$(TargetDirectory)" Condition="!Exists('$(TargetDirectory)')" />
|
|
|
|
<ItemGroup>
|
|
<Source1 Include="i18n\*.*" />
|
|
<FilesToCopy Include="$(OutputPath)**\Plugin.Driver.DeviceOpcUa.pdb" />
|
|
<FilesToCopy Include="$(OutputPath)**\Plugin.Driver.DeviceOpcUa.deps.json" />
|
|
<FilesToCopy Include="$(OutputPath)**/HslCommunication.dll" />
|
|
<FilesToCopy Include="$(OutputPath)**/Newtonsoft.Json.dll" />
|
|
<FilesToCopy Include="$(OutputPath)**/System.IO.Ports.dll" />
|
|
<FilesToCopy Include="$(OutputPath)**\*Opc*.dll" />
|
|
</ItemGroup>
|
|
<!-- 复制文件到目标目录 -->
|
|
<Copy SourceFiles="@(FilesToCopy)" DestinationFolder="$(TargetDirectory)\%(RecursiveDir)" />
|
|
<Copy SourceFiles="@(Source1)" DestinationFolder="$(TargetDirectory)\i18n\" />
|
|
<!-- 输出TargetDirectory -->
|
|
<Message Text="TargetDirectory: $(TargetDirectory)" Importance="high" />
|
|
|
|
</Target>
|
|
|
|
|
|
</Project>
|