AutomaticPackageRestoreMigrationScript icon indicating copy to clipboard operation
AutomaticPackageRestoreMigrationScript copied to clipboard

Solution files are saved using the "UTF-8" encoding which cause issues when re-opening them using the Visual Studio Version Selector

Open icnocop opened this issue 9 years ago • 1 comments
trafficstars

I have Visual Studio 2013 and 2015 installed.

I have a directory that contains Visual Studio 2013 sln files. When I double-click on the sln files, they open in Visual Studio 2013 without issues.

However, after running migrateToAutomaticPackageRestore.ps1 on that directory, double-clicking on the sln files opens them in Visual Studio 2015.

Files with the extension sln are associated with the "Microsoft Visual Studio Version Selector".

The problem is that the sln files were originally saved using ANSI encoding, but migrateToAutomaticPackageRestore.ps1 changed them to use UTF-8 encoding and this is what caused the issue.

Re-saving the sln files back to ANSI, and then double-clicking them opens in Visual Studio 2013 as expected.

I'm thinking the script should save the files in their original encoding.

Thank you.

icnocop avatar Jan 26 '16 20:01 icnocop

feel free to make a pull request for this.

owen2 avatar Jan 26 '16 22:01 owen2