markmcdowell / NLog.Targets.ElasticSearch

NLog target for Elasticsearch
MIT License
176 stars 89 forks source link

Invalid xsi:type 'http://www.nlog-project.org/schemas/NLog.xsd:ElasticSearch' #162

Closed LinchaiTheShinigami closed 11 months ago

LinchaiTheShinigami commented 2 years ago

On my Visual Studio Editor I get a warning.

This is an invalid xsi:type 'http://www.nlog-project.org/schemas/NLog.xsd:ElasticSearch'.

Which impacts on a line with the format below:

<target xsi:type="ElasticSearch" layout="${logger} | ${threadid} | ${message}" >

I provide a schema location:

<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd http://www.nlog-project.org/schemas/NLog.xsd">

Is there an alternative xsd file to reference to or am I doing something wrong?

snakefoot commented 2 years ago

Do not think anyone has made a XSD-Schema for the ElasticTarget. The easy way of getting rid of the warning is changing xsi:type="ElasticSearch" to type="ElasticSearch" (removing xsi:-prefix).