Open natemcmaster opened 7 years ago
We won't get to this before RTM but it's something we should look at soon after. @blackdwarf @rainersigwald for their thoughts.
My general feeling is that this is going to be very expensive for the benefit.
Important factors to consider:
This is done in CPS
Could we abstract this into a class library?
I don't think it's currently very well isolated, but there's nothing conceptually stopping such a thing. Just work.
@piotrpMSFT Any plans to get this done in 2.0 timeline?
@muratg we don't have plans for this in the 2.0 timeline. After thinking about it for a while, I'm leaning towards agreeing with @rainersigwald. This command can only support the basic property adding without devolving into a very messy UX. I'm not sure that in those cases, and you can get into those cases pretty fast, you are not better off just cracking open the file and editing it.
Could we start with "get" and do "set" later?
Almost all CLI tools need to read properties like OutputPath, AssemblyName, TargetFramework, etc. (dotnet-watch, dotnet-ef, dotnet-xunit to name a few)
Only a few of them need to edit a csproj. And there are simple solutions for this. For example, a CLI tool might simply print a message that says "Please add <xml here>
to your csproj".
Any update on this?
Would be nice if dotnet had commands to add/read/change/remove properties in an MSBuild file.
Example:
dotnet prop set VersionSuffix beta
Would update project to include, or would alter its value if it already existsExample 2: Reading properties values.
Scenarios:
dotnet prop set VersionPrefix 2.0.0
cc @blackdwarf