|
1 | 1 | <Project Sdk="Microsoft.NET.Sdk"> |
2 | 2 | <!-- DETAILS --> |
3 | 3 | <PropertyGroup> |
4 | | - <TargetFramework>net8.0</TargetFramework> |
5 | | - <ImplicitUsings>enable</ImplicitUsings> |
6 | | - <Nullable>enable</Nullable> |
7 | | - <Title>TJC String Extensions</Title> |
8 | | - <Description>String Extensions</Description> |
9 | | - <Authors>Tyler Carrol</Authors> |
10 | | - <PackageReadmeFile>README.md</PackageReadmeFile> |
11 | | - <PackageLicenseFile>LICENSE</PackageLicenseFile> |
12 | | - <PackageReleaseNotes>$([System.IO.File]::ReadAllText("$(MSBuildProjectDirectory)/../CHANGELOG.md"))</PackageReleaseNotes> |
13 | | - <RepositoryUrl>https://github.com/TJC-Tools/TJC.StringExtensions</RepositoryUrl> |
14 | | - <GenerateDocumentationFile>true</GenerateDocumentationFile> |
15 | | - </PropertyGroup> |
| 4 | + <TargetFramework>net8.0</TargetFramework> |
| 5 | + <ImplicitUsings>enable</ImplicitUsings> |
| 6 | + <Nullable>enable</Nullable> |
| 7 | + <Title>TJC String Extensions</Title> |
| 8 | + <Description>String Extensions</Description> |
| 9 | + <Authors>Tyler Carrol</Authors> |
| 10 | + <PackageReadmeFile>README.md</PackageReadmeFile> |
| 11 | + <PackageLicenseFile>LICENSE</PackageLicenseFile> |
| 12 | + <PackageReleaseNotes>$([System.IO.File]::ReadAllText("$(MSBuildProjectDirectory)/../CHANGELOG.md"))</PackageReleaseNotes> |
| 13 | + <RepositoryUrl>https://github.com/TJC-Tools/TJC.StringExtensions</RepositoryUrl> |
| 14 | + <GenerateDocumentationFile>true</GenerateDocumentationFile> |
| 15 | + </PropertyGroup> |
16 | 16 | <!-- INCLUDED FILES --> |
17 | 17 | <ItemGroup> |
18 | | - <None Remove="Nuget.config" /> |
| 18 | + <None Remove="Nuget.config" /> |
19 | 19 | </ItemGroup> |
20 | 20 | <ItemGroup> |
21 | | - <Content Include="Nuget.config"> |
22 | | - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
23 | | - </Content> |
| 21 | + <Content Include="Nuget.config"> |
| 22 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| 23 | + </Content> |
24 | 24 | </ItemGroup> |
25 | 25 | <ItemGroup> |
26 | | - <None Include="..\README.md"> |
27 | | - <Pack>True</Pack> |
28 | | - <PackagePath>\</PackagePath> |
29 | | - </None> |
30 | | - <None Include="..\LICENSE"> |
31 | | - <Pack>True</Pack> |
32 | | - <PackagePath>\</PackagePath> |
33 | | - </None> |
34 | | - <EmbeddedResource Include="..\LICENSE" /> |
35 | | - <None Include="..\CHANGELOG.md"> |
36 | | - <Pack>True</Pack> |
37 | | - <PackagePath>\</PackagePath> |
38 | | - </None> |
39 | | - <EmbeddedResource Include="..\CHANGELOG.md" /> |
| 26 | + <None Include="..\README.md"> |
| 27 | + <Pack>True</Pack> |
| 28 | + <PackagePath>\</PackagePath> |
| 29 | + </None> |
| 30 | + <None Include="..\LICENSE"> |
| 31 | + <Pack>True</Pack> |
| 32 | + <PackagePath>\</PackagePath> |
| 33 | + </None> |
| 34 | + <EmbeddedResource Include="..\LICENSE" /> |
| 35 | + <None Include="..\CHANGELOG.md"> |
| 36 | + <Pack>True</Pack> |
| 37 | + <PackagePath>\</PackagePath> |
| 38 | + </None> |
| 39 | + <EmbeddedResource Include="..\CHANGELOG.md" /> |
40 | 40 | </ItemGroup> |
41 | 41 | <!-- DEPENDENCIES --> |
42 | 42 | <!-- TESTS --> |
43 | 43 | <ItemGroup> |
44 | | - <AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute"> |
45 | | - <_Parameter1>TJC.StringExtensions.Tests</_Parameter1> |
46 | | - </AssemblyAttribute> |
| 44 | + <AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute"> |
| 45 | + <_Parameter1>TJC.StringExtensions.Tests</_Parameter1> |
| 46 | + </AssemblyAttribute> |
47 | 47 | </ItemGroup> |
48 | 48 | <!-- TASKS --> |
49 | | - <UsingTask TaskName="ReadFileContent" TaskFactory="RoslynCodeTaskFactory" AssemblyName="Microsoft.Build.Tasks.Core"> |
50 | | - <ParameterGroup> |
51 | | - <FilePath ParameterType="System.String" Required="true" /> |
52 | | - <Content Output="true" ParameterType="System.String" /> |
53 | | - </ParameterGroup> |
54 | | - <Task> |
55 | | - <Using Namespace="System.IO" /> |
56 | | - <Code Type="Fragment" Language="cs"> |
57 | | - <![CDATA[ |
58 | | - Content = File.ReadAllText(FilePath); |
| 49 | + <UsingTask |
| 50 | + TaskName="ReadFileContent" |
| 51 | + TaskFactory="RoslynCodeTaskFactory" |
| 52 | + AssemblyName="Microsoft.Build.Tasks.Core" |
| 53 | + > |
| 54 | + <ParameterGroup> |
| 55 | + <FilePath ParameterType="System.String" Required="true" /> |
| 56 | + <Content Output="true" ParameterType="System.String" /> |
| 57 | + </ParameterGroup> |
| 58 | + <Task> |
| 59 | + <Using Namespace="System.IO" /> |
| 60 | + <Code Type="Fragment" Language="cs"> |
| 61 | + <![CDATA[ |
| 62 | + Content = File.ReadAllText(FilePath); |
59 | 63 | ]]> |
60 | | - </Code> |
61 | | - </Task> |
| 64 | + </Code> |
| 65 | + </Task> |
62 | 66 | </UsingTask> |
63 | | - <UsingTask TaskName="AppendNewLineAndFile" TaskFactory="RoslynCodeTaskFactory" AssemblyName="Microsoft.Build.Tasks.Core"> |
64 | | - <ParameterGroup> |
65 | | - <File1 ParameterType="System.String" Required="true" /> |
66 | | - <File2 ParameterType="System.String" Required="true" /> |
67 | | - </ParameterGroup> |
68 | | - <Task> |
69 | | - <Using Namespace="System.IO" /> |
70 | | - <Code Type="Fragment" Language="cs"> |
71 | | - <![CDATA[ |
72 | | - var text = Environment.NewLine; |
73 | | - text += "==========================================================="; |
74 | | - text += Environment.NewLine; |
75 | | - text += Environment.NewLine; |
76 | | - text += File.ReadAllText(File2); |
77 | | - text += Environment.NewLine; |
78 | | - File.AppendAllText(File1, text); |
| 67 | + <UsingTask |
| 68 | + TaskName="AppendNewLineAndFile" |
| 69 | + TaskFactory="RoslynCodeTaskFactory" |
| 70 | + AssemblyName="Microsoft.Build.Tasks.Core" |
| 71 | + > |
| 72 | + <ParameterGroup> |
| 73 | + <File1 ParameterType="System.String" Required="true" /> |
| 74 | + <File2 ParameterType="System.String" Required="true" /> |
| 75 | + </ParameterGroup> |
| 76 | + <Task> |
| 77 | + <Using Namespace="System.IO" /> |
| 78 | + <Code Type="Fragment" Language="cs"> |
| 79 | + <![CDATA[ |
| 80 | + var text = Environment.NewLine; |
| 81 | + text += "==========================================================="; |
| 82 | + text += Environment.NewLine; |
| 83 | + text += Environment.NewLine; |
| 84 | + text += File.ReadAllText(File2); |
| 85 | + text += Environment.NewLine; |
| 86 | + File.AppendAllText(File1, text); |
79 | 87 | ]]> |
80 | | - </Code> |
81 | | - </Task> |
82 | | - </UsingTask> |
| 88 | + </Code> |
| 89 | + </Task> |
| 90 | + </UsingTask> |
83 | 91 | <!-- PRE-PACK --> |
84 | 92 | <Target Name="CustomSetup" BeforeTargets="_IntermediatePack"> |
85 | | - <Message Text="=== CUSTOM SETUP ===" Importance="high" /> |
86 | | - <!-- Store the original contents of the license file --> |
87 | | - <ReadFileContent FilePath="..\LICENSE"> |
88 | | - <Output TaskParameter="Content" PropertyName="OriginalLicenseLines" /> |
89 | | - </ReadFileContent> |
90 | | - <CallTarget Targets="AppendThirdPartyLicensesToLicenseFile" /> |
| 93 | + <Message Text="=== CUSTOM SETUP ===" Importance="high" /> |
| 94 | + <!-- Store the original contents of the license file --> |
| 95 | + <ReadFileContent FilePath="..\LICENSE"> |
| 96 | + <Output TaskParameter="Content" PropertyName="OriginalLicenseLines" /> |
| 97 | + </ReadFileContent> |
| 98 | + <CallTarget Targets="AppendThirdPartyLicensesToLicenseFile" /> |
91 | 99 | </Target> |
92 | 100 | <Target Name="AppendThirdPartyLicensesToLicenseFile"> |
93 | | - <Message Text="Append Third-Party Licenses to License File" Importance="high" /> |
94 | | - <AppendNewLineAndFile File1="..\LICENSE" File2="..\THIRD-PARTY-LICENSES" /> |
| 101 | + <Message Text="Append Third-Party Licenses to License File" Importance="high" /> |
| 102 | + <AppendNewLineAndFile File1="..\LICENSE" File2="..\THIRD-PARTY-LICENSES" /> |
95 | 103 | </Target> |
96 | 104 | <!-- POST-PACK --> |
97 | 105 | <Target Name="CustomCleanup" AfterTargets="Pack"> |
98 | | - <Message Text="=== CUSTOM CLEANUP ===" Importance="high" /> |
99 | | - <CallTarget Targets="RestoreLicenseFile" /> |
| 106 | + <Message Text="=== CUSTOM CLEANUP ===" Importance="high" /> |
| 107 | + <CallTarget Targets="RestoreLicenseFile" /> |
100 | 108 | </Target> |
101 | 109 | <!-- Cleanup License File --> |
102 | 110 | <Target Name="RestoreLicenseFile"> |
103 | | - <Message Text="Restore License File Contents" Importance="high" /> |
104 | | - <WriteLinesToFile File="..\LICENSE" Lines="$(OriginalLicenseLines)" Overwrite="true" Encoding="UTF-8" /> |
| 111 | + <Message Text="Restore License File Contents" Importance="high" /> |
| 112 | + <WriteLinesToFile |
| 113 | + File="..\LICENSE" |
| 114 | + Lines="$(OriginalLicenseLines)" |
| 115 | + Overwrite="true" |
| 116 | + Encoding="UTF-8" |
| 117 | + /> |
105 | 118 | </Target> |
106 | 119 | </Project> |
0 commit comments