runtime: Unable to run new app: System.DllNotFoundException: Unable to load DLL 'api-ms-win -core-registry-l1-1-0.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Sorry if that has been previously addressed or answered, could not find an applicable solution.
The default generated web app with visual studio.
C:\Projects\DotNetCoreTest\WebApplication\WebApplication\bin\Debug\netcoreapp1.1
\win10-x64>C:\Projects\DotNetCoreTest\WebApplication\WebApplication\bin\Debug\ne
tcoreapp1.1\win10-x64\WebApplication.exe
Unhandled Exception: System.DllNotFoundException: Unable to load DLL 'api-ms-win
-core-registry-l1-1-0.dll': The specified module could not be found. (Exception
from HRESULT: 0x8007007E)
at Interop.mincore.RegOpenKeyEx(SafeRegistryHandle hKey, String lpSubKey, Int
32 ulOptions, Int32 samDesired, SafeRegistryHandle& hkResult)
at Microsoft.Win32.RegistryKey.InternalOpenSubKeyCore(String name, RegistryRi
ghts rights, Boolean throwOnPermissionFailure)
at Microsoft.AspNetCore.DataProtection.RegistryPolicyResolver.ResolveDefaultP
olicy()
at Microsoft.Extensions.DependencyInjection.DataProtectionServices.<GetDefaul
tServices>d__0.MoveNext()
at Microsoft.Extensions.DependencyInjection.Extensions.ServiceCollectionDescr
iptorExtensions.TryAdd(IServiceCollection collection, IEnumerable`1 descriptors)
at Microsoft.Extensions.DependencyInjection.DataProtectionServiceCollectionEx
tensions.AddDataProtection(IServiceCollection services)
at Microsoft.Extensions.DependencyInjection.MvcViewFeaturesMvcCoreBuilderExte
nsions.AddViewServices(IServiceCollection services)
at Microsoft.Extensions.DependencyInjection.MvcViewFeaturesMvcCoreBuilderExte
nsions.AddViews(IMvcCoreBuilder builder)
at Microsoft.Extensions.DependencyInjection.MvcServiceCollectionExtensions.Ad
dMvc(IServiceCollection services)
at WebApplication.Startup.ConfigureServices(IServiceCollection services) in C
:\Projects\DotNetCoreTest\WebApplication\WebApplication\Startup.cs:line 33
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices(ISer
viceCollection services)
at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices()
at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
at WebApplication.Program.Main(String[] args) in C:\Projects\DotNetCoreTest\W
ebApplication\WebApplication\Program.cs:line 14
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 27 (23 by maintainers)
@dannyb2100 thanks for your reply. could you please help with the questions:
thanks again
No, we don’t have the same problem in v2 because we are not using the APISets anymore. instead we are using the system DLLs. here is example
https://github.com/dotnet/corefx/blob/c55435befeb372707558a5c441b3c64bf243948f/src/Common/src/Interop/Windows/advapi32/Interop.RegOpenKeyEx.cs#L13