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

Almost empty Strings.resx fails GenerateResources in .NET Core MSBuild #1661

Closed
colltoaction opened this issue Feb 2, 2017 · 7 comments
Closed

Comments

@colltoaction
Copy link

Copy from dotnet/buildtools#1315

I'm writing this PR, and if you look at the OSX and Linux CI builds they fail with the following error, but the Windows build doesn't:

..../tools/Microsoft.Common.CurrentVersion.targets(2718,5): error MSB3554: Cannot write to the output file "..../bin/obj/Unix.AnyCPU.Debug/System.Data.Odbc/netcoreapp/Resources.Strings.resources". Positive number required. [..../src/System.Data.Odbc/src/System.Data.Odbc.csproj]
..../tools/Microsoft.Common.CurrentVersion.targets(2718,5): error MSB3554: Parameter name: bufferSize [.../src/System.Data.Odbc/src/System.Data.Odbc.csproj]

For it to work, I just have to add at the very end of the Strings.resx file one <data> element as:

  <data name="something" xml:space="preserve"><value>something.</value></data>

Having different behavior makes writing cross-platform code more difficult.

Thanks!

@Petermarcu
Copy link
Member

This happens to me on Windows as well when doing things from the command-line. So the MSBuild that is part of the CLI has this bug, regardless of OS.

@Petermarcu Petermarcu added this to the Visual Studio 15 RTW milestone Feb 2, 2017
@Petermarcu
Copy link
Member

This will be an issue for anyone trying to do CI for their projects using the CLI.

@rainersigwald
Copy link
Member

Per .NET Core Tooling standup (JoC and @MattGertz), since there's a workaround this doesn't meet the RTW bar.

@rainersigwald rainersigwald modified the milestones: MSBuild 15 Update, Visual Studio 15 RTW Feb 3, 2017
@Petermarcu Petermarcu changed the title Almost empty Strings.resx breaks build on OSX and Linux Almost empty Strings.resx breaks build from the command line tools Feb 3, 2017
@Petermarcu
Copy link
Member

I updated the title to make sure people know this is on all OS's from the command line.

@colltoaction
Copy link
Author

NP. I got confused because of our own CI setup.

@rainersigwald rainersigwald changed the title Almost empty Strings.resx breaks build from the command line tools Almost empty Strings.resx fails GenerateResources in .NET Core MSBuild Feb 3, 2017
@Sarabeth-Jaffe-Microsoft Sarabeth-Jaffe-Microsoft modified the milestones: MSBuild 15 - "2.0", MSBuild 15 Update Mar 10, 2017
@tannergooding
Copy link
Member

tannergooding commented Mar 30, 2017

Also being hit in Roslyn. For example, dotnet/roslyn#18285 failed with it on this job: https://ci.dot.net/job/dotnet_roslyn/job/master/job/ubuntu_16_debug_prtest/1057/

@rainersigwald
Copy link
Member

Using AlmostEmptyResx.zip, I can reproduce this on my machine with .NET Core SDK 1.0.4 (MSBuild 15.1.1012.6693), but not with .NET Core SDK 2.0.0-preview2-006479 (MSBuild 15.3.388.41745).

MSBuild didn't change, so I bet this is because the new SDK ships with the fix for dotnet/corefx#19190.

Please comment here if you see this on a 2.0 dotnet and we can reopen and investigate.

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

No branches or pull requests

6 participants