c++winrt Entry Point Not Found - c++-winrt

Debug Any32 and Debug Any64 Throws below exception :
Exception thrown at 0x77BF6290 (ntdll.dll) in UserInterface.exe: 0xC0000139: Entry Point Not Found.
Output Log :
'UserInterface.exe' (Win32): Loaded 'C:\Windows\SysWOW64\version.dll'. Symbols loaded.
'UserInterface.exe' (Win32): Loaded 'C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00.Debug_14.0.29231.0_x86__8wekyb3d8bbwe\concrt140d_app.dll'. Symbols loaded.
'UserInterface.exe' (Win32): Loaded 'C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00.Debug_14.0.29231.0_x86__8wekyb3d8bbwe\vcruntime140d_app.dll'. Symbols loaded.
'UserInterface.exe' (Win32): Loaded 'D:\UserInterface\bin\Debug32\AppX\ucrtbased.dll'. Symbols loaded.
'UserInterface.exe' (Win32): Loaded 'C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00.Debug_14.0.29231.0_x86__8wekyb3d8bbwe\msvcp140d_atomic_wait_app.dll'. Symbols loaded.
'UserInterface.exe' (Win32): Loaded 'C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00.Debug_14.0.29231.0_x86__8wekyb3d8bbwe\msvcp140_1d_app.dll'. Symbols loaded.
Exception thrown at 0x77BF6290 (ntdll.dll) in UserInterface.exe: 0xC0000139: Entry Point Not Found.
Everything works fine in Release. What can be the reason?
Command outcome : dumpbin /dependents UserInterface.exe
Microsoft (R) COFF/PE Dumper Version 14.29.30038.1
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file UserInterface.exe
File Type: EXECUTABLE IMAGE
Image has the following dependencies:
api-ms-win-core-synch-l1-1-0.dll
api-ms-win-core-util-l1-1-0.dll
api-ms-win-core-errorhandling-l1-1-0.dll
api-ms-win-core-heap-l1-1-0.dll
api-ms-win-core-winrt-error-l1-1-0.dll
api-ms-win-core-debug-l1-1-0.dll
MSVCP140D_APP.dll
KERNEL32.dll
USER32.dll
ADVAPI32.dll
ole32.dll
SHELL32.dll
OLEAUT32.dll
SHLWAPI.dll
VERSION.dll
CONCRT140D_APP.dll
WS2_32.dll
VCRUNTIME140D_APP.dll
ucrtbased.dll
api-ms-win-core-synch-l1-2-0.dll
api-ms-win-core-processthreads-l1-1-0.dll
api-ms-win-core-interlocked-l1-1-0.dll
api-ms-win-core-processthreads-l1-1-1.dll
api-ms-win-core-winrt-l1-1-0.dll
api-ms-win-core-sysinfo-l1-1-0.dll
api-ms-win-core-libraryloader-l1-2-0.dll
api-ms-win-core-memory-l1-1-0.dll
MSVCP140D_ATOMIC_WAIT_APP.dll
api-ms-win-core-processenvironment-l1-1-0.dll
api-ms-win-core-libraryloader-l1-2-1.dll
api-ms-win-core-processtopology-obsolete-l1-1-0.dll
MSVCP140_1D_APP.dll
api-ms-win-core-com-l1-1-0.dll
Summary
1AB000 .data
4000 .msvcjmc
53C000 .rdata
109000 .reloc
1000 .rsrc
234E000 .text
1000 .tls

The issue is not related to C++/WinRT specifically, but to link dependencies. Debug builds often have different link dependencies from Release builds. The CRT DLLs listed in the output spew offer an example of this. Try running this from a Visual Studio command prompt to see what specific dependencies are not being resolved:
dumpbin /dependents UserInterface.exe

Related

CMake Error: Cannot open file for write: C:/Program Files/vtk/bin/CMakeCache.txt.tmpc3fcf for VTK

I am trying to build VTK version 9.2.2 with CMake for a few days now, but no luck so far. I am getting the below error in CMake GUI:
CMake Error: Cannot open file for write: C:/Program Files/vtk/bin/CMakeCache.txt.tmpc3fcf
CMake Error: Unable to (re)create the private pkgRedirects directory:
C:/Program Files/vtk/bin/CMakeFiles/pkgRedirects
CMake Error: : System Error: No such file or directory
CMake Error: Unable to open cache file for save. C:/Program Files/vtk/bin/CMakeCache.txt
CMake Error: : System Error: No such file or directory
I am following the video here, but it still does not work for me. I have tried to search for answers for a while, but there doesn't seem to be the exact same error that I am having on the internet anywhere.
I am on Windows 10, using VTK 9.2.2 and my CMake version is 3.25.1. I also tried with multiple versions of visual studio in the configuration, but it returned the same error.
The steps I have taken were:
Download VTK from the site
Put the downloaded files into the program files directory
Made a /src and /bin folder under a /vtk folder, which is outside the downloaded package
Copied and pasted the downloaded files into the /src folder
Opened CMake GUI and chose the src folder as the source and chose the bin folder as the build folder
Clicked generate and it threw the errors above
The error message like
CMake Error: Cannot open file for write: ...
usually occurred when CMake has no permissions to write a given file.
Your case involves directories under C:/Program Files/, which are usually configured as read-only for normal users.
The file CMakeCache.txt is created in the build directory, so the error message about such file usually means problem with a build directory.
A build directory should always be writable by the regular user. Here CMake creates files for the build tool, and here a build tool creates intermediate and resulted files.

MSBuild fails with an error in the "AL" task with error code AL1019

We are currently having problems while compiling a solution with MSBuild. The build fails randomly on the resource linking step inside the task "AL" which executes the "AL.exe" linker.
ALINK : error AL1019: Metadata failure while creating assembly -- The volume for a file has been externally altered so that the opened file is no longer valid.
The build log shows the following execution flow.
4>Target "GenerateSatelliteAssemblies" in file "C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets" from project "C:\source\MyProject.csproj" (target "CreateSatelliteAssemblies" depends on it):
4>Building target "GenerateSatelliteAssemblies" completely.
4>Output file "obj\Debug\de\MyProject.dll" does not exist.
4>Task "MakeDir"
4>Done executing task "MakeDir".
4>Task "AL"
4> C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools\AL.exe /culture:de /out:obj\Debug\de\MyProject.resources.dll /template:obj\Debug\MyProject.dll /embed:obj\Debug\MyProject.SomeResource.de.resources
4> Microsoft (R) Assembly Linker version 14.0.0081.0
4> Copyright (C) Microsoft Corporation. All rights reserved.
4>
4>Done executing task "AL".
4>Done building target "GenerateSatelliteAssemblies" in project "MyProject.csproj".
4>Target "GenerateSatelliteAssemblies" in file "C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets" from project "C:\source\MyProject.csproj" (target "CreateSatelliteAssemblies" depends on it):
4>Building target "GenerateSatelliteAssemblies" completely.
4>Output file "obj\Debug\en\MyProject.resources.dll" does not exist.
4>Task "MakeDir"
4>Done executing task "MakeDir".
4>Task "AL"
4> C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools\AL.exe /culture:en /out:obj\Debug\en\MyProject.resources.dll /template:obj\Debug\MyProject.dll /embed:obj\Debug\MyProject.SomeResource.en.resources
4> Microsoft (R) Assembly Linker version 14.0.0081.0
4> Copyright (C) Microsoft Corporation. All rights reserved.
4>
4>ALINK : error AL1019: Metadata failure while creating assembly -- The volume for a file has been externally altered so that the opened file is no longer valid.
4> The command exited with code 1.
4>Done executing task "AL" -- FAILED.
4>Done building target "GenerateSatelliteAssemblies" in project "MyProject.csproj" -- FAILED.
To me it is completely unclear what is meant by the error code AL1019. The MSDN error code listing didn't help either.

fatal error LNK1181: cannot open input file 'mylib.lib' when linking .lib and .def file

I am trying to link a .lib file and a .def file to create a .dll of this .lib file. I have been using this command: link /dll /machine:x86 /def:mylib.def mylib.lib and have been receiving the LNK 1181 error message. As noted on other stack posts (Visual Studio: LINK : fatal error LNK1181: cannot open input file), I have added the .lib path to my linker input directory and my additional library directory. Also, I have checked to make sure there are no spaces in the paths. I have tried everything noted in the post linked above.
Anyone have an idea as to what might be causing this error?
Thanks

ILMerge, .NET 4, NuGet: Unresolved assembly reference not allowed: CommandLine

ILMerge, .NET 4, NuGet: Unresolved assembly reference not allowed: CommandLine
I'm trying to pack my project into single dll.
I'm using:
- Visual Studio 2015
- NuGet
- ILMerge
To achieve my goal, I'd took ILMerge batch file
Added a post-build event:
"d:\#programming\#visual_studio\merge_all.bat" "$(TargetPath)" $(ConfigurationName)
Then slightly modified batch file to get rid of duplicate errors and add some hooks to try to eliminate "Unresolved assembly reference" error.
Unfortunately, none of Google Suggestions
Brought any relief.
So, I still got an error:
Unresolved assembly reference not allowed: CommandLine.
Here's my ILMerge batch file:
#ECHO OFF
rem # usage
rem # "path\to\merge_all.bat" "$(TargetPath)" $(ConfigurationName)
rem # "d:\#programming\#visual_studio\merge_all.bat" "$(TargetPath)" $(ConfigurationName)
rem # set .NET version and output folder name
set net_version=v4
set net_path="C:\Windows\Microsoft.NET\Framework\v4.0.30319"
set net_path_v1="%ProgramFiles%\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client"
set net_path_v2="%ProgramFiles%\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0"
set net_path_v3="%ProgramFiles%\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6"
set target_platform=%net_version%,%net_path_v3%
set lib_path="%ProgramFiles%\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0"
set output=merged
set ILMerge=%ProgramFiles%\Microsoft\ILMerge\ILMerge.exe
rem # parsing arguments
set target_path=%1
set target_file=%~nx1
set target_dir=%~dp1
set ConfigurationName=%2
rem # set output path and result file path
set outdir=%target_dir%%output%
set result=%outdir%\%target_file%
set log_file="%outdir%\merge.log"
set primary_assembly=%target_path%
rem # a little looping voodoo from microsoft to get rid of "duplicate" error
setlocal EnableDelayedExpansion
set "other_assemblies="
for %%f in (%target_dir%*.dll) do (
if NOT %%~nxf==%target_file% (
set "other_assemblies=!other_assemblies! %target_dir%%%~nxf"
)
)
setlocal DisableDelayedExpansion
rem # print info
#echo Start %ConfigurationName% Merging %target_file%.
#echo Target: %target_path%
#echo target_dir: %target_dir%
#echo Config: %ConfigurationName%
#echo Log: %log_file%
#echo primary assembly: %primary_assembly%
#echo other assemblies: %other_assemblies%
rem # recreate outdir
IF EXIST "%outdir%" rmdir /S /Q "%outdir%"
md "%outdir%"
set options= /wildcards /targetplatform:%target_platform% /log:%log_file% /out:"%result%" %primary_assembly% %other_assemblies%
rem # run merge cmd
#echo Merging: '"%ILMerge%" %options%'
"%ILMerge%" %options%
rem # if succeded
IF %ErrorLevel% EQU 0 (
rem # clear real output folder and put there result assembly
IF %ConfigurationName%==Release (
del %target_dir%*.*
del %target_dir%*.dll
del %target_dir%*.pdb
del %target_dir%*.xml
del %target_dir%*.*
copy %result% %target_dir%
rmdir /S /Q %outdir%
set result=%target_path%
#echo Result: %target_file% "-> %target_path%"
) ELSE (
#echo Result: %target_file% "-> %result%" )
set status=succeded
set errlvl=0
) ELSE (
set status=failed
set errlvl=1
)
#echo Merge %status%
exit %errlvl%
Here's the output of build process:
1>------ Rebuild All started: Project: YouTrackSharpApiWrapper, Configuration: Debug Any CPU ------
1>D:\#programming\#visual_studio\YouTrackSharpApiWrapper\ApiWrapper.cs(59,21,59,22): warning CS0168: The variable 'e' is declared but never used
1> YouTrackSharpApiWrapper -> D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\YouTrackSharpApiWrapper.dll
1> Start Debug Merging YouTrackSharpApiWrapper.dll.
1> Target: "D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\YouTrackSharpApiWrapper.dll"
1> target_dir: D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\
1> Config: Debug
1> Log: "D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\merged\merge.log"
1> primary assembly: "D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\YouTrackSharpApiWrapper.dll"
1> other assemblies: D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\EasyHttp.dll D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\JsonFx.dll D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\YouTrackSharp.dll
1> Merging: '"C:\Program Files (x86)\Microsoft\ILMerge\ILMerge.exe" /wildcards /targetplatform:v4,"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6" /log:"D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\merged\merge.log" /out:"D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\merged\YouTrackSharpApiWrapper.dll" "D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\YouTrackSharpApiWrapper.dll" D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\EasyHttp.dll D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\JsonFx.dll D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\YouTrackSharp.dll'
1> Merge failed
1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(4714,5): error MSB3073: The command ""d:\#programming\#visual_studio\merge_all.bat" "D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\YouTrackSharpApiWrapper.dll" Debug" exited with code 1.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
And here's the log of ILMerge:
ILMerge version 2.12.803.0
Copyright (C) Microsoft Corporation 2004-2006. All rights reserved.
ILMerge /wildcards /targetplatform:v4,C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6 /log:D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\merged\merge.log /out:D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\merged\YouTrackSharpApiWrapper.dll D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\YouTrackSharpApiWrapper.dll D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\EasyHttp.dll D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\JsonFx.dll D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\YouTrackSharp.dll
Set platform to 'v4', using directory 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6' for mscorlib.dll
Running on Microsoft (R) .NET Framework v2.0.50727
mscorlib.dll version = 2.0.0.0
The list of input assemblies is:
D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\YouTrackSharpApiWrapper.dll
D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\EasyHttp.dll
D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\JsonFx.dll
D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\YouTrackSharp.dll
The number of files matching the pattern D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\YouTrackSharpApiWrapper.dll is 1.
D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\YouTrackSharpApiWrapper.dll
Trying to read assembly from the file 'D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\YouTrackSharpApiWrapper.dll'.
Successfully read in assembly.
There were no errors reported in YouTrackSharpApiWrapper's metadata.
The number of files matching the pattern D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\EasyHttp.dll is 1.
D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\EasyHttp.dll
Trying to read assembly from the file 'D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\EasyHttp.dll'.
Successfully read in assembly.
There were no errors reported in EasyHttp's metadata.
The number of files matching the pattern D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\JsonFx.dll is 1.
D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\JsonFx.dll
Trying to read assembly from the file 'D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\JsonFx.dll'.
Can not find PDB file. Debug info will not be available for assembly 'D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\JsonFx.dll'.
Successfully read in assembly.
There were no errors reported in JsonFx's metadata.
The number of files matching the pattern D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\YouTrackSharp.dll is 1.
D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\YouTrackSharp.dll
Trying to read assembly from the file 'D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\YouTrackSharp.dll'.
Successfully read in assembly.
There were no errors reported in YouTrackSharp's metadata.
Checking to see that all of the input assemblies have a compatible PeKind.
YouTrackSharpApiWrapper.PeKind = ILonly
EasyHttp.PeKind = ILonly
JsonFx.PeKind = ILonly
YouTrackSharp.PeKind = ILonly
All input assemblies have a compatible PeKind value.
AssemblyResolver: Assembly 'EasyHttp' is referencing assembly 'System.Core'.
AssemblyResolver: Attempting referencing assembly's directory.
AssemblyResolver: Did not find assembly in referencing assembly's directory.
AssemblyResolver: Attempting input directory.
AssemblyResolver: Did not find assembly in input directory.
AssemblyResolver: Attempting user-supplied directories.
AssemblyResolver: No user-supplied directories.
AssemblyResolver: Attempting framework directory.
Can not find PDB file. Debug info will not be available for assembly 'System.Core'.
Resolved assembly reference 'System.Core' to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6\System.Core.dll'. (Used framework directory.)
AssemblyResolver: Assembly 'YouTrackSharp' is referencing assembly 'System.Management.Automation'.
AssemblyResolver: Attempting referencing assembly's directory.
AssemblyResolver: Did not find assembly in referencing assembly's directory.
AssemblyResolver: Attempting input directory.
AssemblyResolver: Did not find assembly in input directory.
AssemblyResolver: Attempting user-supplied directories.
AssemblyResolver: No user-supplied directories.
AssemblyResolver: Attempting framework directory.
AssemblyResolver: Did not find assembly in framework directory.
AssemblyResolver: Unable to resolve reference. (It still might be found, e.g., in the GAC.)
AssemblyResolver: Assembly 'YouTrackSharp' is referencing assembly 'CommandLine'.
AssemblyResolver: Attempting referencing assembly's directory.
AssemblyResolver: Did not find assembly in referencing assembly's directory.
AssemblyResolver: Attempting input directory.
AssemblyResolver: Did not find assembly in input directory.
AssemblyResolver: Attempting user-supplied directories.
AssemblyResolver: No user-supplied directories.
AssemblyResolver: Attempting framework directory.
AssemblyResolver: Did not find assembly in framework directory.
AssemblyResolver: Unable to resolve reference. (It still might be found, e.g., in the GAC.)
Using assembly 'YouTrackSharpApiWrapper' for assembly-level attributes for the target assembly.
Merging assembly 'YouTrackSharpApiWrapper' into target assembly.
Merging assembly 'EasyHttp' into target assembly.
Merging assembly 'JsonFx' into target assembly.
Assembly level attribute 'System.Security.AllowPartiallyTrustedCallersAttribute' from assembly 'JsonFx' being deleted from target assembly
Merging assembly 'YouTrackSharp' into target assembly.
Copying 1 Win32 Resources from assembly 'YouTrackSharpApiWrapper' into target assembly.
There were no errors reported in the target assembly's metadata.
ILMerge: Writing target assembly 'D:\#programming\#visual_studio\YouTrackSharpApiWrapper\bin\Debug\merged\YouTrackSharpApiWrapper.dll'.
AssemblyResolver: Assembly 'YouTrackSharp' is referencing assembly 'Microsoft.CSharp'.
AssemblyResolver: Attempting referencing assembly's directory.
AssemblyResolver: Did not find assembly in referencing assembly's directory.
AssemblyResolver: Attempting input directory.
AssemblyResolver: Did not find assembly in input directory.
AssemblyResolver: Attempting user-supplied directories.
AssemblyResolver: No user-supplied directories.
AssemblyResolver: Attempting framework directory.
Can not find PDB file. Debug info will not be available for assembly 'Microsoft.CSharp'.
Resolved assembly reference 'Microsoft.CSharp' to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6\Microsoft.CSharp.dll'. (Used framework directory.)
An exception occurred during merging:
Unresolved assembly reference not allowed: CommandLine.
at System.Compiler.Ir2md.GetAssemblyRefIndex(AssemblyNode assembly)
at System.Compiler.Ir2md.GetTypeRefIndex(TypeNode type)
at System.Compiler.Ir2md.VisitReferencedType(TypeNode type)
at System.Compiler.Ir2md.GetMemberRefIndex(Member m)
at System.Compiler.Ir2md.GetMethodToken(Method m)
at System.Compiler.Ir2md.VisitConstruct(Construct cons)
at System.Compiler.Ir2md.VisitExpressionList(ExpressionList expressions)
at System.Compiler.Ir2md.VisitConstruct(Construct cons)
at System.Compiler.Ir2md.VisitAssignmentStatement(AssignmentStatement assignment)
at System.Compiler.Ir2md.VisitBlock(Block block)
at System.Compiler.Ir2md.VisitBlock(Block block)
at System.Compiler.Ir2md.VisitMethodBody(Method method)
at System.Compiler.Ir2md.VisitMethod(Method method)
at System.Compiler.Ir2md.VisitClass(Class Class)
at System.Compiler.Ir2md.VisitModule(Module module)
at System.Compiler.Ir2md.SetupMetadataWriter(String debugSymbolsLocation)
at System.Compiler.Ir2md.WritePE(Module module, String debugSymbolsLocation, BinaryWriter writer)
at System.Compiler.Writer.WritePE(String location, Boolean writeDebugSymbols, Module module, Boolean delaySign, String keyFileName, String keyName)
at System.Compiler.Writer.WritePE(CompilerParameters compilerParameters, Module module)
at ILMerging.ILMerge.Merge()
at ILMerging.ILMerge.Main(String[] args)
Sorry for a long post, but I've got not enough mana to insert more than 2 links, so had to paste log right in thread, and Markdown support here really sucks.
AssemblyResolver: Assembly 'YouTrackSharp' is referencing assembly 'CommandLine'.
It seems like some your components has a reference to CommandLine component, while the ILMerge parameter string doesn't contains that reference (as I can see from your log).
In attempt to resolve this issue try to specify /useFullPublicKeyForReferences parameter for ILMerge call. If it doesn't help, try to specify CommandLine library location at the end.

MsbuildSonar Runner +Fxcop - No fxcop issues are posted to server.SonarDashBoard shows 0 technical debt

I am using Sonarqube 5.1 with MsBuildSonarRunner for my c#.net project analysis. Sonarqube 5.1 has come with C# 4.1 plugin, Recently I upgraded to 4.2. I have created a quality profile with ONLY Fxcop rules. I have followed the steps mentioned in Sonar site for analysis.
In analysis, I see that FXcop rule violations are captured. But when I browse to SonarDash board, It shows technical debt as 0 and issues as 0. I have reviewed my steps many times and I don't see any mistakes from my side. What could be the reason why Issues are not posted to server.
Here is my Build command log. I see clearly FXCOP rules are applied and violations are printed on console during build phase.
===========================================================
Microsoft (R) Build Engine version 12.0.21005.1
[Microsoft .NET Framework, version 4.0.30319.34209]
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 10/19/2015 12:20:14 PM.
Project "D:\Sqp\Polindrome\Polindrome\Polindrome.csproj" on node 1 (default targets).
GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
CoreCompile:
Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files.
_CopyAppConfigFile:
Skipping target "_CopyAppConfigFile" because all output files are up-to-date with respect to the input files.
CopyFilesToOutputDirectory:
Polindrome -> D:\Sqp\Polindrome\Polindrome\bin\Debug\Polindrome.exe
OverrideCodeAnalysisProperties:
Running FxCop analysis using the SonarQube ruleset. Ruleset: D:\Sqp\Polindrome\Polindrome\.sonarqube\conf\\SonarQubeFxCop-cs.ruleset
RunCodeAnalysis:
Running Code Analysis...
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\FxCop\FxCopCmd.exe /outputCulture:1033 /out:"bin\Debug\Polindrome.exe.CodeAnalysisLog.xml" /file:"bin\Debug\Polindrome.exe" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\Microsoft.CSharp.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\mscorlib.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.Data.DataSetExtensions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.Data.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.Xml.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.Xml.Linq.dll" /directory:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1" /ruleSet:"=D:\Sqp\Polindrome\Polindrome\.sonarqube\conf\\SonarQubeFxCop-cs.ruleset" /rulesetdirectory:"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\\Rule Sets" /rule:"-C:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\FxCop\\Rules" /searchgac /ignoreinvalidtargets /forceoutput /successfile /ignoregeneratedcode /saveMessagesToReport:Active /timeout:120
MSBUILD : **warning CA1823: Microsoft.Performance : It appears that field 'Program.AccountList' is never used or is only ever assigned to. Use this field or remove it.** [D:\Sqp\Polindrome\Polindrome\Polindrome.csproj]
Code Analysis Complete -- 0 error(s), 1 warning(s)
SetStyleCopAnalysisSettings:
Setting 'sonar.stylecop.projectFilePath' to 'D:\Sqp\Polindrome\Polindrome\Polindrome.csproj'
WriteSonarQubeProjectData:
Directory "D:\Sqp\Polindrome\Polindrome\.sonarqube\out\\Polindrome__AnyCPU_Debug_635803356164104589" doesn't exist. Skipping.
Creating directory "D:\Sqp\Polindrome\Polindrome\.sonarqube\out\\Polindrome__AnyCPU_Debug_635803356164104589".
Done Building Project "D:\Sqp\Polindrome\Polindrome\Polindrome.csproj" (default targets).
Build succeeded.
"D:\Sqp\Polindrome\Polindrome\Polindrome.csproj" (default target) (1) ->
(RunCodeAnalysis target) ->
MSBUILD : warning CA1823: Microsoft.Performance : It appears that field 'Program.AccountList' is never used or is only ever assigned to. Use this field or remove it. [D:\Sqp\Polindrome\Polindrome\Polindrome.csproj]
1 Warning(s)
0 Error(s)
Time Elapsed 00:00:01.82
FxCop analyzes assemblies, and relies on *.pdb files to map issues back to locations within the source code (i.e. to specific *.cs files at specific lines).
The issue reported by CA1823 seems to be on a field, which due to limitations of the *.pdb format are not being mapped back to source code. These issues are ignored during the import of FxCop results into SonarQube. You can verify that by manually opening the FxCop report (whose path you'll find in .sonarqube\out*\ProjectInfo.xml).
There is already a ticket to improve this in a future version of the C# plugin: https://jira.sonarsource.com/browse/SONARFXCOP-32
Update November 18th 2015
After many comments on this answer (see below), the root cause of the issue was finally found: The SQL Server collation must be case-sensitive (CS) and accent-sensitive (AS).
SonarQube 5.3 is expected to fail faster when this is not the case, to avoid these kind of strange problems: https://jira.sonarsource.com/browse/SONAR-6884