Search Issue Tracker

Fixed

Fixed in 2020.3.42f1, 2021.3.14f1, 2022.1.23f1, 2022.2.0b16, 2023.1.0a19

Votes

6

Found in

2020.3.41f1

2021.3.12f1

2022.1.21f1

2022.2.0b13

2023.1.0a16

Issue ID

UUM-17921

Regression

No

[IL2CPP] Windows builds fails when using VS 2022 17.4.0 Preview

--

-

How to reproduce:
1. Download and install Visual Studio 2022 17.4.0 Preview 5.0
2. Open attached project “My Project.zip“, or create an empty project
3. Make sure the IL2CPP is selected as the scripting backend (Project Settings -> Player -> Other Settings -> Scripting Backend)
4. Shouldn't be necessary but can make sure the “Visual Studio preview” install is selected as the External script editor (Edit->Preferences->External Tools -> External Script Editor)
5. Open the Build Settings (Edit > Build Settings…)
6. Build

Expected result: The Player is built successfully
Actual result: The Player build fails with an error message: “Building Library\Bee\artifacts\WinPlayerBuildProgram\ei6vj\6p7s_z_vm6.lump.obj failed”

C:\Program Files\Unity\2023.1.0a16_4a28b8b54318\Data\il2cpp\libil2cpp\utils\Il2CppHashMap.h(71): error C2039: 'hash_compare': is not a member of 'stdext'
C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.34.31932\include\iterator(1426): note: see declaration of 'stdext'
C:\Program Files\Unity\2023.1.0a16_4a28b8b54318\Data\il2cpp\libil2cpp\utils\Il2CppHashMap.h(71): error C2065: 'hash_compare': undeclared identifier
C:\Program Files\Unity\2023.1.0a16_4a28b8b54318\Data\il2cpp\libil2cpp\utils\Il2CppHashMap.h(71): error C2275: 'Key': expected an expression instead of a type
C:\Program Files\Unity\2023.1.0a16_4a28b8b54318\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(38): error C2976: 'Il2CppReaderWriterLockedHashMap': too few template arguments
C:\Program Files\Unity\2023.1.0a16_4a28b8b54318\Data\il2cpp\libil2cpp\utils\Il2CppHashMap.h(75): note: see declaration of 'Il2CppReaderWriterLockedHashMap'

Reproducible with: 2020.3.41f1, 2021.3.12f1, 2022.1.21f1, 2022.2.0b13, 2023.1.0a16

Tested with: Windows 10 Enterprise

Forum Post where it was reported: [https://forum.unity.com/threads/il2cpp-error-on-building-for-windows.1351589/]
Workaround available here: https://forum.unity.com/threads/workaround-for-building-with-il2cpp-with-visual-studio-2022-17-4.1355570/
 

  1. Resolution Note (fix version 2023.1.0a19):

    Fixed in: 2023.1.0a19

  2. Resolution Note (fix version 2022.2.0b16):

    Fixed in: 2022.2.0b16

  3. Resolution Note (fix version 2022.1.23f1):

    Fixed in: 2022.1..23f1

  4. Resolution Note (fix version 2021.3.14f1):

    Fixed in: 2021.3.14f1

  5. Resolution Note (fix version 2020.3.42f1):

    Fixed in: 2020.3.42f1

Comments (26)

  1. mendyleo64

    Nov 07, 2023 17:28

    Am here to testify on the good work of doctor dominion
    I got sacked from work few months ago and have been unable to get a new job and haven’t been able to get a better shelter for Myself and kids , life has really been difficult because nobody wants to help , on a blessed day I decides to screw pass social media when I heard of a lady testifying of how doctor dominion helped her with so many of her problems, I quickly copied his email address and chatted him up to my greatest surprise he replied immediately and was ready to help me as soon as possible, first I was scared because I taught he was after d little money I had but I was wrong, we talked and he gave me a lottery winning number I did what necessary and am glad to say I gain more than I expected, I won the lottery with the help of doctor dominion because I gave up lottery a lot time he encouraged me and I won, am sharing this testimony with so much joy in my heart,
    you can also talk to him if you really want to win.
    dominionlottospelltemple@ gmail.com

  2. jonesash256

    Aug 29, 2023 10:25

    ETHICAL HACKER FOR HIRE
    I got ripped off over $35k after investing in a false binary scam. Thanks to WIZARD LARRY who were very efficient in recovering all my stolen funds legitimately, contact them if you require similar services by email ,WhatsApp. even visit their website
     Wizardlarry [at] mail [.] com
    WhatsApp +1 (205) /319-/6886/

  3. jonesash256

    Aug 29, 2023 10:22

    ETHICAL HACKER FOR HIRE
    I got ripped off over $35k after investing in a false binary scam. Thanks to WIZARD LARRY who were very efficient in recovering all my stolen funds legitimately, contact them if you require similar services by email ,WhatsApp. even visit their website
     Wizardlarry [at] mail [.] com
    WhatsApp +1 (205) /319-/6886/

  4. chrissystrickland208

    Jan 06, 2023 02:51

    Good day everyone! I’m Christina Strickland from Dearborn, Michigan, USA. I wish to share with you all about Wardrivers Cyber. A few months ago, I was putting my money into an online BTC investment plan and I got scammed of about $47,000. I was in debt and financial loss until I came across an article about Wardrivers Cyber. I reached out to them about my situation and they were able to recover all the funds I had lost to the swindler. I’m full of excitement and thought it would be best to share this news with everyone out there who might be in similar situations. I know how shameful it is to lose money to swindlers but with a good and reliable company such as Wardrivers Cyber, there is a 100% guarantee your money will be recovered back. Their direct email is wardriverscyberservice(@)techie.com

  5. sandraparker7840

    Nov 14, 2022 10:33

    In need of a Data Analyst?
    I help in social media hacks like verification
    and followers
    In need of a Private investigator?
    Hacking?
    Bitcoin mining
    Cash bitcoin investment also
    Contact bestappshackers(at)gmail(dot)com

  6. wechat_os_Qy0zU5lUkPpFi04bDss7y2xJE

    Nov 09, 2022 10:51

    A temperate solution to this issue is adding two lines to

    IL2CPP\external\google\sparsehash\internal\sparseconfig.h

    #define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS

    #include <hash_map>

    before

    /* The system-provided hash function including the namespace. */
    #define SPARSEHASH_HASH HASH_NAMESPACE::hash_compare

    Good luck !

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.