Terminal.Gui.csproj 8.6 KB

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