Skip to main content
Inspiring
October 27, 2022
Question

update xlocnum hack header by copying over the header from your Visual Studio installation

  • October 27, 2022
  • 3 replies
  • 2692 views

Getting this error when sample SDK plugins are build in Visual Studio 2022 for InDesign2023. I have multiple Visual Studio(2019 and 2022).
(#error:- update xlocnum hack header by copying over the header from your Visual Studio installation and applying the same changes as to the previous versions. Be careful, this header also changes between minor versions of Visual Studio. MSC_VER was: " VALUE_TO_STRING(_MSC_VER))

This topic has been closed for replies.

3 replies

Community Expert
October 28, 2022

Strange, I never encountered this issue and even if I may have I don't remember making any changes in the SDK header files. @Olivier Beltrami are you sure you were not able to resolve this in any other way and your developement environment was exactly as recommended by the SDK?

-Manan

-Manan
Olivier Beltrami
Legend
October 28, 2022

@Manan Joshi My developement environment is exactly as recommended by the SDK, except that the SDK recommends using a "frozen version" of the Visual Studio UI, without any of the more recent security patches. But, personally, I prefer to use the Visual Studio UI with all the latest security patches. These updates to the Visual Studio UI are the cause for the need to tweak the xlocnum_hack.h file.

Community Expert
October 28, 2022

There in is the difference. I prefer freezing VS to whatever is recommended and be done with it(never hit the update button is the mantra I follow). I mainly use a MAC so I just wish if the WIN setup churns out a build without hassle then I am fine with it.

-Manan

-Manan
Inspiring
October 27, 2022

I resolved my issue by updating the value of  _MSC_VER according to the version of visual studio, I found the _MSC_VER details at https://dev.to/yumetodo/list-of-mscver-and-mscfullver-8nd

 

I using the Visual Studio 2022 (vs 17.3.6)
in xlocnum_hack.h file has:- "_MSC_VER >= 1931 && MSC_VER < 1932"

and I replaced the value -  "_MSC_VER >= 1931 && MSC_VER < 1934"

Participant
December 7, 2023

I am using Visual Studio 2022(vs 17.8.2)

in xlocnum_hack.h file has:- "_MSC_VER >= 1931 && MSC_VER < 1932"

and I replaced the value -  "_MSC_VER >= 1931 && MSC_VER < 1939"

after that compilation got failed I am getting some errors. The screenshots of errors are attached below.

Could anyone please help me to resolve the issue.

Legend
December 7, 2023

Turning off the fire alarm does not magically let the smoke disappear.

Use the VStudio and toolset version specified in the InDesign SDK.

Olivier Beltrami
Legend
October 27, 2022

Hello,

This is an issue with each new version of the SDK and needs to be tweaked.

Here is the file I use with the updated version of VS2022 and the plugin_sdk_18.0.0.311.

You will need to change the extension of the attached from TXT to H.

Very best regards,

Olivier