Skip to content

Latest commit

 

History

History
28 lines (23 loc) · 729 Bytes

File metadata and controls

28 lines (23 loc) · 729 Bytes

GitLinkGenerator

Generate a static field representing the hyperlink to the related github content.

For the following class :

[GitPathGenerator.GitPath]
public partial class Class1
{

}

an static const GitPath is added and can used. For example:

Assert.AreEqual("https://github.com/kgen-llc/GitLinkGenerator/blob/dev/GeneratorGitHubSample/Class1.cs", Class1.GitPath);

in order to work, csproj MUST contains PackageProjectUrl property:

<PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
    <PackageProjectUrl>https://github.com/kgen-llc/GitLinkGenerator</PackageProjectUrl>
</PropertyGroup>