I've got the following appsetings.json file:
{"ConnectionStrings": {"DefaultConnection": "Server=JUNGLE\\SQL2014DEV;Database=Bonus;Trusted_Connection=True;MultipleActiveResultSets=true","BonusContext": "Server=JUNGLE\\SQL2014DEV;Database=Bonus;Trusted_Connection=True;MultipleActiveResultSets=true" },"Logging": {"IncludeScopes": false,"LogLevel": {"Default": "Debug","System": "Information","Microsoft": "Information" } } }
However, an error occurs:
Error An error occurred during publish.
An error occurred while generating the publish appsettings file. System.ArgumentException: Unrecognized escape sequence. (40): {
"BonusContext" : "Server=JUNGLE\SQL2014DEV;Database=Bonus;Trusted_Connection=True;MultipleActiveResultSets=true"
}
at System.Web.Script.Serialization.JavaScriptObjectDeserializer.AppendCharToBuilder(Nullable`1 c, StringBuilder sb)
at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeString()
at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth)
at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeDictionary(Int32 depth)
at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth)
at System.Web.Script.Serialization.JavaScriptObjectDeserializer.BasicDeserialize(String input, Int32 depthLimit, JavaScriptSerializer serializer)
at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit)
at Microsoft.PowerShell.Commands.JsonObject.ConvertFromJson(String input, ErrorRecord& error)
at Microsoft.PowerShell.Commands.ConvertFromJsonCommand.ConvertFromJsonHelper(String input)
at Microsoft.PowerShell.Commands.ConvertFromJsonCommand.EndProcessing()
at System.Management.Automation.Cmdlet.DoEndProcessing()
at System.Management.Automation.CommandProcessorBase.Complete() System.Object[] BonusApp 0