-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Support MSBuild properties on the CLI #152
Conversation
Yep! This would do the base-level support - though MSBuild properties can be passed via |
Thanks for the pointer. These should all work now with |
If the following mapping to MSBuild properties is correct, I think this PR is ready for review (not sure about OS): |
The dotnet CLI errors if arch/os are provided at the same time as -r, and it 'fills in' any missing pieces of the final RuntimeIdentifier from arch/os with the arch/os of the current SDK. So a user specifying |
Ah okay sorry, I had some bigger misunderstanding then. |
The 'correct' way to get the RID for the currently running SDK is here - but it is very, very gross. |
So |
oh, great idea - that should be fine for your needs. I think the SDK has some layering problem where it can't necessarily rely on that. |
Ok, thanks a lot for all your help here! |
configuration | ||
|> Option.map (fun c -> List.append props [ "Configuration", c ]) | ||
|> Option.defaultValue props | ||
let properties = getProperties results |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can properties be combined with --fsc-args
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I expect they can be combined but I'll test next week.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My initial thinking is that they cannot. Properties would influence the project cracking I assume and we skip that entirely when using --fsc-args
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we discussed, while we could shoehorn some parts from the properties into the fsc-args, it would be against the idea of fsc-args, so let's disallow that.
With the RuntimeIdentifier being constructed with --arch and --os if given, I hope this is ready now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, ship it!
@baronfel Is that roughly what you had in mind in #84 ?
With it we can do things like:
-p Configuration=Release -p DefineConstants="MYDEF" ...