Debugging Error Message of VS2005
-
Wednesday, January 25, 2006 4:43 AM
---------------------------
Microsoft Visual Studio
---------------------------
The following module was built either with optimizations enabled or without debug information:C:\Documents and Settings\Peter Peter\Local Settings\Application Data\assembly\dl3\GK36Y4X8.1TR\K1JO6NOP.P99\bc8980d3\f0e49e63_711dc601\MyResources.dll
To debug this module, change its project build configuration to Debug mode. To suppress this message, disable the 'Warn if no user code on launch' debugger option.
---------------------------
OK
---------------------------I didn't do anything but this error message come out from VS2005, I followed the "suggested" solution and of course, it doesn't work. Who know the reason of this strange message?
Thanks,
Answers
-
Tuesday, March 27, 2007 5:31 PMModerator
Just to clarify what Just my code means:
Just My code (to the CLR anyway) means there are no optimizations and the module was built with debug information. Normally this means the Debug configuration for a .NET project.
If you make a custom configuration make sure to:
For C#
- Turn off all optimizations (VS2005 - Project Properties - Build Tab - Uncheck Optimize code)
- Turn on full debug output (VS2005 - Project Properties - Build Tab - Click the Advanced button - pick Full on debug info drop down)
For VB.NET
- Turn off all optimizations (VS2005 - Project Properties - Compile Tab - Advanced Compile Options ... button - Uncheck Enable Optimizations)
- Turn on full debug output (VS2005 - Project Properties - Compile Tab - Advanced Compile Options ... button - pick Full on debug info drop down)
When running, make sure the correct PDB is loadable by the debugger. It should match the dll and be located somewhere on your symbol path or in the same directory as the dll.
All Replies
-
Wednesday, January 25, 2006 4:17 PMModeratorDo you know where 'MyResources.dll' is coming from?
-
Wednesday, January 25, 2006 5:12 PMMyResources.dll is actually another class library project in my solution.
-
Wednesday, February 08, 2006 2:35 PMI'm having the same issue, i've checked the project properties and its all set for debugging but I still get this issue. Did you find a resolution to the problem?
-
Wednesday, February 08, 2006 6:38 PMModeratorCan you give me any more information about how your assembly is being built and deployed? For instance, from the error message, it looks like MyResources is being deployed to a local GAC.
-
Sunday, February 12, 2006 10:56 AM
Hello, I have the same problem.
I created a new configuration (Debug_MR) for my solution and used the option to copy settings from an existing configuration (Debug).
I can go to any configuration of any the 68 projects in my solution, they all show (Debug and Trace constant ON) but I can not debug anypProject unless I change back to "Debug" Configuration". When using the 'Debug_MR' configuration, I get exactly the same error messsge.
What do I do wrong ?
Marc
-
Sunday, February 12, 2006 12:17 PM
Hi there,
I compared the output generated when building with configuration "Debug" with the output generated using a custom made configuration.
Even if 'Debug' and 'Trace' constants are enabled in the custom configuration, the Build-Process is started without the "/debug+" Option. If this one is missing, you can not debug your project.
You can enabled it again if you select the 'Advanced Option" in the Build-Tab of the Configuration-Dialog and then select "Debug-Info" full.
Unfortunately, this setting is not copied across when copying configurations.
Marc
-
Wednesday, March 29, 2006 7:00 AM
I got the same problem and now I have solved it.
That's because project files in your dictionary "/bin" is *.dll.
VS2005 needs *.pdb and *.dll.
You can solved it like this.
web project--property--referance
add referance--project
add you projects of other layer.
-
Thursday, April 27, 2006 12:22 PM
I too had a similar problem after installing Visual Studio.NET 2005 and converting a ASP.NET 1.1.4322 project to ASP.NET 2.0.50727 version Web Application Project.
First, I ensured that my .csproj file had the correct definitions like this:
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DefineDebug>true</DefineDebug>This still did not work, so after casting about for a while,
I went to the Main Menu in VS.NET 2005 where I selected:
Tools > Options > Debugging > General and unchecked the "Enable Just My Code (Managed only)" Checkbox.
This final action enabled debugging in this project.
Hope this helps
-
Monday, June 05, 2006 6:05 PMHi hrjordan,
you post was most helpful and helped me solve a problem I had been having all day.
Although I like it when problems are resolved I like it even more when I understand why I fixed, can you explain why unchecking the "Enable Just My Code (Managed Only)" made my project debug again.
Wayne -
Monday, June 05, 2006 9:58 PM
Wayne,
Sorry, but I don't have the answer either.
I'm glad it worked for you.
Harry
-
Tuesday, June 06, 2006 7:57 AM
Cheers Harry,
can anyone explain why this setting enables the debugging?
Wayne
-
Friday, June 16, 2006 4:00 PMThis option does nothing but get rid of the warning...
-
Wednesday, August 09, 2006 2:21 PMExactly, this option just gets rid of the message, you must have seen even when the message comes and you press 'OK' the application runs, so this option just removes the warning message. Doing this the problem is one cannot debug the application, if anyone can tell me how to debug the application after this message , then I am waiting eagerly for a reply.
-
Friday, August 25, 2006 11:22 PM
I myself found the solution to this, in my case it was happening because I was trying to debug a project the path of which was not the same as the dll which I was using in my application solution. So, in order to debug an additional project in the mai project its dll path should be same as the path of the project to be debugged.
Hope this helps someone.
-
Monday, September 18, 2006 5:58 PMThis was the solution that did the trick for me... I was googling this issue for days... Then I found your post...
-
Tuesday, September 19, 2006 11:55 AM
Even I suffered with this headache for days, after which I resolved this when I planned to arrange my solution items properly.
Good that the message helped someone.
-
Wednesday, September 27, 2006 1:44 PMI also had this error after moving a project within a solution from VS2003 to VS2005.
The solution was simple. Make a change in the code and compile and the error was gone. So VS2005 did not compile because there was no changes in code. I had some dll references pointing to a external .NET 1.1 that was not changed unitl explictly recompilation, that only took effect after I made a manually change in the code..... -
Saturday, September 30, 2006 10:52 AMYou are right. I copied the pdb along with the dlls to the Working driectory and i was able to debug normally. Thanks
-
Monday, January 08, 2007 9:07 PM
hrjordan wrote: I too had a similar problem after installing Visual Studio.NET 2005 and converting a ASP.NET 1.1.4322 project to ASP.NET 2.0.50727 version Web Application Project.
First, I ensured that my .csproj file had the correct definitions like this:
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DefineDebug>true</DefineDebug>This still did not work, so after casting about for a while,
I went to the Main Menu in VS.NET 2005 where I selected:
Tools > Options > Debugging > General and unchecked the "Enable Just My Code (Managed only)" Checkbox.
This final action enabled debugging in this project.
Hope this helps
This resolved my issue, which was caused will trying to "attach to process" ... the process is a Windows Service, and until I unchecked "Enable Just My Code (Managed only)" I could not debug the Service. This was from the Service project, the service had been compiled in Debug mode, and had a .PDB file in the directory I was starting it from. I had installed it using NET START and it was running ... I could see it in the "attach to process" list, but if I tried to attach to the process while that check box was checked I would get the error from the original post.
-
Thursday, February 01, 2007 12:24 PM
FYI...I got this error to. I had a .Net 2.0 executable using a .Net 2.0 Class Library. The error was thrown while debugging the .Net Executable using the .Net 2.0 Class Library.
However none of the suggested fixes in this thread did anything about the problem. The class library was in the GAC before. So, even though I had a project reference to the class library the debugger insisted on using the GAC version.
Hope this helps out someone in the future.
-
Tuesday, February 06, 2007 7:57 PM
Hi Exitboy,
So what do you suggest the class libraries should lie in GAC or not? Is it avisable?
RajKat
-
Tuesday, February 06, 2007 11:36 PM
This is the Ultimate answer guys:
I know this is dirty, but this certainly resolved all the issues. Firstly I do not know how this problem suddenly occurred. All I did was I added an already existing class library to my solution.
Resolution:
I had one client project and 5 different class assemblies in my solution, out of which 3 were building properly and only 2 giving error. So I planned to peep into the csproj file of my client project.
Looking into those 210 lines of junk, all was appearing as alien language and somehow fine to me. At the EOF, before the <Import Project> node another node of <ItemGroup> was there in which were listed the dll and exe paths of file which were giving the error(This node has child tag starting with Content), I simply deleted this <ItemGroup> node, and there it was, my application was back on path.
This solution did the wonder for me. Hope this help others too.
Cheers
-
Tuesday, February 27, 2007 11:48 PMThe truth is that in all probability you guys might unwittingly be running your projects in release mode instead of debug. Many developers don't know this but fortunately I found out while fiddling with the settings of VC# Express Edition. Select Tools->Options. In the Options dialog, there is a check box below that says 'Show all Settings'. Ensure that its checked. Next click on 'Projects and Solutions' within the dialog. On the right pane, ensure that 'Show advanced build configurations' is checked. This will allow you to select Debug or Release from the solution configurations combo box. Hope this helps...
-
Wednesday, March 07, 2007 5:16 AM
This is true..
It is gr8, solves the prob. dear..
thanking you.
vachan chauhan
-
Tuesday, March 13, 2007 2:17 PMThank you, your suggestion worked!
-
Thursday, March 22, 2007 10:16 AM
I did what you said above to uncheck the option, even though the error goes away now, the debug seems still not working. the breakpoint wasn't hit. My error message before I uncheck the option is
The following module was built either with optimization enabled or without debug information
c:\windows\assembly\GAC_MSIL\mydll\1.0.0.0dighud243\mydll.dll
The debug scenario is that I have this dll deployed on a remote sharepoint server, now I need to do a remote debugging to find out what's wrong. I attached to process w3wp.exe and if "Just in my code" option is checked, above error appears when attaching to w3wp.exe, if that option is unchecked, no error message, but debugging won't hit any breakpoint. It just doesn't work!
Anyone help me plz! BTW, I do have my dll and pdb in the same working folder and my dll is deployed on remote GAC
-
Tuesday, March 27, 2007 5:31 PMModerator
Just to clarify what Just my code means:
Just My code (to the CLR anyway) means there are no optimizations and the module was built with debug information. Normally this means the Debug configuration for a .NET project.
If you make a custom configuration make sure to:
For C#
- Turn off all optimizations (VS2005 - Project Properties - Build Tab - Uncheck Optimize code)
- Turn on full debug output (VS2005 - Project Properties - Build Tab - Click the Advanced button - pick Full on debug info drop down)
For VB.NET
- Turn off all optimizations (VS2005 - Project Properties - Compile Tab - Advanced Compile Options ... button - Uncheck Enable Optimizations)
- Turn on full debug output (VS2005 - Project Properties - Compile Tab - Advanced Compile Options ... button - pick Full on debug info drop down)
When running, make sure the correct PDB is loadable by the debugger. It should match the dll and be located somewhere on your symbol path or in the same directory as the dll.
-
Thursday, March 29, 2007 10:50 AM1. Manually delete mydll.dll file from
c:\windows\assembly\GAC_MSIL\mydll\1.0.0.0dighud243\mydll.dll
To see this path in c:\windows\assembly folder complete this instructions:
http://blogs.compuware.com/cs/blogs/igoodsell/archive/2005/10/12/219.aspx
2. Deploy myddl.dll in GAC
-
Friday, May 04, 2007 4:51 PMI had the same problem with my Unit Test project referencing my business object project's dll. The problem was that my References was pointing to the release version of my business object project's dll instead of the debug one.
-
Friday, August 24, 2007 6:36 AMYou are right. I have already fixed this problem.
In VS2005, when we want to debug a DLL, we have to add both its DLL and its PDB (Program Debug Database) files.
* Project -> Add Reference
* Browse our DLL
* Rebuild our project -
Friday, August 24, 2007 3:16 PM
Thanks RajKat, you pointed me in the right direction. I had converted a website to a Web Project an IIS was still pointing at the website. I pointed the virtual directory to the new web project and all is well.
-G. Rousselle
-
Tuesday, August 28, 2007 3:36 AM
Its a pleasure that the solution helped you buddy ... -
Saturday, October 13, 2007 8:17 AM
Thought I'd write my issue that I had with this error message also incase it helps someone -
I had a class project as a reference in my web project and after updating it I didn't notice that it was failing to rebuild - it kept giving me this error for some reason - as soon as I fixed the errors in the class project, it went fine.
No explaination really but hope it helps.
-
Tuesday, October 30, 2007 10:07 PM
Yes, this gets rid of the nag message and will allow you to see debug info in a stack trace, however, it still does not allow me to step-into the code.
I am trying to step-into Microsoft.Practices.EnterpriseLibrary source code, but it will not go into code because it is saying that the code has been optimized or debug not enable. This of course is not true, I have Debug Info set to full in the build->advanced option.
Any other ideas? By the way, I do not see this namespace in the GAC, which I thought might be a place to start.
-
Friday, November 23, 2007 2:38 PM
I solved this problem this way:
Go to the .dll file directory path which is given in the error message. There you will find a .dll and .pdb file of one of your projects. Delete them both. Now go to the bin folder of your application directory and copy .dll and .pdb af the same project and paste is to the place where you deleted them. Now it should work.
Hope this helps.
Nader
-
Thursday, January 31, 2008 11:00 AM
Hi,
I was also getting the same error in my project. I don't know whether it will work for u or not, what I did , I just clean the solution containing different project. Right click the solution file and click on Clean Solution.
abhitutu
-
Friday, February 08, 2008 9:59 AMHi hrjordan,
your post was very useful and helped me solve a problem.
Thank you very much
Kumar PDV -
Sunday, February 17, 2008 11:37 PMYour referenced dll must match the same included project. If I am debugging a web project and I've included another project's dll, I not only have to make sure I include that project in my solution, but also that the dll I've included in my web project's references is the same dll that the other project is outputting.
So when I got that message I had this dll being referenced in my web project. I had the project that produces that dll in my solution but the dll I had referenced was from a different folder, not the bin folder of the included project so the assembly did not match that project in my web references.
I had to actually delete that .dll in my web references, then remove and readd the right dll from the other project's bin folder and it was fine after this. -
Monday, February 25, 2008 11:47 PM
MrReinhard had the correct solution for my problem ...thanks
/Johan
http://bolag.servando.se/Tj%c3%a4nster/Lagerbolag/tabid/174/Default.aspx
-
Tuesday, April 08, 2008 10:02 AMdont know if this is the correct way to do what i did to solve my issue but... in my case it was release mode giving me this error... after looking in the csproj i found this:
Code Snippet<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>..\Release\</OutputPath>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<BaseAddress>285212672</BaseAddress>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE</DefineConstants>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>false</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<NoStdLib>false</NoStdLib>
<NoWarn>
</NoWarn>
<Optimize>true</Optimize>
<RegisterForComInterop>false</RegisterForComInterop>
<RemoveIntegerChecks>false</RemoveIntegerChecks>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<DebugType>full</DebugType>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
I then went and found a known working project (from a collegue) and his csproj contained:
So, i backed up my original csproj file and swapped these lines over. After that i could fully debug in release mode and not have the error poping up everytime i tried to run it.Code Snippet<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
</PropertyGroup>
Heop this helps someone,
Piercy
-
Wednesday, April 09, 2008 5:11 AM
To solve this problem go to your folder of project ->
then right click ->properties ->
if there is read only checked then uncheck it ->
after that go to security tab and add machine users to all contolls and apply->
Click Add select user as everyone->ok -> and for everyone give full control then ->apply it and close it ->
now refresh your project solution with folders and run project with debugging -> it will work perfectly
-
Friday, April 11, 2008 5:50 AM
Hello RajKat
I have 3 layer in application........... UI, BI , DAL UI reference BI and BI reference DAL all in one soultion ...... I am getting an error
---------------------------
Microsoft Visual Studio
---------------------------
The following module was built either with optimizations enabled or without debug information:F:\KSE-TWS\KSE-TWS\bin\Debug\BusinessLayer.dll
To debug this module, change its project build configuration to Debug mode. To suppress this message, disable the 'Warn if no user code on launch' debugger option.
---------------------------
OK
---------------------------AND
Could not load file or assembly 'DAL , Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
Plz help in solving this issue .
Regards -
Friday, April 11, 2008 5:55 AM
Hello
I have 3 layer in application........... UI, BI , DAL UI reference BI and BI reference DAL all in one soultion ...... I am getting an error
---------------------------
Microsoft Visual Studio
---------------------------
The following module was built either with optimizations enabled or without debug information:F:\KSE-TWS\KSE-TWS\bin\Debug\BusinessLayer.dll
To debug this module, change its project build configuration to Debug mode. To suppress this message, disable the 'Warn if no user code on launch' debugger option.
---------------------------
OK
---------------------------AND
Could not load file or assembly 'DAL , Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
Plz help in solving this issue .
Regards -
Sunday, April 13, 2008 5:09 PMMicrosoft sucks man....
Hey ...Its Meee....I have been trying to reply to you since 2 days...and every time I clicked on reply, I was being signed out of forums. And now I have accessed the thread using firefox and clicked reply everything works fine....donno whats billy's team doing there at MS?..sometimes I wonder......why the hell I landed up working in MS technologies...
Anyway....the answer to your query...man...simplest and best way out is...rearrange the solution. Build each and every project assembly one by one with the referred ones built first. Then go to solution icon in solution explorer, right click and set project build order. If you are not using any external dlls and all dll are coming from assemblies from the current solution then work solution will work fine. Another thing to be sure abt is of building every project in debug mode. Then in referring project make sure you point to correct referred dll (i.e. you point to dll in debug folder of referref project and not release folder)
If the above said does not help you then get to my answer on Page 2 of this thread posted sometime in Feb 2007. Check for the assemblies in csproj file of main startup project.
HTH
-RajKat -
Friday, May 30, 2008 7:59 AMHi hrjordan,
Thank u for offering your info, and indeed it does work! The troublesome message disappeared.
In my country, there is a popular internet slang that "So goog so strong" to describe your help for us. Thank u. -
Monday, June 09, 2008 5:54 PMI ran into the same issue.
I had IIS set to another directory besides the working directory for my solution.
I use nant to build my projects and usually attach to the process to debug. When I tried to run from the IDE I got the error that I either have optimization or need to compile in debug mode.
Once I repointed IIS to my working dir it worked fine -
Monday, August 11, 2008 1:34 AMI was having this problem while trying to debug a web application. I had set a breakpoint in a class library project within my solution, but whenever I started the debugger the error was dispayed. I figured out the problem was that the different projects had different build output locations, and an old (release) build of the class library output was not being replaced in the bin folder of my web application. I just copied the new (debug) build, plus the .pdb, to the web app bin folder and everything worked as expected.
I hope this helps.- Edited by oroboros Monday, August 11, 2008 1:36 AM typo
-
Friday, October 10, 2008 12:03 PMHi,
I had the same problem. (couldn't debug over one library with this error message).
I thought it was because of changing to NET 1.1 to NET 2.0 or because of changing from VS2005 to VS2008.
But this was not the reason, at least not for me.
The reason was that i did not establish right (almost right, but at the end, not ok) the references in the updated/migrated VS proyects.
In my startup proyect (.exe) i had references to some others dlls developed by me (same solution).
Althoug debug mode of each of these dlls/projects was ok, i was not able to debug over one of the references/projects.
Well, reading these messages help me.
I could realize that in on of my references in the startup proyect(.exe) one of then pointed to RELEASE reference dll!!!. (instead of debug dll).
Oh, it was so easy and stupid thing. Just to establish ALL references of the start project to debug dll's.
Thanks to all for give me ideas to solve it.
-
Saturday, October 18, 2008 3:55 PMThanks a lot your solution worked for me :-)
-
Sunday, October 19, 2008 11:03 PMI had this issue and found a resolution for it:
The generic reason for this problem:
A project is referencing either a class library project or a .dll with its .pdb available. When the debugger starts another version of the .dll that is referenced is being chosen.
Ther reason in my case was because I had the dll registered in the GAC. Obviously there are numerous other reasons this could happen.
So to fix the problem, get rid of all the reasons that the wrong verison of the dll is being selected and everything will start to work again in debug mode.
Good luck!
-
Thursday, November 27, 2008 4:58 AMFor me even it allowed debugging also.
I am working on WCF application and I am passing objects to service from console client and
even after unchecking the option I am able to debug
Well Jordan your method was very helpful
Thanks
Prashant -
Friday, January 23, 2009 9:57 AMTry by resetting the iis
in the command prompt type iisreset
-
Wednesday, March 18, 2009 5:32 PM
-
Thursday, April 23, 2009 1:58 PM
Just to clarify what Just my code means:
Just My code (to the CLR anyway) means there are no optimizations and the module was built with debug information. Normally this means the Debug configuration for a .NET project.
If you make a custom configuration make sure to:
For C#
- Turn off all optimizations (VS2005 - Project Properties - Build Tab - Uncheck Optimize code)
- Turn on full debug output (VS2005 - Project Properties - Build Tab - Click the Advanced button - pick Full on debug info drop down)
For VB.NET
- Turn off all optimizations (VS2005 - Project Properties - Compile Tab - Advanced Compile Options ... button - Uncheck Enable Optimizations)
- Turn on full debug output (VS2005 - Project Properties - Compile Tab - Advanced Compile Options ... button - pick Full on debug info drop down)
When running, make sure the correct PDB is loadable by the debugger. It should match the dll and be located somewhere on your symbol path or in the same directory as the dll.
Thank You very much ! i had the problem and i didn't find where was the optimizations checkbox !!
-
Saturday, October 03, 2009 6:49 PMMy situation may be different from what the others experienced, but I have been having this problem for a long time and I've found a very simple solution. When this problem occurs, I just select the solution and select "Rebuild" and the problem goes away.
Chuck
Chuck -
Saturday, October 17, 2009 11:43 AM
This is a very elusive and frustrating problem and it is now occurring for me every time I make a change to the code I'm debugging. The problem can also be very difficult to solve because the same symptoms can be caused by different situations and the solution to the problem can be different depending on what situation caused the problem. Sometimes the solution is as simple as doing a rebuild of the entire solution; sometimes it is much more difficult than that. One of the frustrating things about this problem is that the same solution doesn't work all the time.
In general, this problem seems to occur most frequently when you're attempting to debug a DLL and, for whatever reason, the VS.Net debugger can't replace the DLL that it's trying to debug with the latest version. As a result the code in the installed DLL is out of synch with the code. In my situation, I'm debugging a Visio Add-in and Visio is holding on to the DLL and won't let go of it very easily to allow VS.Net to replace it - that can be a contributing factor to causing this problem.Here's a summary of what I've learned about this:
- In most cases the VS.Net option settings are not the problem because most people take the default settings and the default settings won’t cause this problem. If you haven’t changed the VS.Net option settings from their default values, I would leave them alone - it probably won't help.
- Try the simple solutions first – in many cases, just doing a rebuild of the entire solution will resolve the problem; in other situations, that solution won’t work and you have to do more than that
- If doing a rebuild of the solution doesn’t work, there’s probably a DLL somewhere on the system that is not being replaced that is causing the problem and you have to get rid of it, but getting rid of it may not be that easy to do and it may not be just the DLL in the error message that is causing the problem – it could be a DLL that has a dependency relationship to that DLL that is blocking it from being replaced. Here's the more difficult solution to this problem:
- Completely uninstall the application if it is installed
- Do a search on the system for any instances of all DLL’s associated with the application (not just the DLL that is mentioned in the error message) and delete them wherever they might be on the system (including the VS.Net bin directories)
- If any other applications are using the DLL’s, make sure that they have released them. (For example in my case, I am debugging a Visio Add-in and I need to remove the Add-in from Visio to make sure it gets replaced with a new version)
- Reboot the system - this can be a very important step - be sure not to skip over it
- If you’ve made a change in the software, make sure to bump the version number in the installer and the DLL assembly information to force the system to replace the old version with the new. Then reinstall the software if necessary.
This is a very cumbersome and time-consuming process and it can occur every time you make a change to the software and want to debug a new version. If anyone finds an easier method that works in all situations, please post it. Some of the solutions that have been mentioned in this thread may only obscure the real problem - for example, installing the DLL in the GAC probably works because the DLL in the GAC overrides the DLL that is really causing the problem. In my opinion, removing the DLL that is causing the problem is a better solution.
PS I am using VS 2008 - this thread was originally created regarding VS 2005 - the same problem exists in VS 2008.
Chuck- Proposed As Answer by Feroc Wednesday, February 17, 2010 12:12 PM
-
Monday, March 08, 2010 7:21 PM
I had the Same problem, I have been through this Thread, but I found out 1 more workaround.What I have done here is :I had my Dll registered in GAC, So when I debug it use to first look at GAC,and was raising its hand by saying "I CANT DEBUG", even though I have manually referenced the projectSo First I Have un registered that Dll Component from GAC, and tried to debug, Worked!- Umesh- Proposed As Answer by Aviw_ Sunday, October 09, 2011 8:20 PM
-
Tuesday, May 18, 2010 12:58 PMBut best prac is just removing signing . DLL which is deploted in GAC set its SNK to Blank this will work too.
-
Tuesday, June 08, 2010 8:26 AMI had this issue. What I found was proj file was looking into project1\bin folder instead of project1\bin\debug folder as it used to be (could be because someone in the team checked in the project file with that settings) It worked, after I copied the dll and pdb files from project1\bin\debug folder to project1\bin folder. It is more of a workaround.
-
Wednesday, January 26, 2011 7:02 PM
Got the same issue here. I was building a multiple projects solution in Visual Studio 2008 and the issue started when we were testing the localisation. The following message appears
The following module was built either with optimizations enabled or without debug information:
C:\Documents and Settings\happycujo\Local Settings\Application Data\assembly\01\Resources.dll
To debug this module, change its project build configuration to Debug mode. To suppress this message, disable the 'Warn if no user code on launch' debugger option.
It turned out that one of the project was creating a DLL (Sys.Resources.DLL) with the same name except for the case of a letter as one of our resource file (Sys.resources.DLL) ,. To resolve the issue, I renamed the project Sys.Res.DLL and that did the trick.
Hope this can help anyone out there because I spent quite a bit of time narrowing this issue.
Cheers!
-
Sunday, August 28, 2011 2:24 AM
For all those people who this post didnt' help try going to your tools/options/debugging/symbols and clear the
---->Cache symbols in this directory line<----
that worked for me.
-
Sunday, October 09, 2011 8:19 PM
My solution:
I've just add dll to GAC, because error statement contains path to it.
- Proposed As Answer by Aviw_ Saturday, December 24, 2011 7:32 AM
-
Friday, December 23, 2011 10:48 PM
Hello,
I got the same message pop up. The above tip helped me. Thank you so much

