Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.cs.pp source code transform files in content folder not been added to projects and transformed #1139

Closed
madhon opened this issue Oct 15, 2015 · 8 comments

Comments

@madhon
Copy link

madhon commented Oct 15, 2015

Ive been using two packages both of which just have a source code file in their content folder which is transformed by putting the projects namespace into the file and adding it into the project.

the first package is liblog, it has the a file called liblog.cs.pp inside a subfolder of the content folder i.e. the following folder contains it

    packages\LibLog\content\App_Packages\LibLog.4.2  

this should be transformed and added into the project as app_packages\liblog.4.2\liblog.cs

the other package is liteguard.source
which has the different framework folders under content, each folder containins guard.cs.pp
this file should also be added to the project with the namespace changed and added as guard.cs at the root of the project

i know you dont do the running of ps1 files as part of adding a package but is it a possiblity of processing .cs.pp files ?

paket.dependencies has

    source https://www.nuget.org/api/v2

    nuget LibLog framework: net40
    nuget LiteGuard.Source framework: net40

paket.references for the project has

    LibLog
    LiteGuard.Source
@forki
Copy link
Member

forki commented Oct 15, 2015

how is this done in nuget?

@madhon
Copy link
Author

madhon commented Oct 15, 2015

its described in the "Source Code Transformations" and "Specifying Source Code Transformations" sections at
https://docs.nuget.org/create/configuration-file-and-source-code-transformations

@wallymathieu
Copy link
Member

Once either #1139 or #614 is in place, the other issue should be easier to implement.

@matkoch
Copy link

matkoch commented Aug 2, 2016

Any estimation when this is going to be implemented? At least having source file transformations would be nice, and as far as I can see, this shouldn't be so difficult to implement.

As soon as you have a reference to the project file, it's basically just parsing Project | PropertyGroup... I would be totally okay, with just parsing plain properties (i.e. without condition; actually don't know how NuGet operates on this). So would be sufficient to use $rootNamespace$ and $assemblyName$ in pp files, which is probably the main use case.

@forki
Copy link
Member

forki commented Aug 2, 2016

It's marked up-for-grabs...

@matthid
Copy link
Member

matthid commented Jun 15, 2017

Related #2231

@enricosada
Copy link
Collaborator

Closing, dupe of #614

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants