-3

I'm porting an existing VS 2013-based solution to VS 2015 Update 1 and I am receiving an error code:

The following is a post-build command that triggers the error:

"C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\al.exe" /out:"C:\p4\MMM-2015\blah\tm1\Assemblies\USSAdmin.resources.dll" /culture:en /embed:"C:\p4\MMM-2015\blah\tm1\blah\USSAdmin\USSAdmin.resources"  /t:lib

I'm getting an error: exited with code -1073741819 with some Linker error dialogs also.

The above command works fine in a command-prompt.

MartinN
  • 51
  • 1
  • 6
  • 1
    Please try to phrase your question in the form of a question. – RBarryYoung May 20 '16 at 18:18
  • What do the linker error dialogs say? – Eric J. May 20 '16 at 18:19
  • @EricJ. Without being able to show a screenshot the message is: "Assembly Linker command line tool has stopped working". – MartinN May 20 '16 at 18:25
  • It is a hard crash, an AccessViolationException. That odds that you can help for that with the info you provide are zero. Try another machine. – Hans Passant May 20 '16 at 18:31
  • @HansPassant - I'm a local admin and I'm running VS2015 as an admin. Also, I can run the command successfully from a command prompt. How can this still occur? – MartinN May 20 '16 at 18:36

1 Answers1

1

During pre and post build commands with the linker it crashes hard. The linker is supposed to generate the resources.dll files for some solutions. After trying a number of things, looking online and posting questions I found the answer on an MSDN blog. This apparently is a problem with the Update 1.

The fix is to clear the codepage before the AL.exe call such as:

chcp 437

"$(ProgramFiles32)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\al.exe" /out:$(SolutionDir)\Assemblies\USSAdmin.resources.dll /culture:en /embed:$(ProjectDir)USSAdmin.resources /t:lib

https://blogs.msdn.microsoft.com/bharry/2015/11/30/vs-2015-update-1-and-tfs-2015-update-1-are-available/#10659560

Error -1073741819 (0xC0000005) when executing AL.EXE from Post-Build event in Visual Studio 2015 Update 1

After adding the codepage reset...it builds.

Community
  • 1
  • 1
MartinN
  • 51
  • 1
  • 6