How to fix E1696 cannot open source file "atomic_ops.h"? Unity Hololens 2

stove morales 30 Reputation points
2023-04-18T22:54:38.3266667+00:00

Problem: After building and deploying, I get the following error:
E1696 cannot open source file "atomic_ops.h" I tried all sorts of combinations including Release & ARM and Release & ARM64 but to no avail. User's image

Without the debugger I can get it to start and display the scene but after a few seconds it crashes. My scene only contains an interactable (grabbable) cube as shown here: User's image

Here are the settings that I have in Unity 2021.3.22f1 User's image

User's image

User's image

I'll leave this image here in case it's of use:
User's image

HoloLens Development
HoloLens Development
HoloLens: A family of Microsoft self-contained, holographic devices that enable engagement with digital content and interaction with holograms in the surrounding environment.Development: The process of researching, productizing, and refining new or existing technologies.
396 questions
{count} votes

Accepted answer
  1. Zuocheng Wang - MSFT 3,091 Reputation points Microsoft Vendor
    2023-04-19T09:07:34.43+00:00

    Hello, Welcome to Microsoft Q&A,

    It seems that Input system 1.5.0 is used by default in Unity 2021.3.22f1, which causes crashes, this is a known issue, please refer to Known issues in Unity versions and packages - Mixed Reality | Microsoft Learn. You can find this package in Unity Package Manager->Unity Registry and update it manually.

    Also, regarding the packages in MRTK, you can refer to MRTK packages - MRTK 2 | Microsoft Learn to understand their usage, and then choose according to your needs. By default, only Mixed Reality OpenXR Plugin, Mixed Reality Toolkit Foundation and Mixed Reality Toolkit Standard Assets are required.


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    3 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. dluong 10 Reputation points
    2023-06-16T13:40:01.4033333+00:00

    No, Wang, I got the same issue. If I did "Start without debugging, the app was deployed to Hololens but I only got the empty dialog like the above image. Everytime I touch the dialog, the app looks like opening or loading then return this dialog. I think it crashes.

    When I debugged it, I got the same error "E1696 cannot open source file "atomic_ops.h" ".

    In addition, I did install Visual Studio 2022 when I started working with Hololens but I couldn't build the app successfully. It might be that my Unity was originally assigned VS 2019, and there was a conflict between these versions. Then I had to uninstall both unity and VS and use the current configuration with Unity 2021.3.27f1 and VS 2019.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.