When I create new ASP.NET 4.5
web forms application from vs2012
and update all nuget
packages, I receive this error on build:
Update Microsoft.Bcl.Build
to fix this.
Run this on Package Manager console:
Update-Package Microsoft.Bcl.Build
My problem was due to an appSettings value in web.config which contained a url with a & character.
The following steps can be performed to solve the issue:
<dependentAssembly>
add the following key-value pair: culture="neutral"
to <assemblyIdentity ... />
.I hope this helps.
I had a similar issue but mine was caused by having xml transform directives in web.config
Error The "EnsureBindingRedirects" task failed unexpectedly. System.Xml.XmlException: 'xdt' is an undeclared prefix. Line 27, position 59. at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.Throw(String res, String arg, Int32 lineNo, Int32 linePos)
I had copied and pasted an appsetting from one of the transforms. The solution was to remove the transform attributes
(granted this is not the exact issue the OP had, but could help someone else)
For me it happened because App.Config wasn't in the folder and there were other app.configs meant for different env. So I copied it.
A new version of Microsoft.Bcl.Build (1.0.6) has been pushed up to NuGet.org to fix this problem. The workaround to add the culture to the assemblyIdentity is no longer necessary but won't hurt if you leave it in.