find and solve || findandsolve.com
Please wait.....

File Line Suppression State Error Core The type or namespace name Reflection (are you missing an assembly referen)

Severity Code Project Description File Line Suppression State

Error CS0234 Core The type or namespace name 'Reflection' does not exist in the namespace 'System' (are you missing an assembly reference?) E:\Running Project\Artical_V1\artical\Core\obj\Debug\netcoreapp2.2\.NETCoreApp,Version=v2.2.AssemblyAttributes.cs 3 Active

After running dotnet migrate the project.json file has been dropped in favour of the new csproj file.

Using Visual Studio Code and the Nuget4Code extension I've upgraded all components to ASP.NET Core 2.2.


Answer

Option 1.

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

Option 2.

We just had this issue where visual studio helpfully added a local reference rather than going via nuget

<ItemGroup>
  <Reference Include="Microsoft.AspNetCore.Mvc.Core">
    <HintPath>C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.mvc.core\2.0.0\lib\netstandard2.0\Microsoft.AspNetCore.Mvc.Core.dll</HintPath>   </Reference>
</ItemGroup>

Selena  Kandakar

Selena Kandakar

I like working on projects with a team that cares about creating beautiful and usable interfaces.

If findandsolve.com felt valuable to you, feel free to share it.

Comments



Report Response