Skip to content
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

Fix issue with string builder removing too much raw sln data on Unix platforms #58

Merged
merged 2 commits into from
Jul 12, 2023

Conversation

teekayarezee
Copy link

The implementations incorrectly assume there are two trailing characters to ignore for the newline (i.e. "\r\n"), which is the case for Windows, however this is only a single character on Unix platorms ("\n").

This results in writing corrupted data to the solution file (for example, manifesting as "EndProjec" appearing in the output sln file when using the WProject write handler).

This fix uses Environment.NewLine.Length to determine how many trailing characters to ignore, depending on which platform is being used.

…platforms

The implementations incorrectly assume there are two trailing characters to ignore for the newline (i.e. "\r\n"), which is the case for Windows, however this is only a single character on Unix platorms ("\n").
This fix uses Environment.NewLine.Length to determine how many trailing characters to ignore, depending on which platform is being used.
@3F
Copy link
Owner

3F commented Jul 11, 2023 via email

* FIXED: Fix issue with string builder removing too much raw sln data on Unix platforms.
             Related issue: 3F#57
@teekayarezee
Copy link
Author

@3F No problem! I've just committed the recommended changes - I have also updated the versions referenced in MvsSln.csproj and MvsSlnVersion.cs to 2.6.2, to match the same format of the changes made in the 2.6.1 public release, in commit 8dd3956.

@3F 3F merged commit 8d847f0 into 3F:master Jul 12, 2023
1 check passed
@3F
Copy link
Owner

3F commented Jul 12, 2023

Am I missed something on appveyor? o_o https://ci.appveyor.com/project/3Fs/mvssln-fxjnf/builds/47528754
https://ci.appveyor.com/project/3Fs/mvssln-fxjnf/history

At current time I can't access to my personal pc to debug the reason. Maybe tomorrow.

@3F
Copy link
Owner

3F commented Jul 12, 2023

oh, also, as far as I remember it, PRs should be built automatically by requesting appveyor CI but I don't see anything here anymore.

Too many changes out of my sight after a year :(

@3F
Copy link
Owner

3F commented Jul 12, 2023

There's another bug with vssbe API after MSBuild changes for .rsp files in modern environments -_-
almost everything seems to be broken, like my life

Fortunately we can suppress it (for windows) temporarily via /noautorsp
So I just added the key for appveyor CI like:

appveyor-build PublicRelease" /noautorsp"

(the quotes are in the correct position due to current code hack, hack again)

so much for one little thing ...

@teekayarezee Thanks again for your time, it is appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants