Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AOT] LINK : fatal error LNK1123: Failed during conversion to COFF: Invalid or corrupted file #86493

Closed
lozn00 opened this issue May 19, 2023 · 4 comments

Comments

@lozn00
Copy link

lozn00 commented May 19, 2023

image

I TRY uninstall 7.0.5 but 7.0.302 for visual studio cannot to uninstall or replase 7.0.202 for visual studio

C:\Program Files\dotnet\sdk\7.0.302\Sdks\Microsoft.DotNet.ILCompiler\build\Microsoft.NETCore.Native.targets(350,5): err
or MSB3073: 命令“"D:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\bin\Hostx64\x64\link.
exe" @"obj\YTLSX_R\net7.0\win-x64\native\link.rsp"”已退出,代码为 1123。 [D:\dev\company_project\WEB_webapi\webapi_mes\webap
i_mes.csproj]

image
Because there was a problem with the code running after AOT was compiled, I deleted many .net 7.0 version folders on the computer and uninstalled it, resulting in this problem that cannot be fixed regardless of whether it is reinstalled or not.

@ghost ghost added the untriaged New issue has not been triaged by the area owner label May 19, 2023
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label May 19, 2023
@lozn00
Copy link
Author

lozn00 commented May 19, 2023

It worked fine before reinstalling the computer, and now a simple sentence can cause a crash, and I tried using version 8.0 later, but there was a problem and I had to downgrade back to 7.0

@ghost
Copy link

ghost commented May 19, 2023

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Issue Details

image

I TRY uninstall 7.0.5 but 7.0.302 for visual studio cannot to uninstall or replase 7.0.202 for visual studio

C:\Program Files\dotnet\sdk\7.0.302\Sdks\Microsoft.DotNet.ILCompiler\build\Microsoft.NETCore.Native.targets(350,5): err
or MSB3073: 命令“"D:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\bin\Hostx64\x64\link.
exe" @"obj\YTLSX_R\net7.0\win-x64\native\link.rsp"”已退出,代码为 1123。 [D:\dev\company_project\WEB_webapi\webapi_mes\webap
i_mes.csproj]

image
Because there was a problem with the code running after AOT was compiled, I deleted many .net 7.0 version folders on the computer and uninstalled it, resulting in this problem that cannot be fixed regardless of whether it is reinstalled or not.

Author: qssq1
Assignees: -
Labels:

untriaged, area-NativeAOT-coreclr, needs-area-label

Milestone: -

@vitek-karas vitek-karas removed the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label May 19, 2023
@danmoseley danmoseley changed the title [AOT]LINK : fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏 [ [AOT] LINK : fatal error LNK1123: Failed during conversion to COFF: Invalid or corrupted file May 19, 2023
@jkotas
Copy link
Member

jkotas commented May 19, 2023

error LNK1123: Failed during conversion to COFF: Invalid or corrupted file

Try deleting your obj and bin directories, and doing a clean build. It is what we have helped to resolve this error in dotnet/runtimelab#1436 (comment)

A better solution is tracked by #79634 .

I deleted many .net 7.0 version folders on the computer and uninstalled it

Manually deleting the .NET 7.0 version folders under C:\Program Files\dotnet corrupts the installation. Repairing the installation using Visual Studio Setup may help in this case.

@jkotas jkotas closed this as completed May 19, 2023
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label May 19, 2023
@lozn00
Copy link
Author

lozn00 commented May 20, 2023

the demo https://github.com/dotnet/runtimelab/tree/feature/NativeAOT/samples/HelloWorld
is normal work ,
i try install all package ,but problem still exist

@ghost ghost locked as resolved and limited conversation to collaborators Jun 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants