One of the projects I have in my solution is not loading in VSE2019. It throws this error:
C:\MyProgram\src\MyProgram.Functions.csproj : error : The project file cannot be opened by the project system, because it is missing some critical imports or the referenced SDK cannot be found.
Detailed Information:
Unable to locate the .NET Core SDK. Check that it is installed and that the version specified in global.json (if any) matches the installed version.
The project was created by another Dev (who is not here), and the .csproj contains the following:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<AzureFunctionsVersion>v1</AzureFunctionsVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.10.0" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.24" />
<PackageReference Include="WindowsAzure.ServiceBus" Version="2.1.0" />
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.ServiceBus">
<HintPath>..\packages\WindowsAzure.ServiceBus.2.1.0.0\lib\net40-full\Microsoft.ServiceBus.dll</HintPath>
</Reference>
<Reference Include="System.Configuration" />
<Reference Include="System.Web" />
</ItemGroup>
<ItemGroup>
<None Update="host.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="local.settings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</None>
</ItemGroup>
</Project>
Here are the following I have tried so far, but still with no positive results:
- I have commented out the line that refers to this package, and then reloaded the solution (even restarted VS2019):
<!-- <PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.24" /> -->
- I tried to install the missing NuGet package, but since the project has not been loaded - I cannot install it into this project (as this project simply is not available in the available projects list, when installing NuGet).
I'm not sure why this project is getting so "stiky" to the package? Or how to force to install the missing NuGet to this project?