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

NewLines lost in multi-line task attributes #1402

Closed
kzu opened this issue Nov 28, 2016 · 2 comments
Closed

NewLines lost in multi-line task attributes #1402

kzu opened this issue Nov 28, 2016 · 2 comments
Labels

Comments

@kzu
Copy link
Contributor

kzu commented Nov 28, 2016

This manifests itself in Message and WriteLinesToFiles but I guess it's a general issue.

Repro project:

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

	<Target Name="Build">
		<Message Importance="high" Text="%(None.Identity):
		  Value1=%(Value1)
		  Value2=%(Value2)" />

		<WriteLinesToFile File="newlinestring.txt"
						  Lines="%(None.Identity):
		  Value1=%(Value1)
		  Value2=%(Value2)" />
	</Target>

	<ItemGroup>
		<None Include="A">
			<Value1>A1</Value1>
			<Value2>A2</Value2>
		</None>
		<None Include="B">
			<Value1>B1</Value1>
			<Value2>B2</Value2>
		</None>
	</ItemGroup>
</Project>

MSBuild 15.0 output:

Build:
  A:     Value1=A1     Value2=A2
  B:     Value1=B1     Value2=B2

MSBuild 14.0 output:

Build:
  A:
                  Value1=A1
                  Value2=A2
  B:
                  Value1=B1
                  Value2=B2

Same thing on the written file.

@rainersigwald
Copy link
Member

rainersigwald commented Nov 28, 2016

Looks like this is yet another xml-newline-normalization victim. It should be fixed on full-framework MSBuild by #1378.

Microsoft (R) Build Engine version 15.1.415.7918
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 11/28/2016 2:44:56 PM.
Project "S:\work\autoimports\kzu.proj" on node 1 (default targets).
Build:
  A:
                  Value1=A1
                  Value2=A2
  B:
                  Value1=B1
                  Value2=B2
Done Building Project "S:\work\autoimports\kzu.proj" (default targets).


Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:00.54

@AndyGerlicher this behavior might bump the priority of fixing the .NET Core on Windows implementation for #1401 . . . which we still don't know how to do :(

@rainersigwald
Copy link
Member

Closing as a duplicate of #1401. Thanks for reporting, @kzu.

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

No branches or pull requests

3 participants