Terminal.Gui.csproj 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <Project Sdk="Microsoft.NET.Sdk">
  2. <!-- =================================================================== -->
  3. <!-- Version numbers -->
  4. <!-- Automatically updated by gitversion (run `dotnet-gitversion`) -->
  5. <!-- GitVersion.xml controls settings -->
  6. <!-- See ./README.md for more -->
  7. <!-- =================================================================== -->
  8. <PropertyGroup>
  9. <Version>2.0.0</Version>
  10. </PropertyGroup>
  11. <!-- =================================================================== -->
  12. <!-- Assembly name. -->
  13. <!-- Referenced throughout this file for consistency. -->
  14. <!-- =================================================================== -->
  15. <PropertyGroup>
  16. <AssemblyName>Terminal.Gui</AssemblyName>
  17. </PropertyGroup>
  18. <!-- =================================================================== -->
  19. <!-- .NET Build Settings -->
  20. <!-- =================================================================== -->
  21. <PropertyGroup>
  22. <TargetFramework>net8.0</TargetFramework>
  23. <LangVersion>12</LangVersion>
  24. <RootNamespace>$(AssemblyName)</RootNamespace>
  25. <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
  26. <DefineTrace>true</DefineTrace>
  27. <DebugType>portable</DebugType>
  28. <DefineConstants>$(DefineConstants);CONTRACTS_FULL;CODE_ANALYSIS</DefineConstants>
  29. <ImplicitUsings>enable</ImplicitUsings>
  30. <NoLogo>true</NoLogo>
  31. <SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
  32. <JsonSerializerIsReflectionEnabledByDefault>false</JsonSerializerIsReflectionEnabledByDefault>
  33. <IsTrimmable>true</IsTrimmable>
  34. <IsAotCompatible>true</IsAotCompatible>
  35. </PropertyGroup>
  36. <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
  37. <DefineDebug>true</DefineDebug>
  38. <DefineConstants>$(DefineConstants);DEBUG_IDISPOSABLE</DefineConstants>
  39. </PropertyGroup>
  40. <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
  41. <Optimize>true</Optimize>
  42. <VersionSuffix></VersionSuffix>
  43. </PropertyGroup>
  44. <!-- =================================================================== -->
  45. <!-- Configuration Manager -->
  46. <!-- =================================================================== -->
  47. <ItemGroup>
  48. <None Remove="Resources\config.json" />
  49. <EmbeddedResource Include="Resources\config.json" />
  50. </ItemGroup>
  51. <!-- =================================================================== -->
  52. <!-- Dependencies -->
  53. <!-- =================================================================== -->
  54. <ItemGroup>
  55. <PackageReference Include="ColorHelper" Version="[1.8.1,2)" />
  56. <PackageReference Include="JetBrains.Annotations" Version="[2024.2.0,)" PrivateAssets="all" />
  57. <PackageReference Include="Microsoft.CodeAnalysis" Version="[4.10,5)" PrivateAssets="all" />
  58. <PackageReference Include="Microsoft.CodeAnalysis.Common" Version="[4.10,5)" PrivateAssets="all" />
  59. <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="[4.10,5)" PrivateAssets="all" />
  60. <!-- Enable Nuget Source Link for github -->
  61. <PackageReference Include="Microsoft.SourceLink.GitHub" Version="[8,9)" PrivateAssets="all" />
  62. <PackageReference Include="System.IO.Abstractions" Version="[21.0.22,22)" />
  63. <PackageReference Include="System.Text.Json" Version="[8.0.5,9)" />
  64. <PackageReference Include="Wcwidth" Version="[2,3)" />
  65. </ItemGroup>
  66. <!-- =================================================================== -->
  67. <!-- Global Usings and Type Aliases -->
  68. <!-- =================================================================== -->
  69. <ItemGroup>
  70. <Using Include="JetBrains.Annotations" />
  71. <Using Include="JetBrains.Annotations.PureAttribute" Alias="PureAttribute" />
  72. <Using Include="System.Drawing" />
  73. <Using Include="System.Text" />
  74. <Using Include="Terminal.Gui.EnumExtensions" />
  75. </ItemGroup>
  76. <!-- =================================================================== -->
  77. <!-- Assembliy names for which internal items are visible -->
  78. <!-- =================================================================== -->
  79. <ItemGroup>
  80. <InternalsVisibleTo Include="UnitTests" />
  81. <InternalsVisibleTo Include="TerminalGuiDesigner" />
  82. </ItemGroup>
  83. <!-- =================================================================== -->
  84. <!-- API Documentation -->
  85. <!-- =================================================================== -->
  86. <ItemGroup>
  87. <None Include="..\docfx\images\logo.png">
  88. <Pack>true</Pack>
  89. <PackagePath>\</PackagePath>
  90. </None>
  91. <None Include="..\README.md">
  92. <Pack>true</Pack>
  93. <PackagePath>\</PackagePath>
  94. </None>
  95. </ItemGroup>
  96. <!-- =================================================================== -->
  97. <!-- i18 -->
  98. <!-- =================================================================== -->
  99. <ItemGroup>
  100. <Compile Update="Resources\Strings.Designer.cs">
  101. <DesignTime>true</DesignTime>
  102. <AutoGen>true</AutoGen>
  103. <DependentUpon>Strings.resx</DependentUpon>
  104. </Compile>
  105. </ItemGroup>
  106. <ItemGroup>
  107. <EmbeddedResource Update="Resources\Strings.resx">
  108. <Generator>ResXFileCodeGenerator</Generator>
  109. <LastGenOutput>Strings.Designer.cs</LastGenOutput>
  110. </EmbeddedResource>
  111. </ItemGroup>
  112. <!-- =================================================================== -->
  113. <!-- Nuget -->
  114. <!-- =================================================================== -->
  115. <PropertyGroup>
  116. <PackageId>$(AssemblyName)</PackageId>
  117. <PackageLicenseExpression>MIT</PackageLicenseExpression>
  118. <PackageProjectUrl>https://github.com/gui-cs/$(AssemblyName)</PackageProjectUrl>
  119. <PackageIcon>logo.png</PackageIcon>
  120. <PackageReadmeFile>README.md</PackageReadmeFile>
  121. <PackageTags>csharp, terminal, c#, f#, gui, toolkit, console, tui</PackageTags>
  122. <Description>Cross platform Terminal UI toolkit for .NET</Description>
  123. <Owners>Miguel de Icaza, Tig Kindel</Owners>
  124. <Summary>A toolkit for building rich console apps for .NET that works on Windows, Mac, and Linux/Unix.</Summary>
  125. <Title>$(AssemblyName) - Cross-platform Terminal User Interface (TUI) toolkit for .NET</Title>
  126. <PackageReleaseNotes>
  127. See: $(PackageProjectUrl)/releases
  128. </PackageReleaseNotes>
  129. <DocumentationFile>bin\$(Configuration)\$(AssemblyName).xml</DocumentationFile>
  130. <GeneratePackageOnBuild Condition=" '$(Configuration)' == 'Debug' ">true</GeneratePackageOnBuild>
  131. <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
  132. <RepositoryUrl>https://github.com/gui-cs/$(AssemblyName).git</RepositoryUrl>
  133. <RepositoryType>git</RepositoryType>
  134. <IncludeSymbols>true</IncludeSymbols>
  135. <SymbolPackageFormat>snupkg</SymbolPackageFormat>
  136. <!-- Publish the repository URL in the built .nupkg (in the NuSpec <Repository> element) -->
  137. <PublishRepositoryUrl>true</PublishRepositoryUrl>
  138. <GitRepositoryRemoteName>upstream</GitRepositoryRemoteName>
  139. <!-- Embed source files that are not tracked by the source control manager in the PDB -->
  140. <EmbedUntrackedSources>true</EmbedUntrackedSources>
  141. <EnableSourceLink>true</EnableSourceLink>
  142. <Authors>Miguel de Icaza, Tig Kindel (@tig), @BDisp</Authors>
  143. </PropertyGroup>
  144. <ProjectExtensions><VisualStudio><UserProperties resources_4config_1json__JsonSchema="../../docfx/schemas/tui-config-schema.json" /></VisualStudio></ProjectExtensions>
  145. <Target Name="CopyNuGetPackagesToLocalPackagesFolder" AfterTargets="Pack" Condition="'$(Configuration)' == 'Release'">
  146. <PropertyGroup>
  147. <!-- Define the path for local_packages relative to the project directory -->
  148. <LocalPackagesPath>$(MSBuildThisFileDirectory)..\local_packages\</LocalPackagesPath>
  149. <!-- Output path without framework-specific folders -->
  150. <PackageOutputPath>$(MSBuildThisFileDirectory)bin\$(Configuration)\</PackageOutputPath>
  151. </PropertyGroup>
  152. <!-- Ensure the local_packages folder exists -->
  153. <Message Text="Checking if $(LocalPackagesPath) exists, creating if necessary." Importance="high" />
  154. <MakeDir Directories="$(LocalPackagesPath)" />
  155. <!-- Collect .nupkg and .snupkg files into an item group -->
  156. <ItemGroup>
  157. <NuGetPackages Include="$(PackageOutputPath)*.nupkg;$(PackageOutputPath)*.snupkg" />
  158. </ItemGroup>
  159. <!-- Check if any packages were found -->
  160. <Message Text="Found packages: @(NuGetPackages)" Importance="high" />
  161. <!-- Copy files only if found -->
  162. <Copy SourceFiles="@(NuGetPackages)" DestinationFolder="$(LocalPackagesPath)" SkipUnchangedFiles="false" Condition="@(NuGetPackages) != ''" />
  163. <!-- Log success -->
  164. <Message Text="Copy completed successfully." Importance="high" />
  165. </Target>
  166. </Project>