The “EnsureBindingRedirects” task failed unexpectedly

后端 未结 14 2156
甜味超标
甜味超标 2021-02-06 20:56

When I create new ASP.NET 4.5 web forms application from vs2012 and update all nuget packages, I receive this error on build:

14条回答
  •  广开言路
    2021-02-06 21:53

    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)

提交回复
热议问题