-
-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathThisAssembly.Constants.csproj
More file actions
58 lines (44 loc) · 1.61 KB
/
ThisAssembly.Constants.csproj
File metadata and controls
58 lines (44 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>latest</LangVersion>
<IsRoslynComponent>true</IsRoslynComponent>
</PropertyGroup>
<PropertyGroup>
<PackageId>ThisAssembly.Constants</PackageId>
<Description>
This package generates a static `ThisAssembly.Constants` class with public
constants for each Constant MSBuild item in the project.
For example:
<ItemGroup>
<Constant Include="Foo.Bar" Value="Baz" />
</ItemGroup>
Results in a corresponding `ThisAssembly.Constants.Foo.Bar` constant with the value `Baz`:
Generated code:
C#:
partial class ThisAssembly
{
public static partial class Constants
{
public static partial class Foo
{
public const string Bar = "Baz";
}
}
}
</Description>
</PropertyGroup>
<ItemGroup>
<None Remove="CSharp.sbntxt" />
<EmbeddedResource Include="CSharp.sbntxt" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="NuGetizer" Version="1.4.7" />
<PackageReference Include="Scriban" Version="6.2.1" Pack="false" IncludeAssets="build" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.6.3" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.1" Pack="false" />
<PackageReference Include="PolySharp" Version="1.15.0" PrivateAssets="All" />
</ItemGroup>
<Import Project="..\Shared\Shared.projitems" Label="Shared" />
</Project>