I am attempting to transform my Web.config file to add rewrite rules for release builds, but I'm getting an intellisense error.
The 'http://schemas.microsoft.com/XML-Document-Transform:Transform' attribute is not declared.
Web.Release.config
It seems to compile okay without errors. But when I attempt to Publish, I do get build errors:
No element in the source document matches '/configuration/system.webServer/rewrite'
The 'http://schemas.microsoft.com/XML-Document-Transform:Transform' attribute is not declared.
The first line above is an error, while the second one is a warning. Why doesn't this work?
Note that the top of my Web.config does include the line <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
UPDATE:
The build error when deploying turned out to be caused by something else. So, in fact, it does build okay and I can deploy. So at this point, the question is just about why this Intellisense error/warning is appearing.
<add xdt:Transform="RemoveAll" />
before you do therewrite
? Else go to theXML menu
chooseschemas
and find forDotNetConfig.xsd
and choose use this schema. If this still doesn't work you could also try selecting theRazorCustomSchema.xsd
andEntityFrameworkConfig_6_1_0.xsd
schemas. If now it doesn't work, set in configuration the link as:xmlns="http://schemas.microsoft.com/XML-Document-Transform"
. Also if you use that link in the broswer you can seeThe resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
– Lorenalorene<configSections>
to theconfiguration
and also<connectionStrings>
– Lorenalorene