Xavalon / XamlStyler

Visual Studio extension to help format your XAML source code
Apache License 2.0
1.17k stars 128 forks source link

Suggestion: Central package versioning #464

Closed hansmbakker closed 7 months ago

hansmbakker commented 7 months ago

While going through the source, I noticed some projects reference different versions of the same dependency. XamlStyler.csproj has Newtonsoft.Json 9.0.1, while XamlStyler.Console.csproj has Newtonsoft.Json 13.0.1.

By adding a file Directory.packages.props containing the needed package versions and by removing the version info from the csproj files, you can manage the versions of nuget package dependencies centrally.

grochocki commented 7 months ago

Unfortunately, there are gotchas with Newtonsoft.Json. Updating can lead to unexpected behavior on older versions of Visual Studio (#377), so this is by design for now. More information here: Using Newtonsoft.Json in a Visual Studio extension.