The program has exited with code -1073741701 (0xc000007b) for UWP apps

1

I have been developing a UWP app for awhile now. No problems at all. Have it connected to a git repo and everything. So this solution and project was working perfectly fine on 3 days ago. I finished working for the day, made a commit to the repo and turned off my computer. When I came back today, tried to launch my UWP in visual studio 2019 to start debugging on local machine I got this message:

The target process exited without raising a CoreCLR started event. Ensure that the target process is configured to use .NET Core. This may be expected if the target process did not run on .NET Core. The program '[2812] LaserMeasurementTool.exe' has exited with code -1073741701 (0xc000007b). Activation of the Windows Store app '062a9632-d22f-4d48-991a-d1d51afe77e5_ebvsp9khn4a7w!App' failed with error 'The app didn't start'.

Error message 1

Sometimes right after the 0xc000007b error code it says "a dll could not be found" but not every time.

I have tried so far:

  • Clean and rebuild the solution
  • Repair Visual Studio

I see that there is lots of people that have has this problem. But none of the suggested solutions have worked for me. Was wondering if there is more I can do to solve this issue. I can't do very much if I cannot run my program to test it.

Thank you so much in advance!

Update

Since the first post of this I have tried a few more things: I have changed the debugger in VS 2019 to native only. This prompted a different error dialog Error message 2

After this I was taken to this site by clicking on "help"

This page got me to open my event viewer for more detail on the issue and this was what the event viewer gave me:

Activation for 062a9632-d22f-4d48-991a-d1d51afe77e5_ebvsp9khn4a7w!App failed. Error code: The app didn't start.. Activation phase: COM ActivateExtension

And finally the output window in VS 2019 at this point read this:

'LaserMeasurementTool.exe' (Win32): Loaded '\lav-dc1\Folder Redirection\bwhelan\Documents\Source\Repos\132 Laser Measurement Tool\LaserMeasurementTool\LaserMeasurementToolUWP\bin\x86\Debug\AppX\LaserMeasurementTool.exe'. 'LaserMeasurementTool.exe' (Win32): Loaded 'C:\WINDOWS\System32\ntdll.dll'. Symbols loaded. 'LaserMeasurementTool.exe' (Win32): Loaded 'C:\WINDOWS\System32\kernel32.dll'. Symbols loaded. 'LaserMeasurementTool.exe' (Win32): Loaded 'C:\WINDOWS\System32\KernelBase.dll'. Symbols loaded. 'LaserMeasurementTool.exe' (Win32): Loaded 'C:\WINDOWS\System32\ucrtbase.dll'. Symbols loaded. 'LaserMeasurementTool.exe' (Win32): Loaded 'C:\Program Files\WindowsApps\Microsoft.NET.CoreRuntime.2.2_2.2.27902.3_x86__8wekyb3d8bbwe\uwphost.dll'. 'LaserMeasurementTool.exe' (Win32): Unloaded 'C:\Program Files\WindowsApps\Microsoft.NET.CoreRuntime.2.2_2.2.27902.3_x86__8wekyb3d8bbwe\uwphost.dll' The thread 0x3b30 has exited with code -1073741701 (0xc000007b). The thread 0x1208 has exited with code -1073741701 (0xc000007b). The program '[15228] LaserMeasurementTool.exe' has exited with code -1073741701 (0xc000007b).

As a whole it still does not work I figured I would add these are things I have now tried and that fail for my situation.

UPDATE CSPROJ FILE

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
    <ProjectGuid>Removed for safety</ProjectGuid>
    <OutputType>AppContainerExe</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>LaserMeasurementTool</RootNamespace>
    <AssemblyName>LaserMeasurementTool</AssemblyName>
    <DefaultLanguage>en-US</DefaultLanguage>
    <TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
    <TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.18362.0</TargetPlatformVersion>
    <TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
    <MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
    <FileAlignment>512</FileAlignment>
    <ProjectTypeGuids>Removed for safety</ProjectTypeGuids>
    <WindowsXamlEnableOverview>true</WindowsXamlEnableOverview>
    <AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
    <GenerateAppInstallerFile>False</GenerateAppInstallerFile>
    <AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm>
    <AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
    <GenerateTestArtifacts>True</GenerateTestArtifacts>
    <AppxBundle>Always</AppxBundle>
    <AppxBundlePlatforms>x86|x64</AppxBundlePlatforms>
    <HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
    <DebugSymbols>true</DebugSymbols>
    <OutputPath>bin\x86\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
    <NoWarn>;2008</NoWarn>
    <DebugType>full</DebugType>
    <PlatformTarget>x64</PlatformTarget>
    <UseVSHostingProcess>false</UseVSHostingProcess>
    <ErrorReport>prompt</ErrorReport>
    <Prefer32Bit>true</Prefer32Bit>
    <EnableGatekeeperAnalysis>false</EnableGatekeeperAnalysis>
    <UseDotNetNativeToolchain>false</UseDotNetNativeToolchain>
    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
    <OutputPath>bin\x86\Release\</OutputPath>
    <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
    <Optimize>true</Optimize>
    <NoWarn>;2008</NoWarn>
    <DebugType>pdbonly</DebugType>
    <PlatformTarget>x86</PlatformTarget>
    <UseVSHostingProcess>false</UseVSHostingProcess>
    <ErrorReport>prompt</ErrorReport>
    <Prefer32Bit>true</Prefer32Bit>
    <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
    <DebugSymbols>true</DebugSymbols>
    <OutputPath>bin\ARM\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
    <NoWarn>;2008</NoWarn>
    <DebugType>full</DebugType>
    <PlatformTarget>ARM</PlatformTarget>
    <UseVSHostingProcess>false</UseVSHostingProcess>
    <ErrorReport>prompt</ErrorReport>
    <Prefer32Bit>true</Prefer32Bit>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
    <OutputPath>bin\ARM\Release\</OutputPath>
    <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
    <Optimize>true</Optimize>
    <NoWarn>;2008</NoWarn>
    <DebugType>pdbonly</DebugType>
    <PlatformTarget>ARM</PlatformTarget>
    <UseVSHostingProcess>false</UseVSHostingProcess>
    <ErrorReport>prompt</ErrorReport>
    <Prefer32Bit>true</Prefer32Bit>
    <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM64'">
    <DebugSymbols>true</DebugSymbols>
    <OutputPath>bin\ARM64\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
    <NoWarn>;2008</NoWarn>
    <DebugType>full</DebugType>
    <PlatformTarget>ARM64</PlatformTarget>
    <UseVSHostingProcess>false</UseVSHostingProcess>
    <ErrorReport>prompt</ErrorReport>
    <Prefer32Bit>true</Prefer32Bit>
    <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM64'">
    <OutputPath>bin\ARM64\Release\</OutputPath>
    <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
    <Optimize>true</Optimize>
    <NoWarn>;2008</NoWarn>
    <DebugType>pdbonly</DebugType>
    <PlatformTarget>ARM64</PlatformTarget>
    <UseVSHostingProcess>false</UseVSHostingProcess>
    <ErrorReport>prompt</ErrorReport>
    <Prefer32Bit>true</Prefer32Bit>
    <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
    <DebugSymbols>true</DebugSymbols>
    <OutputPath>bin\x64\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
    <NoWarn>;2008</NoWarn>
    <DebugType>full</DebugType>
    <PlatformTarget>x64</PlatformTarget>
    <UseVSHostingProcess>false</UseVSHostingProcess>
    <ErrorReport>prompt</ErrorReport>
    <Prefer32Bit>true</Prefer32Bit>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
    <OutputPath>bin\x64\Release\</OutputPath>
    <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
    <Optimize>true</Optimize>
    <NoWarn>;2008</NoWarn>
    <DebugType>pdbonly</DebugType>
    <PlatformTarget>x64</PlatformTarget>
    <UseVSHostingProcess>false</UseVSHostingProcess>
    <ErrorReport>prompt</ErrorReport>
    <Prefer32Bit>true</Prefer32Bit>
    <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
  </PropertyGroup>
  <PropertyGroup>
    <RestoreProjectStyle>PackageReference</RestoreProjectStyle>
  </PropertyGroup>
  <ItemGroup>
    <Compile Include="App.xaml.cs">
      <DependentUpon>App.xaml</DependentUpon>
    </Compile>
    <Compile Include="MainPage.xaml.cs">
      <DependentUpon>MainPage.xaml</DependentUpon>
    </Compile>
    <Compile Include="Models\DataModel.cs" />
    <Compile Include="Models\ExportModel.cs" />
    <Compile Include="Models\ImportModel.cs" />
    <Compile Include="Models\LoginModel.cs" />
    <Compile Include="Models\ProgramDataModel.cs" />
    <Compile Include="Models\SettingsModel.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
    <Compile Include="Utilities\CollectionConverter.cs" />
    <Compile Include="Utilities\ExcelBuilder.cs" />
    <Compile Include="Utilities\JSON.cs" />
    <Compile Include="Utilities\Messages.cs" />
    <Compile Include="Utilities\DataHelper.cs" />
    <Compile Include="ViewModels\AdminViewModel.cs" />
    <Compile Include="ViewModels\BaseViewModel.cs" />
    <Compile Include="ViewModels\CalibrationViewModel.cs" />
    <Compile Include="ViewModels\DatabaseViewModel.cs" />
    <Compile Include="ViewModels\GeneralViewModel.cs" />
    <Compile Include="ViewModels\LoginChangePasswordViewModel.cs" />
    <Compile Include="ViewModels\LoginViewModel.cs" />
    <Compile Include="ViewModels\MainDisplayViewModel.cs" />
    <Compile Include="ViewModels\MainViewModel.cs" />
    <Compile Include="ViewModels\SettingsViewModel.cs" />
    <Compile Include="Views\AdminAccountView.xaml.cs">
      <DependentUpon>AdminAccountView.xaml</DependentUpon>
    </Compile>
    <Compile Include="Views\Admin\AddAccount.xaml.cs">
      <DependentUpon>AddAccount.xaml</DependentUpon>
    </Compile>
    <Compile Include="Views\Admin\EditAccount.xaml.cs">
      <DependentUpon>EditAccount.xaml</DependentUpon>
    </Compile>
    <Compile Include="Views\Admin\MainAccount.xaml.cs">
      <DependentUpon>MainAccount.xaml</DependentUpon>
    </Compile>
    <Compile Include="Views\ChangePasswordView.xaml.cs">
      <DependentUpon>ChangePasswordView.xaml</DependentUpon>
    </Compile>
    <Compile Include="Views\General\Calibration.xaml.cs">
      <DependentUpon>Calibration.xaml</DependentUpon>
    </Compile>
    <Compile Include="Views\General\Database.xaml.cs">
      <DependentUpon>Database.xaml</DependentUpon>
    </Compile>
    <Compile Include="Views\General\Main.xaml.cs">
      <DependentUpon>Main.xaml</DependentUpon>
    </Compile>
    <Compile Include="Views\General\Settings.xaml.cs">
      <DependentUpon>Settings.xaml</DependentUpon>
    </Compile>
    <Compile Include="Views\LoginView.xaml.cs">
      <DependentUpon>LoginView.xaml</DependentUpon>
    </Compile>
    <Compile Include="Views\MainView.xaml.cs">
      <DependentUpon>MainView.xaml</DependentUpon>
    </Compile>
    <Compile Include="Views\GeneralView.xaml.cs">
      <DependentUpon>GeneralView.xaml</DependentUpon>
    </Compile>
    <Compile Include="Views\TestView.xaml.cs">
      <DependentUpon>TestView.xaml</DependentUpon>
    </Compile>
  </ItemGroup>
  <ItemGroup>
    <AppxManifest Include="Package.appxmanifest">
      <SubType>Designer</SubType>
    </AppxManifest>
  </ItemGroup>
  <ItemGroup>
    <Content Include="Assets\img\Add.png" />
    <Content Include="Assets\img\Add_DarkGray.png" />
    <Content Include="Assets\img\Add_White.png" />
    <Content Include="Assets\img\BackBtn.png" />
    <Content Include="Assets\img\BackBtn_White.png" />
    <Content Include="Assets\img\Checkmark.png" />
    <Content Include="Assets\img\Checkmark_White.png" />
    <Content Include="Assets\img\LaveerLogo.png" />
    <Content Include="Assets\img\Load.png" />
    <Content Include="Assets\img\Load_White.png" />
    <Content Include="Assets\img\Lock.png" />
    <Content Include="Assets\img\LogoutBtn.png" />
    <Content Include="Assets\img\LogoutBtn_White.png" />
    <Content Include="Assets\img\Person.png" />
    <Content Include="Assets\img\Plus.png" />
    <Content Include="Assets\img\Plus_White.png" />
    <Content Include="Assets\img\RemoveBtn.png" />
    <Content Include="Assets\img\EditBtn.png" />
    <Content Include="Assets\img\EditBtn_White.png" />
    <Content Include="Assets\img\Lock_White.png" />
    <Content Include="Assets\img\RemoveBtn_White.png" />
    <Content Include="Assets\img\Sync.png" />
    <Content Include="Assets\img\Sync_Shadow.png" />
    <Content Include="Assets\img\Sync_White.png" />
    <Content Include="Assets\img\X.png" />
    <Content Include="Assets\img\X_LightGray.png" />
    <Content Include="Assets\img\X_White.png" />
    <Content Include="Assets\LoginBackground.jpg" />
    <Content Include="Assets\img\Person_White.png" />
    <Content Include="Assets\img\ViewBtn.png" />
    <Content Include="Properties\Default.rd.xml" />
    <Content Include="Assets\LockScreenLogo.scale-200.png" />
    <Content Include="Assets\SplashScreen.scale-200.png" />
    <Content Include="Assets\Square150x150Logo.scale-200.png" />
    <Content Include="Assets\Square44x44Logo.scale-200.png" />
    <Content Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
    <Content Include="Assets\StoreLogo.png" />
    <Content Include="Assets\Wide310x150Logo.scale-200.png" />
  </ItemGroup>
  <ItemGroup>
    <ApplicationDefinition Include="App.xaml">
      <Generator>MSBuild:Compile</Generator>
      <SubType>Designer</SubType>
    </ApplicationDefinition>
    <Page Include="MainPage.xaml">
      <Generator>MSBuild:Compile</Generator>
      <SubType>Designer</SubType>
    </Page>
    <Page Include="Styles\Styles.xaml">
      <SubType>Designer</SubType>
      <Generator>MSBuild:Compile</Generator>
    </Page>
    <Page Include="Views\AdminAccountView.xaml">
      <Generator>MSBuild:Compile</Generator>
      <SubType>Designer</SubType>
    </Page>
    <Page Include="Views\Admin\AddAccount.xaml">
      <SubType>Designer</SubType>
      <Generator>MSBuild:Compile</Generator>
    </Page>
    <Page Include="Views\Admin\EditAccount.xaml">
      <SubType>Designer</SubType>
      <Generator>MSBuild:Compile</Generator>
    </Page>
    <Page Include="Views\Admin\MainAccount.xaml">
      <SubType>Designer</SubType>
      <Generator>MSBuild:Compile</Generator>
    </Page>
    <Page Include="Views\ChangePasswordView.xaml">
      <Generator>MSBuild:Compile</Generator>
      <SubType>Designer</SubType>
    </Page>
    <Page Include="Views\General\Calibration.xaml">
      <SubType>Designer</SubType>
      <Generator>MSBuild:Compile</Generator>
    </Page>
    <Page Include="Views\General\Database.xaml">
      <SubType>Designer</SubType>
      <Generator>MSBuild:Compile</Generator>
    </Page>
    <Page Include="Views\General\Main.xaml">
      <SubType>Designer</SubType>
      <Generator>MSBuild:Compile</Generator>
    </Page>
    <Page Include="Views\General\Settings.xaml">
      <SubType>Designer</SubType>
      <Generator>MSBuild:Compile</Generator>
    </Page>
    <Page Include="Views\LoginView.xaml">
      <Generator>MSBuild:Compile</Generator>
      <SubType>Designer</SubType>
    </Page>
    <Page Include="Views\MainView.xaml">
      <Generator>MSBuild:Compile</Generator>
      <SubType>Designer</SubType>
    </Page>
    <Page Include="Views\GeneralView.xaml">
      <SubType>Designer</SubType>
      <Generator>MSBuild:Compile</Generator>
    </Page>
    <Page Include="Views\TestView.xaml">
      <SubType>Designer</SubType>
      <Generator>MSBuild:Compile</Generator>
    </Page>
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.Net.Native.Compiler">
      <Version>2.2.3</Version>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
      <PrivateAssets>all</PrivateAssets>
    </PackageReference>
    <PackageReference Include="Microsoft.NETCore.Runtime.CoreCLR">
      <Version>2.0.8</Version>
    </PackageReference>
    <PackageReference Include="Microsoft.NETCore.Runtime.Native">
      <Version>1.0.1</Version>
    </PackageReference>
    <PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
      <Version>6.2.9</Version>
    </PackageReference>
    <PackageReference Include="MvvmLight">
      <Version>5.4.1.1</Version>
    </PackageReference>
    <PackageReference Include="MvvmLightLibs">
      <Version>5.4.1.1</Version>
    </PackageReference>
    <PackageReference Include="Newtonsoft.Json">
      <Version>12.0.3</Version>
    </PackageReference>
    <PackageReference Include="Syncfusion.DataGridExcelExport.UWP">
      <Version>17.3.0.28</Version>
    </PackageReference>
    <PackageReference Include="Syncfusion.Licensing">
      <Version>17.3.0.28</Version>
    </PackageReference>
    <PackageReference Include="Syncfusion.Pdf.UWP">
      <Version>17.3.0.28</Version>
    </PackageReference>
    <PackageReference Include="Syncfusion.SfChart.UWP">
      <Version>17.3.0.28</Version>
    </PackageReference>
    <PackageReference Include="Syncfusion.SfGauge.UWP">
      <Version>17.3.0.28</Version>
    </PackageReference>
    <PackageReference Include="Syncfusion.SfGrid.UWP">
      <Version>17.3.0.28</Version>
    </PackageReference>
    <PackageReference Include="Syncfusion.SfInput.UWP">
      <Version>17.3.0.28</Version>
    </PackageReference>
    <PackageReference Include="Syncfusion.XlsIO.UWP">
      <Version>17.3.0.28</Version>
    </PackageReference>
    <PackageReference Include="System.Dynamic.Runtime">
      <Version>4.3.0</Version>
    </PackageReference>
    <PackageReference Include="System.Runtime.CompilerServices.Unsafe">
      <Version>4.6.0</Version>
    </PackageReference>
  </ItemGroup>
  <PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
    <VisualStudioVersion>14.0</VisualStudioVersion>
  </PropertyGroup>
  <Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>
c#
.net-core
uwp
asked on Stack Overflow Nov 18, 2019 by BWhelan • edited Nov 19, 2019 by BWhelan

1 Answer

2

I have seen this problem before, it is kind of elusive. Try to close Visual Studio and delete the bin and obj folders in the folder. This should make sure there are no leftovers (sometimes Clean Solution is not enough). Then uninstall the installed version of your application from the PC via Start menu, so you can install from clean slate.

If this does not help, I have found several reports that this problem occurred when an invalid App.config file was in the project folder. Check there is no App.config file, if yes, then try deleting it.

If both these approaches fail, please also try cloning the project to a different location and trying again. Make sure the path to the project is not too long (this problem is less prominent today, but it still does happen, that things fail without a clear reason just because the bin file path is too deep).

answered on Stack Overflow Nov 19, 2019 by Martin Zikmund

User contributions licensed under CC BY-SA 3.0