Skip to content

[Feature Request] Render csproj #7848

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

Closed
lonix1 opened this issue Jul 26, 2022 · 3 comments
Closed

[Feature Request] Render csproj #7848

lonix1 opened this issue Jul 26, 2022 · 3 comments
Labels
needs-triage Have yet to determine what bucket this goes in.

Comments

@lonix1
Copy link

lonix1 commented Jul 26, 2022

My Foo.csproj uses variables. For example:

<SolutionName>MyCompany</SolutionName>
<Authors>$(SolutionName)</Authors>

In my build scripts I need to know the value of various properties. I thought that would be possible using the dotnet or msbuild CLIs, so I tried:

msbuild -pp Foo.csproj

...but although that merges config, it doesn't render variables.

Please add a CLI feature to fully render the csproj. That would make it much easier to use in build environments.

dotnet 6.0.302
msbuild 16.5.0.26101

@lonix1 lonix1 added the needs-triage Have yet to determine what bucket this goes in. label Jul 26, 2022
@jrdodds
Copy link
Contributor

jrdodds commented Jul 27, 2022

@rainersigwald
Copy link
Member

Can you elaborate on

In my build scripts I need to know the value of various properties.

?

I'm not sure how useful producing a copy of your csproj file with all properties expanded would be, since those properties can and do change during the build. Would something like #3911 satisfy your needs?

@lonix1
Copy link
Author

lonix1 commented Jul 28, 2022

@rainersigwald Thanks - that's close enough to what I'm referring to, so I'll close this as a dupe.

I like the idea of printing the entire xml (as in my post above), but just getting a single property (as in the other post) is fine too.

Elaboration: I've added info to the linked issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Have yet to determine what bucket this goes in.
Projects
None yet
Development

No branches or pull requests

3 participants