Terminal.Gui.csproj 9.3 KB

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