Sorry if this is not the right place to post this type of question...if it's supposed to be on another site please let me know or feel free to close.
I've got a simple question about github. I am very new to it and "forked" a project I wanted to contribute to.
I then cloned it locally and "ls"ed into it to look at it. I noticed the .cs
files had an additional .pp
extension, what is the purpose of that? So instead of Agent.cs
its Agent.cs.pp
.
Also how do projects like this one handle the .net side. I mean I see the html files and the .js files. But the .net (cs files) don't include a project or solution associated with them. They just come in the form of .cs.pp
. If I wanted to modify these files, should I be creating a new project and adding these to my project?
Sorry for the github newbie question but I'm fairly new to it although I do use Subversion.
The C# source file is pre-processed (pp) for NuGet. See Configuration and source code transformation (NuGet).
You specify a source code transformation by including Visual Studio project properties in the code. The properties are delimited using dollar signs ($).
When adding the code from NuGet to a VS project, it will replace those properties, thus generating compilable code.
In the LSCK example you provided, the result after adding the NuGet reference is:
Comparing the files on Github to the local ones, you'll find that .cs.pp
has been converted to .cs
and $rootnamespace$
within the code got replaced by the namespace of the project.
To contribute, you can create such files yourself: the opposite way (.cs
--> .cs.pp
) can be achieved using NuGetContentGenerator.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With