Error in dependencies

Asked

Viewed 61 times

-1

Hello, I’m starting to develop a web application with . Net CORE. have installed the . Net Core SDK 2.2.103 and when I open my project, I have some errors in the dependencies as shown below:

inserir a descrição da imagem aqui

This is my package design code:

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>netcoreapp2.2</TargetFramework>
    <AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
  </PropertyGroup>


  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.App" />
    <PackageReference Include="Microsoft.AspNetCore.Razor" Version="2.2.0" />
    <PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
  </ItemGroup>


  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.App" />
  </ItemGroup>

</Project>

Somebody give me a hand with that ?

EDIT 1: When trying to build, the following errors appear:

inserir a descrição da imagem aqui

  • Opens the Package Manager Console and runs the dotnet Restore command, see what happens.

  • Just build the project.

  • I was going to say that now, I believe that a build Solution solves

  • Hello, I did what you said and when I did dotnet Store, it disappeared the error from the last file, but remains in the others

  • and I am unable to build, always gives an error: "error : Found invalid data while Decoding."

1 answer

0

  1. Create a file named: global.json.
  2. Include in the project root (same level of soluction).
  3. Add the file to the soluction.
  4. Right-click on the soluction-> Add -> Existing Item -> global.json

Content of global.json

{ "sdk": { "version": "2.2.103" } }

inserir a descrição da imagem aqui

Browser other questions tagged

You are not signed in. Login or sign up in order to post.