【问题标题】:Symbol status showing "Skipped Loading" for dll in modules window?在模块窗口中显示 dll 的“跳过加载”的符号状态?
【发布时间】:2021-07-21 15:33:40
【问题描述】:

我最近将一些解决方案升级到 Visual Studio 2013。除了一个现在生成的解决方案之外,一切都很好:

模块“名称”的符号未加载。

...每次运行都会出错。

当我查看模块调试窗口时,我可以看到 dll(这是一个 Web 服务 dll)

Name           Path                       Optimised    User Code    Symbol Status
dllName.dll    Tempoary ASP.Net...etc.    Yes          No           Skipped Loading...

如果我查看\bin,我会看到dll,它对应的是.pdb 文件。

检查项目的构建菜单我可以看到Debug Info: full

长话短说,我觉得一切都很好,只是它没有加载任何符号。

知道我错过了什么吗?

更新

看起来如果我运行我的解决方案,虽然 IIS express 问题就消失了。但是通过 IIS (8) 运行我仍然有这个问题。

【问题讨论】:

    标签: c# iis visual-studio-2013 pdb-files


    【解决方案1】:

    在痛苦地比较了两个项目文件后,一个有效,一个无效,我注意到有效的项目有:

    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
        <DebugSymbols>true</DebugSymbols>
        <DebugType>full</DebugType>
        **<Optimize>false</Optimize>**
        <OutputPath>bin\</OutputPath>
        <DefineConstants>DEBUG;TRACE</DefineConstants>
        <ErrorReport>prompt</ErrorReport>
        <WarningLevel>4</WarningLevel>
      </PropertyGroup>
    

    和我一样

    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
        <DebugSymbols>true</DebugSymbols>
        <DebugType>full</DebugType>
        **<Optimize>true</Optimize>**
        <OutputPath>bin\</OutputPath>
        <DefineConstants>DEBUG;TRACE</DefineConstants>
        <ErrorReport>prompt</ErrorReport>
        <WarningLevel>4</WarningLevel>
    
      </PropertyGroup>
    

    通过将&lt;Optimize&gt; 属性设置为false,所有问题都消失了。

    这个answer also seems relevant作为.csproj.user文件可能不同步,我删除了它。

    【讨论】:

    • 我在模拟器中运行 azure 项目时遇到了同样的问题,而您删除 .csproj.user 的建议效果很好。
    • 如果你根本没有optimize 元素,你仍然会遇到这个问题;显然它默认为true。将 &lt;Optimize&gt;false&lt;/Optimize&gt; 添加到我的 csproj 后,我的符号开始正确加载。
    猜你喜欢
    • 2019-03-07
    • 2020-10-02
    • 1970-01-01
    • 2017-03-07
    • 2015-01-25
    • 1970-01-01
    • 2012-11-29
    • 2021-05-23
    • 2011-01-01
    相关资源
    最近更新 更多