Web.config中的奇怪警告

Nat*_*nSr 7 .net web-config visual-studio-2013

一张图片值1000字,所以这里有几张图片(忽略我的编辑):

警告1

警告2

警告3

我在此解决方案中的任何项目中都没有引用或使用Entity Framework.在我安装了一堆Windows更新后,这种情况刚刚开始发生.共有九个警告.我正在运行Windows 8.1 Pro,但我不知道这是否重要.我在同一解决方案中有其他项目,具有相同的项目类型和.NET框架版本.该项目本身似乎在IIS中运行良好.我的所有Web.config文件都具有类似的配置和结构.这是有问题的(更多编辑):

<?xml version="1.0"?>
<configuration>
    <configSections>
        ...
    </configSections>
    ...
    <connectionStrings>
        ...
    </connectionStrings>
    <system.web>
        <compilation debug="true" targetFramework="4.5.1"/>
        <authentication mode="None"/>
        <sessionState mode="Off"/>
        <customErrors mode="RemoteOnly"/>
        <httpRuntime enableHeaderChecking="false" enableVersionHeader="false" requestValidationMode="2.0" sendCacheControlHeader="false" targetFramework="4.5.1"/>
    </system.web>
    <system.webServer>
        <httpErrors existingResponse="PassThrough"/>
        <validation validateIntegratedModeConfiguration="true"/>
        <handlers>
            <remove name="ExtensionlessUrlHandler-Integrated-4.0"/>
            <remove name="OPTIONSVerbHandler"/>
            <remove name="TRACEVerbHandler"/>
            <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0"/>
        </handlers>
        <staticContent>
            <clientCache cacheControlMode="UseMaxAge" httpExpires="7.00:00:00"/>
        </staticContent>
        <urlCompression doStaticCompression="true" doDynamicCompression="true" dynamicCompressionBeforeCache="true"/>
        <defaultDocument>
            <files>
                <clear/>
            </files>
        </defaultDocument>
    </system.webServer>
    <system.runtime.caching>
        <memoryCache>
            <namedCaches>
                ...
            </namedCaches>
        </memoryCache>
    </system.runtime.caching>
    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <dependentAssembly>
                <assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
                <bindingRedirect oldVersion="0.0.0.0-5.6.0.0" newVersion="5.6.0.0"/>
            </dependentAssembly>
            <dependentAssembly>
                <assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
                <bindingRedirect oldVersion="0.0.0.0-5.6.0.0" newVersion="5.6.0.0"/>
            </dependentAssembly>
            <dependentAssembly>
                <assemblyIdentity name="Microsoft.ServiceBus" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
                <bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.2.0.0"/>
            </dependentAssembly>
            <dependentAssembly>
                <assemblyIdentity name="System.Spatial" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
                <bindingRedirect oldVersion="0.0.0.0-5.6.0.0" newVersion="5.6.0.0"/>
            </dependentAssembly>
        </assemblyBinding>
    </runtime>
</configuration>
Run Code Online (Sandbox Code Playgroud)

Nat*_*nSr 10

我仍然不确定如何,但我设法通过删除Web.config及其转换并重新创建它来"修复"该问题.之后我做了一个差异,并没有看到任何可能导致此类警告的差异.我想我可以把它归结为某种奇怪的缓存问题.

  • 有一个相同的问题,截至屏幕截图中的错误.通过从项目中排除web.config并重新包含它来"解决"它.不需要删除和重新创建. (6认同)
  • 完全相同的事情为我解决了它。排除然后重新包含。 (2认同)