runtime icon indicating copy to clipboard operation
runtime copied to clipboard

CoreCLR won't run on win7 after build

Open jakesays-old opened this issue 11 years ago • 14 comments

I get "The program can't start because api-ms-win-core-winrt-string-l1-1-0.dll is missing from your computer. Try reinstalling the program to fix this problem." after building.

Environment: Win 7 64bit, Vs 2013.

Build according to directions - build completes fine. Run CoreConsole.exe and get the above message.

jakesays-old avatar Feb 04 '15 15:02 jakesays-old

@KrzysztofCwalina can you please take a look? Looks like the apiset dependency is not installed as part of CoreConsole.

gkhanna79 avatar Feb 04 '15 16:02 gkhanna79

Yes as of today the apiset are not installed as part of product build. As a work around you can run <repo_root>tests\runtest.cmd, it will populate a folder with all the apisets needed and framework implementations used by the tests

ramarag avatar Feb 04 '15 19:02 ramarag

After run runtest.cmd, still missing API-MS-WIN-APPMODEL-RUNTIME-L1-1-0.DLL API-MS-WIN-SHCORE-SCALING-L1-1-1.DLL DCOMP.DLL and IESHIMS.DLL, others copied to the output folder.

Win 7 64bit, Vs 2013

donaldcao avatar Feb 05 '15 04:02 donaldcao

@KrzysztofCwalina Do you have any thoughts on how to package the dependencies for the Console example?

gkhanna79 avatar Feb 05 '15 09:02 gkhanna79

It would be great if the CoreCLR build system dropped all the Win7 dependencies to some folder so that people can for now manually just copy the files. Long term, we need a better packaging story and nuget-msbuild integration. I am in some discussions about this this week, but I think it's going to take some time before we have an answer that does not involve committing hundreds of binaries to the corefxlab depot.

KrzysztofCwalina avatar Feb 05 '15 17:02 KrzysztofCwalina

@gkhanna79 @KrzysztofCwalina Is there documentation available that describes these dependencies? They seem to be 8.x related, and it would be nice to target win7 specifically. I'd be willing to work on this if you can provide guidance.

jakesays-old avatar Feb 05 '15 19:02 jakesays-old

I tried with Dependency walker and I see that the problem is with coreclr.dll, which is against WinRT api dll version. WinRT as far as I know is only able in Windows 8.x.

Nassiel avatar Feb 09 '15 00:02 Nassiel

This libs are documented here: https://msdn.microsoft.com/en-us/library/windows/desktop/hh802935%28v=vs.85%29.aspx And it's stated that they are not available for Win7 and lower

Alexx999 avatar Feb 09 '15 01:02 Alexx999

We are going to have package that emulates the apisets on Win7. This package is used by the tests today. Until we sort the CoreCLR packaging for Win7, you can workaround it by copying the api-ms-*.dll from under test directory next to coreclr.dll.

These apiset .dlls are forwarding the APIs to the Win7 implementation .dlls. They do not contain any actual code.

jkotas avatar Feb 09 '15 02:02 jkotas

I see that in newapis.h/cpp you only evaluates if it's windows 7 or upper but this methods are not able in Win7, you're going to include more validations and a api redirection there?

Nassiel avatar Feb 09 '15 09:02 Nassiel

I try to copy the api-ms and now, it's ok doesn't launch a dynamic link exception but actually every test, all of them launch a -1 error. corerun.exe never launch the .net exe application.

I theory I don't need any dll from the coreFx to run the coreCLR test, don't? Despite of that I try to build a extremely basic app (console hello world) and I added the System.Console.dll from the coreFx and the result is exactly the same.

With the verbose output I receive that CoreCLR.dll failed to load: Error code 193.

Also your api-ms*.dll versions are x86 while the compilation is x64.

Nassiel avatar Feb 09 '15 11:02 Nassiel

I just committed a fix to HelloWorld console app in the CoreFxLab repo. To compile the application for Windows 7, you need to get the new bits and follow the instructions described in the CoreFxLab wiki, i.e. uncomment a line in the HelloWorld.csproj file that enables Windows 7 build.

KrzysztofCwalina avatar Feb 20 '15 19:02 KrzysztofCwalina

if you try to compile from command line with csc.exe thius solution works: http://forums.dotnetfoundation.org/t/coreclr-on-win7-api-ms-win-core-winrt-string-l1-1-0-is-missing/853

PiDiBi avatar May 20 '15 06:05 PiDiBi

If you need the dependencies along see https://github.com/dotnet/coreclr/issues/157#issuecomment-516187117 or https://gist.github.com/eladkarako/ff2b36ff2f8e199d597bd903cc412bad

ghost avatar Jul 29 '19 22:07 ghost