LNK1123 Error When Building Any Win32 Project - by StephenA

Status : 

  Not Reproducible<br /><br />
		The product team could not reproduce this item with the description and steps provided.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 674492 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 6/7/2011 12:53:53 PM
Access Restriction Public


If I try and build any Win32 project I always get the following error.

LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
Sign in to post a comment.
Posted by StephenA on 8/24/2011 at 2:18 AM
After a bunch of Windows updates had installed, I have been unable to reproduce this issue again. I can't tell which update caused the system to work properly.
Posted by Microsoft on 8/23/2011 at 9:36 AM
We're unable to proceed further without a way to reproduce this. I'm closing Won't fix.
Thanks, Dan
Posted by Microsoft on 8/4/2011 at 6:20 PM
After looking at the bug, I see that the repro project is attached. But, I am still not able to get the problem you have described to occur.

If we cannot determine anything from the trace, then the next course of action would be to attempt to capture a dump while link is running in your build.

If you already know how to setup the process to load under the debugger, please go ahead and do this and attach the dump file(s) you think are pertinent. If not, please let me know and I can help provide more information on how you would go about doing this.

Chuck England
Program Manager - VSPro
Posted by Microsoft on 8/4/2011 at 3:31 PM
First, a workaround would be to place the following in your project file:

Note that this will make your builds slower, as with Tracker turned off, you will not be performing and incremental build for that project. But, it will at least allow you to build in Visual Studio.

I noted that while on a 64-bit box, you are building Win32 Debug. And, Tracker.exe runs successfully for the prior CL calls in the build, based on the log.

I was unable to repro this. So, in order to make this bug actionable by us, we need something that allows us to see exactly what is going on. One suggestion would be to download Process Monitor from Windows Sysinternals (http://technet.microsoft.com/en-us/sysinternals/bb896645), and run a trace of the behavior. Since you are on a 64-bit box, please be sure to use the 64-bit version of the tool.

The log this can generate (and we want pretty much everything turned on) is pretty large. So, to minimize noise, and keep the file size as small as possible, would you please prepare everything, and even repro it once prior to running the trace. This way everything is nice and warm. Then, right before pressing the button to produce the problem, start recoding, and stop right after you finish. When you have it, please upload as an attachment to the bug.

By doing this, we may be able to determine what is going on, and help with the issue.

I also noticed that you mentioned Symantic EP. I don't know that this has anything to do with the issue. But, usually you can give Symantic a folder or path, and tell it to ignore this path. If you can have your admin change this for you where you build your projects, this would be most helpful.

Lastly, I know that you indicated that this is just a plain project. But, just to make sure there is nothing special, would you please delete the obj and bin folder, then zip the project and attach to the bug. If so, I may be able to repro the issue based on something specific about the project. I say this because you may have settings, add-ins, etc. that give you a different template than we might be getting here.


Chuck England
Program Manager - VSPro
Posted by StephenA on 6/30/2011 at 7:16 AM
Is there any tracing I can turn on for Tracker.exe?
Posted by StephenA on 6/30/2011 at 7:14 AM
The project is completely fresh. I just create a new project and then hit F6 to build it.

The OS is Windows 7 Enterprise 64-bit, locked down with standard group policy rules etc. It has Symantec Endpoint Protection running (which cannot be disabled). Privilege Guard is used to elevate permissions where required. I have tried running with elevated permissions but still get the same error. I have tried completely uninstalling Visual Studio 2010, deleting all trace of it, and then re-installing everything (not a quick task!) and the problem still exists.

I have tried the same project on a standalone Window 7 Ultimate 64-bit machine and it works fine.
Posted by Microsoft on 6/17/2011 at 2:36 PM
Thanks for the bug report. The fact that it only reproes running under tracker is very interesting. Can you confirm that there is no way the code being linked is relevant, ie., it's a fresh win32 project?
Clearly this works for most customers (!) -- is there anything you can think of that might be special about your box? Eg., file system, virus checkers, security systems? We have seen interesting issues with tracker with all of them. Please try disabling all of those if possible, or trying on a machine without them.
Also, what OS is this -- is it XP?
Posted by EricLeong [Feedback Moderator] on 6/9/2011 at 1:10 AM
Thank you for submitting feedback on Visual Studio 2010 and .NET Framework. Your issue has been routed to the appropriate VS development team for review. We will contact you if we require any additional information.
Posted by StephenA on 6/8/2011 at 9:24 AM
I've tried using LINK.EXE directly from the command line and that works okay.

If I try and run LINK via Tracker.exe, which is what VS seems to be doing, I get the LNK1123 error.
Posted by EricLeong on 6/8/2011 at 2:30 AM
Thanks for reporting the issue.
In order to fix the issue, we must first reproduce the issue in our labs. We are unable to reproduce the issue with the steps you provided.

Could you please attach /v:diag log file to this feedback through our site to help us investigate the issue?

You can get them easily by going to Tools/Options, Projects/Solutions, Build/Run, and setting the MSBuild verbosity to "Diagnostic" in both dropdowns. Then, just copy from the Output Window in the IDE, paste into a text file and send it to us. For command line, you can pass in "/v:diag" switch to MSBuild.EXE and it will produce a diagnostic-level log.

Thanks again for your efforts and we look forward to hearing from you.
Posted by MS-Moderator01 on 6/7/2011 at 1:49 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)