BotBuilder-Location
BotBuilder-Location copied to clipboard
Unable to run this csharp project from visual studio code
Hi. I downloaded this project and navigated to CSHARP folder using visual studio code. Now in powershell terminal, I tried to run the project using command "dotnet run --project BotBuilderLocation.sln"
I'm getting following error: C:\Program Files\dotnet\sdk\3.1.416\Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3644: The reference assemblies for .NETFramework,Version=v4.6 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks [D:\InsuranceClaimSolution\BotBuilder-Location-master\CSharp\BotBuilderLocation.Tests\BotBuilderLocation.Tests.csproj] C:\Program Files\dotnet\sdk\3.1.416\Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3644: The reference assemblies for .NETFramework,Version=v4.6 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks [D:\InsuranceClaimSolution\BotBuilder-Location-master\CSharp\BotBuilderLocation\BotBuilderLocation.csproj] D:\InsuranceClaimSolution\BotBuilder-Location-master\CSharp\BotBuilderLocation.Sample\BotBuilderLocation.Sample.csproj(158,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\3.1.416\Microsoft\VisualStudio\v16.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the expression in the Import declaration "C:\Program Files\dotnet\sdk\3.1.416\Microsoft\VisualStudio\v16.0\WebApplications\Microsoft.WebApplication.targets" is correct, and that the file exists on disk.
The build failed. Fix the build errors and run again.
Do I need to install .NET framework v4.6? or do I need to retarget it to my version(3.1.416), if yes, how to retarget using visual studio code?
As the error says, you need to install .NET 4.6. Using an older version of .NET is unlikely to work as some of the code might not be available, or there may be dependencies that target 4.6.