-
-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathThisAssembly.Project.csproj
More file actions
51 lines (39 loc) · 1.29 KB
/
ThisAssembly.Project.csproj
File metadata and controls
51 lines (39 loc) · 1.29 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
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>latest</LangVersion>
<IsRoslynComponent>true</IsRoslynComponent>
<PackBuildOutput>false</PackBuildOutput>
</PropertyGroup>
<PropertyGroup>
<PackageId>ThisAssembly.Project</PackageId>
<Description>
This package generates a static `ThisAssembly.Project` class with public
constants exposing project properties that have been opted into this mechanism by adding
them as `ProjectProperty` MSBuild items in project file, such as:
<PropertyGroup>
<Foo>Bar</Foo>
</PropertyGroup>
<ItemGroup>
<ProjectProperty Include="Foo" />
</ItemGroup>
A corresponding `ThisAssembly.Project.Foo` constant with the value `Bar` is provided.
Generated code:
C#:
partial class ThisAssembly
{
public static partial class Project
{
public const string Foo = "Bar";
}
}
</Description>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NuGetizer" Version="1.4.5" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ThisAssembly.Constants\ThisAssembly.Constants.csproj" />
</ItemGroup>
<Import Project="..\Shared\Shared.projitems" Label="Shared" />
</Project>