IgorNotty
IgorNotty

Reputation: 23

Unable to install VS2019 software and throws 'Microsoft.VisualCpp.Redist.14' error

I'm trying to install the newest visual studio 2019 version (yes, I have a license for it). However, during the installation process the window freezes with this warning:

enter image description here

If I press cancel, it continues installation and completes with a warning.

After that, when I try to open VS2019, I get a create window with empty/blank project template:

Create a new project window

In addition, for every project a migration is required and afterwards there are problems with Nuget, as you can see here:

Error occurred while restoring NuGet packages: '' is not a valid version string.                

By migrating cs.proj to VS2019 it adds several fields like OldToolsVersion, ToolsVersion and stops working

<Project Sdk="Microsoft.NET.Sdk.Web" ToolsVersion="Current">
  <PropertyGroup>
    <TargetFramework>netcoreapp3.1</TargetFramework>
    <AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
    <FileUpgradeFlags>
    </FileUpgradeFlags>
    <UpgradeBackupLocation>
    </UpgradeBackupLocation>
    <OldToolsVersion>2.0</OldToolsVersion>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
    <PlatformTarget>x64</PlatformTarget>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="YYY" Version="1.0.0-CI-20200211-095627" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\XXXX.csproj" />
  </ItemGroup>
  <ItemGroup>
    <None Update="Resources\DataStructure.txt">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
  </ItemGroup>
</Project>

In the end, I have a headache right now. I tried a lot - Reinstalling core, updating Nuget package.

Missing vc_runtimeminimum_x86.msi and installation won't work

NuGet Package Restore Not Working

Thanks for your help.

Upvotes: 1

Views: 6597

Answers (1)

LoLance
LoLance

Reputation: 28216

I assume your error about restoring nuget has something to do with the issue of VS installation.

1.For Error occurred while restoring NuGet packages: '' is not a valid version string. You can close VS, open cmd.exe => navigate to project folder where the xx.csproj exists and run command dotnet restore manually to restore packages for your project.

If the manual dotnet restore succeeds, then something wrong with VS IDE itself may cause the nuget restore issue. And if the dotnet restore command fails like in IDE, then i think there's something wrong with your project file itself. You should make sure you're using correct package version format, and the specified package with specified version is available in package source.

2.For the vs installation error, just try VS repair like zivkan suggest. Also, if there's any windows update available, install it to check if it makes any help.

Upvotes: 1

Related Questions