question

Dan Nottingham avatar image
Dan Nottingham asked

Build errors (MSB4018) with VS2019 version 16.10

Hi,

We have an Azure Functions project using PlayFabSDK, which was working fine in VisualStudio 16.9.6. Recently a few of us updated VS to 16.10.0 and started getting the following build error:

1>Build FAILED.
1>
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1809,5): error MSB4018: The "CombineTargetFrameworkInfoProperties" task failed unexpectedly.
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1809,5): error MSB4018: System.Xml.XmlException: The '+' character, hexadecimal value 0x2B, cannot be included in a name.
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1809,5): error MSB4018:    at System.Xml.XmlConvert.VerifyNCName(String name, ExceptionType exceptionType)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1809,5): error MSB4018:    at System.Xml.Linq.XName..ctor(XNamespace ns, String localName)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1809,5): error MSB4018:    at System.Xml.Linq.XNamespace.GetName(String localName)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1809,5): error MSB4018:    at System.Xml.Linq.XName.Get(String expandedName)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1809,5): error MSB4018:    at Microsoft.Build.Tasks.CombineTargetFrameworkInfoProperties.Execute()
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1809,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1809,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
1>    0 Warning(s)
1>    1 Error(s)

After turning on some more verbose build logging, it looks like the error is due to the TargetFrameworks tag in PlayFabSDK.csproj

<TargetFrameworks>netstandard2.0;netstandard1.1;net45;portable45-net45+win8+wpa81</TargetFrameworks>

Removing "portable45-net45+win8+wpa81" from that list fixed our build errors, and didn't seem to cause any other problems.

  • Is this a wider/known issue, or something unique to our project setup/configuration?
  • Is there a more correct fix?
  • Will PlayFab address it in a future release?

Thanks,

Dan Nottingham

sdks
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Sarah Zhang avatar image
Sarah Zhang answered

Thanks for the sharing. After testing, we found that the PlayFab SDK NuGet package won't cause this issue, you can try to import the PlayFab SDK NuGet Package to your project.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.