dotnet / dotnet/core

AOT publish error despite having desktop development for C++ workload & ARM64 build tools installed?

Open
#8,372 5 comments 1 reaction 0 assignees View on GitHub
Dominant language
PowerShell
Stars
22k
Forks
4.9k
Avg merge
5d 5h
Merged PRs (30d)
29

Description

I am getting the error "Make sure to install the Desktop Development for C++ workload. For ARM64 development also install C++ ARM64 build tools.". I have both Desktop Development for C++ and C++ ARM64 build tools installed. I only get this error on my laptop so I think it is a problem with my machine. Any suggestions on how to fix this? I am trying to publish a native console app with PublishAOT = true.

I have tried everything it seems to fix this. I have uninstalled visual studio 2019 and 2022. I reinstalled VS 2022 and then installed C++ desktop development and .NET dev packages. I installed Build tools and the C++ desktop development for that too (I am not sure why they are separate, but I am installed both). I then tried putting where.exe into my folder where my .net 7 app is and that gave me a new error: "cannot open input file advapi32.lib". I am lost. I am pretty sure there is something wrong with my PATH variables. Any suggestions?

![image](https://user-images.githubusercontent.com/65585254/230736961-b552ffc7-b747-4705-85a3-ca9e89236c61.png)

![image](https://user-images.githubusercontent.com/65585254/230736942-ba844ab0-32fb-430a-b9a9-4f4d5aeea1e1.png)

![image](https://user-images.githubusercontent.com/65585254/230736984-c84da9e9-0fb9-4e85-81e0-359c3c92be41.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.