8

A picture is worth 1000 words, so here are several pictures (ignore my redacting):

Warning 1

Warning 2

Warning 3

I am neither referencing nor using Entity Framework in any project in this solution. This just started happening as of Tuesday after I installed a bunch of Windows updates. There are nine warnings in total. I'm running Windows 8.1 Pro, but I don't know if that matters. I have other projects in the same solution with identical project types and .NET framework versions. The project itself appears to run just fine in IIS. All of my Web.config files have similar configuration and structure. This is the problematic one (more redacting):

<?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>
4

2 回答 2

11

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

于 2013-11-14T01:30:32.763 回答
0

我在 Visual Studio 2017 中搜索类似问题的解决方案时发现了这个老问题。接受的答案让我走上了正轨。这一定是缓存问题。再搜索一下 - 这是一个智能感知缓存问题。

Rick Strahl 有一篇关于此的非常好的文章

通过从解决方案中删除 .vs 文件夹解决了我的问题。.vs 文件夹是在 Visual Studio 2015 中引入的。所以这不是对这个问题的直接答案,而是对未来访问者的提示。

于 2019-06-26T11:35:13.640 回答