0.30.2
What's Changed
CSharpier.MsBuild now uses DOTNET_HOST_PATH instead of just dotnet #1387
Use current dotnet binary from DOTNET_HOST_PATH instead of just dotnet.
- Global (in PATH) may not exist (when used Binaries, but not Installers).
- Global can have different runtime version.
- Consistent with outer tools (csc for example).
https://github.com/dotnet/roslyn/blob/324fd25331c969cd742ba68eee09ffd4b6fd29e3/src/Compilers/Shared/RuntimeHostInfo.cs#L61-L64 - It is documented to be used for that purpose.
https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-environment-variables#dotnet_host_path
Collection expression inside a dictionary adds unexpected new line #1390
// input & expected output
Dictionary<string, string[]> dictionary = new()
{
{
"Key",
[
"SomeValue__________________________________________",
"SomeValue__________________________________________",
]
},
};
// 0.30.1
Dictionary<string, string[]> dictionary = new()
{
{
"Key",
[
"SomeValue__________________________________________",
"SomeValue__________________________________________",
]
},
};
Failed syntax tree validation reported when trailing comma added before a trailing comment #1388
With the following code, CSharpier will add a trailing comma before the trailing comment.
CSharpier's syntax tree validation was incorrectly reporting this as a failure.
// input
var someObject = new SomeObject()
{
Property1 = 1,
Property2 = 2 // Trailing Comment
};
// output
var someObject = new SomeObject()
{
Property1 = 1,
Property2 = 2, // Trailing Comment
};
Full Changelog: 0.30.1...0.30.2