I posted the project, but what is .pp?

Sorry if this is not a suitable place to post this question ... if it should be on another site, please let me know or feel free to close it.

I have a simple github question. I am very new to this and β€œforked” the project, in which I wanted to contribute.

Then I cloned it locally and β€œput it in” to look at it. I noticed that there was an additional .pp extension in the .cs files, what is its purpose? Therefore, instead of Agent.cs its Agent.cs.pp .

Just like projects like this one handle the .net side. I mean, I see html files and .js files. But .net (cs) files do not include a project or solution related to them. They just come in the form of .cs.pp . If I wanted to change these files, should I create a new project and add them to my project?

Sorry for the github newbie question, but I'm pretty new to this, although I use Subversion.

+6
source share
1 answer

C # source file preprocessed (pp) for NuGet. See Configuring and Converting Source Code (NuGet) .

You specify the source code transformation, including the properties of the Visual Studio project in the code. Properties are separated using dollar signs ($).

When adding code from NuGet to a VS project, it will replace these properties, thus creating compiled code.

In the LSCK example below, the result after adding the NuGet link:

LSCK in Solution Explorer

When comparing files in Github with local files, you will find that .cs.pp been converted to .cs and $rootnamespace$ into code that has been replaced by the project namespace.

To contribute, you can create these files yourself: the return path ( .cs β†’ .cs.pp ) can be achieved using the NuGetContentGenerator .

+8
source

Source: https://habr.com/ru/post/988451/


All Articles