Terminal.Gui.csproj 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  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="TerminalGuiFluentTesting" />
  90. <InternalsVisibleTo Include="DynamicProxyGenAssembly2" />
  91. </ItemGroup>
  92. <!-- =================================================================== -->
  93. <!-- API Documentation -->
  94. <!-- =================================================================== -->
  95. <ItemGroup>
  96. <None Include="..\docfx\images\logo.png">
  97. <Pack>true</Pack>
  98. <PackagePath>\</PackagePath>
  99. </None>
  100. <None Include="..\README.md">
  101. <Pack>true</Pack>
  102. <PackagePath>\</PackagePath>
  103. </None>
  104. </ItemGroup>
  105. <!-- =================================================================== -->
  106. <!-- i18 -->
  107. <!-- =================================================================== -->
  108. <ItemGroup>
  109. <Compile Update="Resources\Strings.Designer.cs">
  110. <DesignTime>true</DesignTime>
  111. <AutoGen>true</AutoGen>
  112. <DependentUpon>Strings.resx</DependentUpon>
  113. </Compile>
  114. </ItemGroup>
  115. <ItemGroup>
  116. <EmbeddedResource Update="Resources\Strings.resx">
  117. <Generator>ResXFileCodeGenerator</Generator>
  118. <LastGenOutput>Strings.Designer.cs</LastGenOutput>
  119. </EmbeddedResource>
  120. </ItemGroup>
  121. <!-- =================================================================== -->
  122. <!-- Nuget -->
  123. <!-- =================================================================== -->
  124. <PropertyGroup>
  125. <PackageId>$(AssemblyName)</PackageId>
  126. <PackageLicenseExpression>MIT</PackageLicenseExpression>
  127. <PackageProjectUrl>https://github.com/gui-cs/$(AssemblyName)</PackageProjectUrl>
  128. <PackageIcon>logo.png</PackageIcon>
  129. <PackageReadmeFile>README.md</PackageReadmeFile>
  130. <PackageTags>csharp, terminal, c#, f#, gui, toolkit, console, tui</PackageTags>
  131. <Description>Cross platform Terminal UI toolkit for .NET</Description>
  132. <Owners>Miguel de Icaza, Tig Kindel</Owners>
  133. <Summary>A toolkit for building rich console apps for .NET that works on Windows, Mac, and Linux/Unix.</Summary>
  134. <Title>$(AssemblyName) - Cross-platform Terminal User Interface (TUI) toolkit for .NET</Title>
  135. <PackageReleaseNotes>
  136. See: $(PackageProjectUrl)/releases
  137. </PackageReleaseNotes>
  138. <DocumentationFile>bin\$(Configuration)\$(AssemblyName).xml</DocumentationFile>
  139. <GeneratePackageOnBuild Condition=" '$(Configuration)' == 'Debug' ">true</GeneratePackageOnBuild>
  140. <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
  141. <RepositoryUrl>https://github.com/gui-cs/$(AssemblyName).git</RepositoryUrl>
  142. <RepositoryType>git</RepositoryType>
  143. <IncludeSymbols>true</IncludeSymbols>
  144. <SymbolPackageFormat>snupkg</SymbolPackageFormat>
  145. <!-- Publish the repository URL in the built .nupkg (in the NuSpec <Repository> element) -->
  146. <PublishRepositoryUrl>true</PublishRepositoryUrl>
  147. <GitRepositoryRemoteName>upstream</GitRepositoryRemoteName>
  148. <!-- Embed source files that are not tracked by the source control manager in the PDB -->
  149. <EmbedUntrackedSources>true</EmbedUntrackedSources>
  150. <EnableSourceLink>true</EnableSourceLink>
  151. <Authors>Miguel de Icaza, Tig Kindel (@tig), @BDisp</Authors>
  152. </PropertyGroup>
  153. <ProjectExtensions>
  154. <VisualStudio>
  155. <UserProperties resources_4config_1json__JsonSchema="../../docfx/schemas/tui-config-schema.json" />
  156. </VisualStudio>
  157. </ProjectExtensions>
  158. <Target Name="CopyNuGetPackagesToLocalPackagesFolder" AfterTargets="Pack" Condition="'$(Configuration)' == 'Release'">
  159. <PropertyGroup>
  160. <!-- Define the path for local_packages relative to the project directory -->
  161. <LocalPackagesPath>$(MSBuildThisFileDirectory)..\local_packages\</LocalPackagesPath>
  162. <!-- Output path without framework-specific folders -->
  163. <PackageOutputPath>$(MSBuildThisFileDirectory)bin\$(Configuration)\</PackageOutputPath>
  164. </PropertyGroup>
  165. <!-- Ensure the local_packages folder exists -->
  166. <Message Text="Checking if $(LocalPackagesPath) exists, creating if necessary." Importance="high" />
  167. <MakeDir Directories="$(LocalPackagesPath)" />
  168. <!-- Collect .nupkg and .snupkg files into an item group -->
  169. <ItemGroup>
  170. <NuGetPackages Include="$(PackageOutputPath)*.nupkg;$(PackageOutputPath)*.snupkg" />
  171. </ItemGroup>
  172. <!-- Check if any packages were found -->
  173. <Message Text="Found packages: @(NuGetPackages)" Importance="high" />
  174. <!-- Copy files only if found -->
  175. <Copy SourceFiles="@(NuGetPackages)" DestinationFolder="$(LocalPackagesPath)" SkipUnchangedFiles="false" Condition="@(NuGetPackages) != ''" />
  176. <!-- Log success -->
  177. <Message Text="Copy completed successfully." Importance="high" />
  178. </Target>
  179. </Project>