TeamAAS.csproj 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <Project Sdk="Microsoft.NET.Sdk">
  2. <PropertyGroup>
  3. <OutputType>WinExe</OutputType>
  4. <ApplicationIcon>TeamAAS25.ico</ApplicationIcon>
  5. <TargetFramework>net48</TargetFramework>
  6. <UseWPF>true</UseWPF>
  7. <UseWindowsForms>true</UseWindowsForms>
  8. <RuntimeIdentifier>win-x64</RuntimeIdentifier>
  9. <PublishSingleFile>true</PublishSingleFile>
  10. <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
  11. <OutputPath>..\ExE</OutputPath>
  12. <BaseOutputPath>$(OutputPath)</BaseOutputPath>
  13. <ApplicationManifest>app.manifest</ApplicationManifest>
  14. <SatelliteResourceLanguages>zh-CN</SatelliteResourceLanguages>
  15. <ProduceReferenceAssembly>True</ProduceReferenceAssembly>
  16. <Platforms>x64</Platforms>
  17. <PlatformTarget>x64</PlatformTarget>
  18. <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
  19. <GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
  20. </PropertyGroup>
  21. <ItemGroup>
  22. <PackageReference Include="HandyControl" Version="3.5.1" />
  23. <PackageReference Include="MessagePack" Version="3.1.8" />
  24. <PackageReference Include="OpenCvSharp4" Version="4.13.0.20260627" />
  25. <PackageReference Include="OpenCvSharp4.runtime.win" Version="4.13.0.20260627" />
  26. <PackageReference Include="Prism.DryIoc" Version="8.1.97" />
  27. <PackageReference Include="PropertyGridLib" Version="1.2.0" />
  28. <PackageReference Include="System.Text.Json" Version="10.0.0" />
  29. </ItemGroup>
  30. <PropertyGroup>
  31. <VisionProRoot Condition="Exists('C:\Program Files\Cognex\VisionPro')">C:\Program Files\Cognex\VisionPro</VisionProRoot>
  32. <VisionProRoot Condition="'$(VisionProRoot)' == '' AND EXISTS('C:\Program Files (x86)\Cognex\VisionPro')">C:\Program Files (x86)\Cognex\VisionPro</VisionProRoot>
  33. <ReferencePath>$(VisionProRoot)\ReferencedAssemblies;$(VisionProRoot)\CogPlus;$(ReferencePath)</ReferencePath>
  34. </PropertyGroup>
  35. <ItemGroup>
  36. <ProjectReference Include="..\TeamAAS.Core\TeamAAS.Core\TeamAAS.Core.csproj" />
  37. <!-- 鐩磋繛寮曠敤锛氫繚璇?XAML 涓?assembly=TeamAAS.Global 鐨勬棩蹇楁帶浠惰兘琚В鏋?-->
  38. <ProjectReference Include="..\TeamAAS.Base\TeamAAS.Global\TeamAAS.Global.csproj" />
  39. <ProjectReference Include="..\TeamAAS.Base\TeamAAS.Database\TeamAAS.Database.csproj" />
  40. </ItemGroup>
  41. <!-- 汇川 IMC60G 原生库:输出到 dll\x64,PostBuild 再搬到 Runtime\dll\x64,供 SetDllDirectory 加载 -->
  42. <ItemGroup>
  43. <None Include="..\..\IMC60.MotionStudio\IMC_Library_x64.dll" Link="dll\x64\IMC_Library_x64.dll" CopyToOutputDirectory="PreserveNewest" Condition="Exists('..\..\IMC60.MotionStudio\IMC_Library_x64.dll')" />
  44. </ItemGroup>
  45. <!-- PostBuild锛氭妸鏍圭洰褰曟墍鏈?DLL/PDB/XML/Plugins/native 搴撶Щ鍒?Runtime 瀛愮洰褰曪紝
  46. 鏍圭洰褰曞彧淇濈暀 EXE + 閰嶇疆绫绘枃浠跺す锛圕onfig/Logs/Products/Recipe/zh-CN锛夈€?
  47. 鍚姩鏃?App.OnStartup 閫氳繃 AssemblyResolve + SetDllDirectory 鍦?Runtime 涓嬪姞杞姐€?-->
  48. <Target Name="OrganizeOutputDir" AfterTargets="Build">
  49. <PropertyGroup>
  50. <_AbsOutDir>$([System.IO.Path]::GetFullPath($([System.IO.Path]::Combine('$(MSBuildProjectDirectory)','$(OutDir)'))).TrimEnd('\'))</_AbsOutDir>
  51. </PropertyGroup>
  52. <Exec Command="powershell -NoProfile -ExecutionPolicy Bypass -File &quot;$(MSBuildProjectDirectory)\PostBuild.ps1&quot; -OutDir &quot;$(_AbsOutDir)&quot;" Condition="'$(DesignTimeBuild)' != 'true' And '$(BuildingProject)' == 'true'" />
  53. </Target>
  54. <!-- Debug 鏋勫缓鍓嶏細鎵弿婧愮爜閲岀殑 Translate 璋冪敤鐐癸紝鎶婃柊鍘熸枃鍚堝苟杩?Localization\zh-CN.json锛?
  55. 闃叉鐣岄潰鏂板鏂囨湰婕忛厤缈昏瘧銆傚悎骞剁瓥鐣ュ彧澧炰笉鍒狅紱鍏朵粬璇█鍖呯己澶辫瘝鏉″彧鎵撳嵃鎶ュ憡銆?
  56. 宸ュ叿婧愮爜鍦?Tools\LocalizationExtractor锛屽彂甯?CI 鏋勫缓涓嶆墽琛屻€?-->
  57. <Target Name="ExtractLocalization" BeforeTargets="Build" Condition="'$(Configuration)' == 'Debug' And '$(DesignTimeBuild)' != 'true' And '$(BuildingProject)' == 'true'">
  58. <Exec Command="dotnet run --project &quot;$(MSBuildThisFileDirectory)..\Tools\LocalizationExtractor\LocalizationExtractor.csproj&quot; -c Release -v q --no-launch-profile -- &quot;$(MSBuildThisFileDirectory)..&quot;" IgnoreExitCode="true" />
  59. </Target>
  60. </Project>