1

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.

IgorNotty
  • 23
  • 1
  • 5
  • If you haven't already, try repairing the VS install from the VS installer. If it still has the same problem, [use the feedback tool within the installer](https://learn.microsoft.com/en-us/visualstudio/install/troubleshooting-installation-issues?view=vs-2019#step-4---report-a-problem) to report it directly to Microsoft. Stack Overflow is not a official support channel. – zivkan Feb 25 '20 at 14:30

1 Answers1

1

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.

LoLance
  • 25,666
  • 1
  • 39
  • 73
  • Hi @Lance Li-MSFT. I have tried `dotnet restore` command on cmd and it succeeded, also I can `dotnet run` with any erros. Regarding the VS repair I have tried multiple time to repair it, however everytime same thing happens - [link](https://i.stack.imgur.com/vmJYE.png) – IgorNotty Feb 26 '20 at 09:11
  • Ran VS Repair and installed latest windows updates. – IgorNotty Feb 27 '20 at 07:23
  • Same result persists? – LoLance Feb 27 '20 at 07:24
  • 1
    Nope. As I mentioned VS Repair and windows upgrade help to me. Thanks again – IgorNotty Mar 04 '20 at 12:09