I've created a sample app to get an idea on .Net Core with Web -> ConsoleApp(Package). When I tried to compile, its working fine and able to
dnu publish also.
see dnu publish result.
But when I tried to
dotnet publish, it's working but there's no exe only dll and pdb files.
see dotnet compile result.
And then I tried for
dotnet compile --native, that fails with the following error:
dotnet compile --native
Compiling DemoApp for DNXCore,Version=v5.0
Compilation succeeded.
0 Warning(s)
0 Error(s)
Time elapsed 00:00:09.2220793
Input Assembly: ..\Visual Studio 2015\Projects\DemoApp\
src\DemoApp\bin\Debug\dnxcore50\DemoApp.dll
libcpmt.lib(nothrow.obj) : error LNK2038: mismatch detected for '_MSC_VER': valu
e '1700' doesn't match value '1900' in Runtime.lib(RuntimeInstance.obj)
libcpmt.lib(newaop.obj) : error LNK2038: mismatch detected for '_MSC_VER': value
'1700' doesn't match value '1900' in Runtime.lib(RuntimeInstance.obj)
Runtime.lib(objecthandle.obj) : error LNK2001: unresolved external symbol "void
__cdecl operator delete(void *,unsigned __int64)" (??3@YAXPEAX_K@Z)
Runtime.lib(stressLog.obj) : error LNK2001: unresolved external symbol "void __c
decl operator delete(void *,unsigned __int64)" (??3@YAXPEAX_K@Z)
Runtime.lib(gcwks.obj) : error LNK2001: unresolved external symbol "void __cdecl
operator delete(void *,unsigned __int64)" (??3@YAXPEAX_K@Z)
Runtime.lib(handletablescan.obj) : error LNK2001: unresolved external symbol "vo
id __cdecl operator delete(void *,unsigned __int64)" (??3@YAXPEAX_K@Z)
Runtime.lib(module.obj) : error LNK2001: unresolved external symbol "void __cdec
l operator delete(void *,unsigned __int64)" (??3@YAXPEAX_K@Z)
Runtime.lib(allocheap.obj) : error LNK2001: unresolved external symbol "void __c
decl operator delete(void *,unsigned __int64)" (??3@YAXPEAX_K@Z)
Runtime.lib(gceewks.obj) : error LNK2001: unresolved external symbol "void __cde
cl operator delete(void *,unsigned __int64)" (??3@YAXPEAX_K@Z)
Runtime.lib(RestrictedCallouts.obj) : error LNK2001: unresolved external symbol
"void __cdecl operator delete(void *,unsigned __int64)" (??3@YAXPEAX_K@Z)
Runtime.lib(RuntimeInstance.obj) : error LNK2001: unresolved external symbol "vo
id __cdecl operator delete(void *,unsigned __int64)" (??3@YAXPEAX_K@Z)
Runtime.lib(CachedInterfaceDispatch.obj) : error LNK2001: unresolved external sy
mbol "void __cdecl operator delete(void *,unsigned __int64)" (??3@YAXPEAX_K@Z)
Runtime.lib(threadstore.obj) : error LNK2001: unresolved external symbol "void _
_cdecl operator delete(void *,unsigned __int64)" (??3@YAXPEAX_K@Z)
Runtime.lib(PalRedhawkMinWin.obj) : error LNK2001: unresolved external symbol "v
oid __cdecl operator delete(void *,unsigned __int64)" (??3@YAXPEAX_K@Z)
Runtime.lib(handletablecore.obj) : error LNK2001: unresolved external symbol __s
td_terminate
Runtime.lib(handletablecache.obj) : error LNK2001: unresolved external symbol __
std_terminate
Runtime.lib(handletablescan.obj) : error LNK2001: unresolved external symbol __s
td_terminate
Runtime.lib(RestrictedCallouts.obj) : error LNK2001: unresolved external symbol
__std_terminate
Runtime.lib(objecthandle.obj) : error LNK2001: unresolved external symbol __std_
terminate
Runtime.lib(stressLog.obj) : error LNK2001: unresolved external symbol __std_ter
minate
Runtime.lib(handletable.obj) : error LNK2001: unresolved external symbol __std_t
erminate
Runtime.lib(RuntimeInstance.obj) : error LNK2001: unresolved external symbol __s
td_terminate
Runtime.lib(CachedInterfaceDispatch.obj) : error LNK2001: unresolved external sy
mbol __std_terminate
Runtime.lib(startup.obj) : error LNK2001: unresolved external symbol __std_termi
nate
Runtime.lib(allocheap.obj) : error LNK2001: unresolved external symbol __std_ter
minate
Runtime.lib(gcwks.obj) : error LNK2019: unresolved external symbol __acrt_iob_fu
nc referenced in function printf
bootstrapper.lib(main.obj) : error LNK2001: unresolved external symbol __acrt_io
b_func
Runtime.lib(gcwks.obj) : error LNK2019: unresolved external symbol __stdio_commo
n_vfprintf referenced in function printf
bootstrapper.lib(main.obj) : error LNK2001: unresolved external symbol __stdio_c
ommon_vfprintf
bootstrapper.lib(main.obj) : error LNK2019: unresolved external symbol _Init_thr
ead_header referenced in function GetModuleSection
bootstrapper.lib(main.obj) : error LNK2019: unresolved external symbol _Init_thr
ead_footer referenced in function GetModuleSection
bootstrapper.lib(main.obj) : error LNK2019: unresolved external symbol __managed
__Main referenced in function main
bootstrapper.lib(main.obj) : error LNK2001: unresolved external symbol _Init_thr
ead_epoch
..\Visual Studio 2015\Projects\DemoApp\src\DemoApp\bin\
Debug\dnxcore50\native\DemoApp.exe : fatal error LNK1120: 8 unresolved externals
Linking of intermediate files failed.
What I want is output with exe which I'm unable to get.
What I have tried:
I've tried installing the latest setup and C++ runtime but still facing the issue.
Reported as an
issue in github forum but still no response.