Ошибка to run this application you must install net

Hi! I have a winexe application which is based on CefSharp.MinimalExample. The project file looks like this: &...

Hi!

I have a winexe application which is based on CefSharp.MinimalExample. The project file looks like this:

<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFramework>netcoreapp3.1</TargetFramework>
    <UseWindowsForms>true</UseWindowsForms>
    <RootNamespace>BrowserWrapper</RootNamespace>
    <ApplicationManifest>app.manifest</ApplicationManifest>
    <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
    <Platforms>x86;x64</Platforms>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="CefSharp.WinForms" Version="83.4.20" />
  </ItemGroup>

  <ItemGroup>
    <!-- TODO: These updates are currently required because CefSharp.WinForms specifies
         <Private>false</Private>, which means these libraries will not be specified in
         the .deps.json file, and so the CoreCLR wouldn't load these. -->
    <Reference Update="CefSharp">
      <Private>true</Private>
    </Reference>
    <Reference Update="CefSharp.Core">
      <Private>true</Private>
    </Reference>
    <Reference Update="CefSharp.WinForms">
      <Private>true</Private>
    </Reference>
  </ItemGroup>

  <!-- Include CefSharp.BrowserSubprocess.Core so we can selfhost the BrowserSubProcess using our exe -->
  <Choose>
    <When Condition="'$(PlatformTarget)' == 'x64'">
      <ItemGroup>
        <Reference Include="CefSharp.BrowserSubprocess.Core">
          <HintPath>$(CefSharpBrowserProcessCore64)</HintPath>
          <Private>true</Private>
        </Reference>
      </ItemGroup>
    </When>
    <!-- x86, Win32 and AnyCPU -->
    <Otherwise>
      <ItemGroup>
        <Reference Include="CefSharp.BrowserSubprocess.Core">
          <HintPath>$(CefSharpBrowserProcessCore32)</HintPath>
          <Private>true</Private>
        </Reference>
      </ItemGroup>
    </Otherwise>
  </Choose>
</Project>

When I target netcoreapp3.1 and run the resulting exe, I get the following dialog:

image

I have followed the link to download the lastest 3.1 packages (in particular I though Desktop Runtime 3.1.7 might help, but it didn’t).

These are my SDKs and runtimes:

❯ dotnet --list-sdks
2.1.2 [C:Program Filesdotnetsdk]
2.1.4 [C:Program Filesdotnetsdk]
2.1.201 [C:Program Filesdotnetsdk]
2.1.202 [C:Program Filesdotnetsdk]
2.1.507 [C:Program Filesdotnetsdk]
3.0.100 [C:Program Filesdotnetsdk]
3.1.301 [C:Program Filesdotnetsdk]
3.1.401 [C:Program Filesdotnetsdk]

❯ dotnet --list-runtimes
Microsoft.AspNetCore.All 2.1.11 [C:Program FilesdotnetsharedMicrosoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.21 [C:Program FilesdotnetsharedMicrosoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.11 [C:Program FilesdotnetsharedMicrosoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.21 [C:Program FilesdotnetsharedMicrosoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.0 [C:Program FilesdotnetsharedMicrosoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.5 [C:Program FilesdotnetsharedMicrosoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.7 [C:Program FilesdotnetsharedMicrosoft.AspNetCore.App]
Microsoft.NETCore.App 2.0.3 [C:Program FilesdotnetsharedMicrosoft.NETCore.App]
Microsoft.NETCore.App 2.0.5 [C:Program FilesdotnetsharedMicrosoft.NETCore.App]
Microsoft.NETCore.App 2.0.7 [C:Program FilesdotnetsharedMicrosoft.NETCore.App]
Microsoft.NETCore.App 2.0.9 [C:Program FilesdotnetsharedMicrosoft.NETCore.App]
Microsoft.NETCore.App 2.1.11 [C:Program FilesdotnetsharedMicrosoft.NETCore.App]
Microsoft.NETCore.App 2.1.21 [C:Program FilesdotnetsharedMicrosoft.NETCore.App]
Microsoft.NETCore.App 3.0.0 [C:Program FilesdotnetsharedMicrosoft.NETCore.App]
Microsoft.NETCore.App 3.1.5 [C:Program FilesdotnetsharedMicrosoft.NETCore.App]
Microsoft.NETCore.App 3.1.7 [C:Program FilesdotnetsharedMicrosoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.0.0 [C:Program FilesdotnetsharedMicrosoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.5 [C:Program FilesdotnetsharedMicrosoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.7 [C:Program FilesdotnetsharedMicrosoft.WindowsDesktop.App]

If I change to netcoreapp3.0, I don’t get the dialog.

Am I missing something obvious?

How do I fix the error that started popping up in a lot of applications:

To run this application, you first must install one of the following
version of the .Net Framework: v2.0.50727.

Would you like to download an install version v2.0.50727 of the .NET framework now?

Unfortunately, this is not as simple as just installing the .NET 2.0 runtime, because its already installed. If I run the recommended installers for .NET 2.0 or .NET 3.5 SP1, it exits silently.

Events leading to problem:

  • Installed SQL Server 2008 R2, which installs a toy version of Visual Studio 2008 that only deals with SQL specific projects.
  • Uninstalled Visual Studio 2008.

asked Sep 21, 2012 at 12:32

Contango's user avatar

5

I’ve often seen situations similar to this related to corruption in the installed .Net installation. Martineau’s suggestion of uninstalling and reinstalling the .Net is probably in the right ballpark.

You can get this error with the .Net still installed if the program throwing the error does not DETECT the installation. Uninstalling/reinstalling will help with that. After you’ve uninstalled the existing .Net package, you might read through this article about the most recent Cleanup utility from MS. If removal of some other application left corrupted system connections, you might need that cleanup in order to get your system back to rights.

answered Sep 24, 2012 at 19:04

Sunny Molini's user avatar

0

Installing .net 4.0 solved a similar issue for me before. I don’t know why…

answered Mar 8, 2014 at 10:24

NothingsImpossible's user avatar

It would help if you specified which version of Windows this relates to.

You can check the Registry entries to see if the values applications should be using to verify which versions of the .NET Framework are installed have been corrupted.

If you are using a version of Windows for which .NET Framework 2.0 cannot be uninstalled, this article has some suggestions.

Glorfindel's user avatar

Glorfindel

4,0598 gold badges23 silver badges37 bronze badges

answered Sep 24, 2012 at 19:26

David Marshall's user avatar

David MarshallDavid Marshall

7,1194 gold badges26 silver badges32 bronze badges

How do I fix the error that started popping up in a lot of applications:

To run this application, you first must install one of the following
version of the .Net Framework: v2.0.50727.

Would you like to download an install version v2.0.50727 of the .NET framework now?

Unfortunately, this is not as simple as just installing the .NET 2.0 runtime, because its already installed. If I run the recommended installers for .NET 2.0 or .NET 3.5 SP1, it exits silently.

Events leading to problem:

  • Installed SQL Server 2008 R2, which installs a toy version of Visual Studio 2008 that only deals with SQL specific projects.
  • Uninstalled Visual Studio 2008.

asked Sep 21, 2012 at 12:32

Contango's user avatar

5

I’ve often seen situations similar to this related to corruption in the installed .Net installation. Martineau’s suggestion of uninstalling and reinstalling the .Net is probably in the right ballpark.

You can get this error with the .Net still installed if the program throwing the error does not DETECT the installation. Uninstalling/reinstalling will help with that. After you’ve uninstalled the existing .Net package, you might read through this article about the most recent Cleanup utility from MS. If removal of some other application left corrupted system connections, you might need that cleanup in order to get your system back to rights.

answered Sep 24, 2012 at 19:04

Sunny Molini's user avatar

0

Installing .net 4.0 solved a similar issue for me before. I don’t know why…

answered Mar 8, 2014 at 10:24

NothingsImpossible's user avatar

It would help if you specified which version of Windows this relates to.

You can check the Registry entries to see if the values applications should be using to verify which versions of the .NET Framework are installed have been corrupted.

If you are using a version of Windows for which .NET Framework 2.0 cannot be uninstalled, this article has some suggestions.

Glorfindel's user avatar

Glorfindel

4,0598 gold badges23 silver badges37 bronze badges

answered Sep 24, 2012 at 19:26

David Marshall's user avatar

David MarshallDavid Marshall

7,1194 gold badges26 silver badges32 bronze badges

Понравилась статья? Поделить с друзьями:
  • Ошибка tns 12560 tns protocol adapter error
  • Ошибка tns 12541 tns no listener
  • Ошибка tls аутентификации sudrf ru
  • Ошибка tld exe для the long dark
  • Ошибка tlauncher java lang nullpointerexception null