以下模块是在启用优化或没有调试信息的情况下构建的

发布于 2024-07-19 03:21:22 字数 132 浏览 10 评论 0原文

在调试时,我无法在 VS 2008 Web 项目中摆脱这个问题。 我已经检查过它在相关的非 Web 项目上处于调试模式,并且处于活动(调试)状态。 删除了 Windows 中 .NET 2.0 临时文件夹中的所有项目。 不知道在这里还能做什么。

I cannot get rid of this in my VS 2008 web project when debugging. I've checked that it's in debug mode on the non-web project in question and it's in Active(Debug). Deleted all items in my .NET 2.0 temp folder in Windows. Not sure what else to do here.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(30

诺曦 2024-07-26 03:21:22

尝试在工具/选项/调试/选项中禁用“仅启用我的代码”。

Try disabling "Enable Just My Code" in Tools/Options/Debugging/Options.

最冷一天 2024-07-26 03:21:22

我遇到了同样的问题,并发现我没有在构建中输出调试信息。 如果右键单击项目并转到“属性”,然后选择“构建”选项卡,页面底部有一个“高级...”按钮,它将显示输出调试信息的设置。 将其设置为“完整”,错误就会消失。

在此处输入图像描述

I had the same problem and discovered that I wasn't outputting my debug info on my build. If you right click on the project and go to 'properties', then select the 'build' tab, on the bottom of the page there's an 'Advanced...' button that will display your setting for you output debug info. Set that to 'full' and the error should go away.

enter image description here

乙白 2024-07-26 03:21:22

我刚刚遇到这个问题,并很快决定发布的其他答案不适用于我。

disable

我是该项目的所有者,我知道它是使用调试信息构建的,并且没有优化。 此外,我从来不高兴选择禁用警告作为我的第一选择。 隐藏/忽略此警告可能会成为未来调试会话中的问题。

由于这种情况仅在我签署程序集后才开始发生,这给了我线索我的快速修复:暂时删除 DLL 的强名称(以及使用 EXE)。 瞧! 问题解决了。

更好的长期解决方案可以采取添加构建后操作来更新 GAC 因此它具有最新版本的签名 DLL。

但现在,我很高兴从这个转移中继续前进,并继续解决使我进入此调试会话的问题。

I just ran into this issue, and quickly decided that the other answers posted didn't apply to me.

disable

I'm the owner of the project, and I know it was built with debug information, as well as without optimizations. Furthermore, I'm never happy choosing the disabling of a warning as my first choice. Hiding/ignoring this warning could become an issue in a future debugging session.

Since this only started occurring after I signed the assembly, this clued me in on my quick fix: temporarily remove the strong name of my DLL (and consuming EXE). Voila! Problem solved.

A better, long-term solution, could take the form of adding a post-build action to update the GAC so it has the latest version of the signed DLL.

But for now, I'm happy to move on from this diversion, and continue working on the issue that brought me to this debugging session.

合久必婚 2024-07-26 03:21:22

解决。 删除了所有出现问题的 dll(所有项目)。

resolved. Deleted all occurences (all projects) of the dll in question.

鸢与 2024-07-26 03:21:22

VS2012,清理和重建为我解决了这个问题。 “属性”-> “构建”-> 优化代码未选中。 “属性”-> “构建”-> “高级”-> 调试信息:完整

VS2012, clean and rebuild fixed the issue for me. "Properties" -> "Build" -> Optimize code is unchecked. "Properties" -> "Build" -> "Advanced" -> Debug Info: Full

蔚蓝源自深海 2024-07-26 03:21:22

查看此链接

http:// /social.msdn.microsoft.com/Forums/en-US/vsdebug/thread/43cb16ba-0759-42ab-8e7d-9f168ace3b6f

尝试取消选中“工具”->“选项”->“调试”中的“仅我的代码”- >一般。

这个对我有用

Check out this link

http://social.msdn.microsoft.com/Forums/en-US/vsdebug/thread/43cb16ba-0759-42ab-8e7d-9f168ace3b6f

try unchecking "Just My Code" in Tools->Options->Debugging->General.

it works for me

不如归去 2024-07-26 03:21:22

猜测 VS 2008 没有正确重建 dll。

1)删除所有出现的dll

2)重建解决方案

这应该修复它。

Guessing VS 2008 is not rebuilding the dll correctly.

1) Delete all occurrences of the dll

2) Rebuild solution

And that should fix it.

我的影子我的梦 2024-07-26 03:21:22

检查您的构建配置选项。 确保关闭优化并定义 DEBUG 常量。

Check your build configuration options. Make sure optimizations are turned off and the DEBUG constant is defined.

指尖凝香 2024-07-26 03:21:22

如果其他一切都失败,请尝试重命名项目属性中的程序集名称。 这为我解决了这个问题。

If everything else fails, try renaming the Assembly name in the project's properties. This fixed the issue for me.

假装不在乎 2024-07-26 03:21:22

我也遇到这个问题了,不知道什么原因,已经发生了三四次了; 我认为这一定是 Visual Studio 2005 的错误/小问题(或者至少是我的安装)。

这每次都有效:要修复它,我

  1. 右键单击我的解决方案,然后单击“属性”。
  2. 打开配置管理器。
  3. 在下拉菜单中选择“调试”(如果尚未选择)。
  4. 取消选中构建。 然后再检查一下。
  5. 重建解决方案。

I get this issue as well, for some reason it's happened 3 or 4 times; I think it must be a Visual Studio 2005 bug/hick up (or at least my installation).

This has worked every time: to fix it I

  1. Right click on my solution and click Properties.
  2. Open Configuration Manager.
  3. Select Debug in the drop down menu (if not already selected).
  4. Uncheck BUILD. Then re-check it.
  5. Rebuild the solution.
残月升风 2024-07-26 03:21:22

工具> 选项> 调试> 符号> 指定排除的模块
查看 dll 或 exe 是否在排除模块列表中

Tools > options > Debugging > Symbols > Specify excluded modules
look that if the dll or the exe in the excluded modules list

养猫人 2024-07-26 03:21:22

至少对于非网络应用程序来说这是有效的:

来自:http://www.stellarpc.com/articles/board.aspx?id=40

2 - 允许调试...

由于应用程序中构建了其中一个程序集的性质,您将需要更改一些设置以允许 Visual Studio 调试器处理代码。

从解决方案资源管理器中右键单击任何有问题的项目,然后选择“属性”。 这将打开项目属性面板,让我们可以访问项目的大量选项。 导航到“Complile”选项卡(如果您在 C# 环境中,则导航到“Build”),然后从屏幕底部选择“Advanced Compile Options...”。 这向我们提供了一个提示,其中包含两个关键区域:

1) 优化 - 取消选中“启用优化”

2) 生成调试信息 - 确保该选项设置为“完整”

At least for non-web applications this works:

From: http://www.stellarpc.com/articles/board.aspx?id=40

2 - Allow Debugging...

Due to the nature in which one of the assemblies has been built in your application, you will need to change a few settings to allow the code to be handled by the Visual Studio Debugger.

Right click on any project in question from the solution explorer and select 'Properties'. This will open up the project properties panel giving us access to a great many options for our projects. Navigate to the 'Complile' Tab (or 'Build' if your in a C# environment) and select 'Advanced Compile Options...' from the bottom of the screen. This presents us with a prompt that has two key areas of interest:

1) Optimizations - uncheck 'Enable Optimizations'

2) Generate debug info - Ensure that the option is set to 'Full'

生活了然无味 2024-07-26 03:21:22

我在某个文件夹中的解决方案中遇到了这个问题,但如果我将其移动到另一个文件夹或其他人构建它,我没有收到该消息。 我进行了清理、重建,甚至重新启动,但如果没有此消息,仍然无法让原始版本进行调试。 我在系统中搜索了导致错误的文件副本,发现副本保存在

c:\User\username\AppData\Local\Assembly\dl3

中。这是在 Win7-64 上,但在其他 Windows 操作系统上也类似。 我删除了在那里找到的所有副本,并且不再收到该消息。 我不需要取消选中“仅启用我的代码”。

另外,这是针对 WPF 应用程序的,但我在搜索中遇到了这个线程,因此希望这对其他人有帮助。

I had this issue with a solution in a certain folder, but if I moved it to another folder or others built it, I didn't get the message. I did the clean, rebuild, and even rebooted and still couldn't get the original to debug without this message. I searched my system for copies of the file causing the error and I found that copies were kept in

c:\User\username\AppData\Local\Assembly\dl3

This was on Win7-64 but will be similar on other Windows OSes. I deleted all of the copies I found there and I no longer get the message. I didn't need to uncheck the "Enable Just My Code".

Also, this was for a WPF app, but I came across this thread in my search so hopefully this will help someone else.

寄与心 2024-07-26 03:21:22

我能够通过以下步骤解决此问题:

  1. 右键单击​​解决方案(而不是项目),然后选择“属性”
  2. 在左侧面板中,选择“配置属性”
  3. 在右侧面板中,选择“调试”项目的“配置”列

如果您没有看到解决方案资源管理器中列出的解决方案,请按照下列步骤操作:

  1. 在菜单栏中,转到“工具”->“解决方案”。 选项
  2. 在左侧面板中,选择“项目和解决方案”(您可能需要选中窗口左下角区域的“显示所有设置”
  3. 在右侧面板中,选中“始终显示解决方案”

我希望这会有所帮助。

I was able to resolve this issue by following these steps:

  1. Right-click on the Solution (not the Project), and select 'Properties'
  2. In the left panel, select 'Configuration Properties'
  3. In the right panel, select 'Debug' under the 'Configuration' column for your project

If you do not see the Solution listed in Solution Explorer, follow these steps:

  1. In the menu bar, go to Tools -> Options
  2. In the left panel, select 'Projects and Solutions' (you may need to check 'Show all settings' at the bottom-left area of the window
  3. In the right panel, check 'Always show solution'

I hope this helps.

久夏青 2024-07-26 03:21:22

这些我也都有。 而我已经完成了这一切。 看来每次我从源代码管理中获取整个解决方案的新副本时都会发生这种情况。 因此,如果我们完成了所有这些操作,删除了 dll 和 Web 项目中所有引用(程序集)的 .pdb 文件,在解决方案上使用了 clean 选项,删除了临时文件,关闭了 VS 并重新打开,确保选择了调试模式并将其设置为完全并且优化已关闭,更多的是那里?!?!?!

I too have all these. And I've done all this. It appears this happens to me every time I get a fresh copy of the entire solution out of source control. So if we've done all these, deleted dlls & .pdb files for all references (Assemblies) in the web project, used the clean option on the solution, deleted temp files, closed out VS and reopened, made sure debug mode is selected and set at full and optimations are off, what more is there?!?!?!

自控 2024-07-26 03:21:22

我在 Visual Studio 2010 中的 Web 项目中遇到了同样的问题,最后我找到了收到此消息的原因。 我所做的是更改 Visual Studio 上的现有调试选项:

  • 转到工具->选项->调试->符号->所有模块
  • 选中“除非排除”单选按钮
  • 单击链接“指定排除的模块” ”,然后删除要调试的 DLL。

就我而言,这是我的 web dll 文件......

I had the same issue on my web project in Visual Studio 2010, and finally I found the reason why I was getting this message. What I did was to change an existing debugging option on Visual studio:

  • Go to Tools->Options->Debugging->Symbols->All modules
  • Check the "unless excluded" radio button
  • Click on the link "Specify excluded modules", then remove the DLL that you want to debug.

In my case it was my web dll file...

总攻大人 2024-07-26 03:21:22

当我尝试远程调试属于不同子网的计算机上的应用程序时,我遇到了这个问题。 如果机器位于同一子网上,则在通过网络运行代码时,我能够调试并单步执行代码。 更改子网后,尽管我在从网络运行时无法单步执行,并收到“以下模块是在启用优化或没有调试信息的情况下构建的”。

解决方案? 简单的。 将构建的解决方案复制到托管远程调试的计算机并在本地运行。

I had this when trying to remote debug an application on a computer that belongs to a different subnet. I was able to debug and step through the code when running it across the network if the machines were on the same subnet. After changing the subnet though I was unable to step through when running from the network and was getting the "The Following Module was built either with optimizations enabled or without debug information".

The solution? Easy. Copy the built solution across to the machine hosting the remote debugging and run it locally.

凉月流沐 2024-07-26 03:21:22

我在 VS 2010 winForms 项目中遇到过这种情况。 看到这里的大多数人都有网络项目,我认为这与访问存储项目的文件夹有关。 我这样说是因为当我遇到这个问题时,Google Drive 正在同步我保存项目的文件夹。 看来仅仅禁用同步并不能解决问题。

我的解决方案类似于上面的答案之一:

  • 转到“项目属性>编译>高级编译选项”选中
  • “启用优化”
  • 将“常规调试信息:”设置为“无”
  • 未选中“定义调试常量”
  • 并按“确定
  • ”然后返回并将选项恢复到初始状态。

希望这对某人有帮助,因为这种情况似乎仍然会发生。

Had this happen to me on a VS 2010 winForms project. Seeing that the majority of people here have web projects, i think that it has to do with access to the folder in which the project is stored. I say this because when this problem occurred to me Google Drive was synchronizing the folder in which i keep my projects. It seems that just disabling the synchronization does not fix the problem.

My solution is similar to one of the answers above:

  • Went to "Project Properties > Compile > Advanced Compile Options"
  • Checked "Enable optimization"
  • Set "General debug info:" to "None"
  • Unchecked "Define DEBUG constant"
  • And pressed OK
  • Then went back and returned the options to their initial state.

Hope this helps someone as it seems this still happens.

橘虞初梦 2024-07-26 03:21:22

请遵循以下步骤:(首先停止调试)

1:右键单击项目解决方案名称项目 -> 属性

2:在配置属性下选择配置管理器

3:将配置更改为调试并单击关闭

4:将配置更改为调试,然后单击应用-> 好的

现在重建解决方案......!

Follow this : (first STOP debuging)

1:right click on project solution name or project -> Properties

2:under Configuration Properties select configuration Manager

3:Change configuration to debug and click on close

4:Change configuration to debug and click on Apply -> OK

Now rebuild solution....!

茶色山野 2024-07-26 03:21:22

对我来说,检查项目属性中的“优化代码”框,保存,取消选中它,然后重新保存对我来说是这样。

禁用“仅启用我的代码”也有效,但这更多的是一种解决方法而不是修复方法,因为我不想要该设置。

For me, Checking the "Optimize code" box in the project properties, saving, unchecking it, then resaving did it for me.

Disabling "Enable Just My Code" also worked, but that was more of a work-around than a fix as I didn't want that setting.

〃温暖了心ぐ 2024-07-26 03:21:22

我遇到了同样的问题,但原因和解决方案不同。
该窗口与 Gustavo 显示的窗口(上图)相同,但路径位于:
“\users\zzz\AppSettings...”(其中 zzz 是 Windows 用户名)

我有一个 Excel 插件 - 我正在测试插件的安装,所以我通过 VS 安装功能安装了一个副本。 VS 显然正在尝试调试已安装的副本和我刚刚启动的副本,并且在已安装的副本上找不到调试符号。

上述解决方案均无效(无副作用),

解决方案:
卸载插件并手动删除应用程序设置中的文件是有效的。

I have had same problem, but with different cause and solution.
The window was the same as that shown by Gustavo (above) but the path was in:
"\users\zzz\AppSettings..." (where zzz is windows username)

I had an Excel addin - I was testing the install of the addin, so I had a copy installed through VS install function. VS was obviously trying to debug both the installed copy and the copy I had just launched, and could not find debug symbols on the installed copy.

None of the above solutions worked (without side affects),

SOLUTION:
uninstalling the addin, and manually deleting the files in App Settings worked.

薄凉少年不暖心 2024-07-26 03:21:22

有吗?

<compilation debug="true />

你提到这是一个网络项目......你的 web.config 中

You mentioned it's a web project...do you have

<compilation debug="true />

in your web.config?

夏天碎花小短裙 2024-07-26 03:21:22

使用发布配置构建后我遇到了同样的问题。
事实证明,当我切换回“调试”时,VS 没有检测到任何差异,因此它没有更新 bin 文件夹中的 .dll 和 .pdb 文件。

以下是对我有用的方法:

  1. 运行 iisreset (清理临时文件夹)
  2. 保存 web.config (强制 VS 实际重建)
  3. 调试时重建
  4. 启动项目

I had the same problem after building with a Release configuration.
It turned out that when I switched back to Debug, VS wasn't detecting any differences, so it was not updating the .dll and .pdb files in the bin folder.

Here's what worked for me:

  1. Run iisreset (to clean up the temporary folders)
  2. Save the web.config (to force VS to actually rebuild)
  3. Rebuild on Debug
  4. Start the project
绅刃 2024-07-26 03:21:22

尝试重建然后调试。

Try a rebuild then debug.

明月夜 2024-07-26 03:21:22

我的情况如下:webservice引用了lib1.dll。 后来我删除了参考,因为它不再使用。 但是 lib1.dll 仍保留在 bin 文件夹中。
由于未引用库,因此“重建”和“清理”操作没有帮助。
从 bin 文件夹中手动删除 lib1.dll 后,我就摆脱了这条消息。

My case is following: webservice referenced lib1.dll. Later I removed reference as it was no longer used. However lib1.dll remained in the bin folder.
Because library was not referenced then Rebuild and Clean actions were not helpful.
After manually deleting lib1.dll from bin folder I've get rid of this message.

波浪屿的海角声 2024-07-26 03:21:22

如果您要发布到 IIS 并且不使用内置 Web 服务器(或 IIS Express),请确保您的发布配置文件设置处于调试模式。 在 vs 11 中默认处于发布模式。

If you are publishing to IIS and not using built in web server -or IIS express- make sure that your publish profile settings is in debug mode. In vs 11 by default it's in release mode.

沩ん囻菔务 2024-07-26 03:21:22

只是补充一下,我正在查看此博客以找到我所面临的同一问题的解决方案。 不幸的是,上面提到的解决方案对我没有帮助。 最后我发现,我是通过安装程序安装我的位(以及 .pdb)并在安装文件夹上显式设置权限。

因此,即使文件浏览器显示正确的文件,VS 也无法加载 pdb,但它给出了上述相同的错误。

当我取消选中“仅启用我的代码”并从安装程序中删除权限设置后,VS 开始加载模块。

Just to add, I was looking at this blog to find the solution to the same problem I was facing. Unfortunately the solutions mentioned above didn't help me. At last I figured out, I was installing my bits (along with .pdb) through installer and setting permission explicitly on the installation folder.

Because of which VS was not able to load the pdb even though the file browser was showing the correct file but it was giving the same error mentioned above.

Once I unchecked "Enable Just my code" and removed permission settings from the installer, VS started loading the module.

绅士风度i 2024-07-26 03:21:22

对我有用的一个配置是以下

项目 --> (您的项目)属性 --> 调试选项卡
确保配置设置为活动(调试)
在“无法调试器”下,确保选中“启用非托管代码调试”

The one configuration that worked for me was the following

Project --> (Your Project) Properties --> Debug Tab
make sure Configuration is set to Active (Debug)
Under "Unable Debuggers", make sure "Enable unmanaged code debugging" is checked

慢慢从新开始 2024-07-26 03:21:22

我正在创建一个 Windows 服务,以下是对我有用的方法:

  • 卸载该服务。
  • 打开命令提示符并转到 c:\Windows\Microsoft.NET\Framework64\v4.0.30319
  • installutil C:\MyFantabulusWindowService\bin\Debug\MyFantaulusWindowService.exe

伟大已经实现!

I'm creating a Windows Service and here's what worked for me:

  • Uninstall the service.
  • Open a command prompt and go to c:\Windows\Microsoft.NET\Framework64\v4.0.30319
  • installutil C:\MyFantabulusWindowService\bin\Debug\MyFantabulusWindowService.exe

Greatness has been achieved!

悍妇囚夫 2024-07-26 03:21:22

案例:在 SharePoint 开发中使用控制台项目测试程序集 - 如果您正在进行 SharePoint 开发并在 VS 中看到此警报,请确保在测试控制台应用程序之前将 SP 程序集部署到 GAC(如果您的核心 SP 项目具有您需要的方法)调用您的控制台测试应用程序。

Case : testing assembly with Console project in SharePoint development - if you're doing SharePoint development and seeing this alert in VS, make sure you deploy your SP assembly to the GAC before testing your console app IF your core SP project has methods you need to call in your console test app.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文