We faces many problem in publishing ASP.NET Core Project on IIS. One of the common problem is
'The project was restored using Microsoft.NETCore.App version 2.1.0, but with current settings, version 2.1.4 would be used instead'
This occurs because your machines Microsoft.AspNetCore.App version is not same as projects Microsoft.AspNetCore.App version. To resolve this you have to do the following things:-
'The project was restored using Microsoft.NETCore.App version 2.1.0, but with current settings, version 2.1.4 would be used instead'
This occurs because your machines Microsoft.AspNetCore.App version is not same as projects Microsoft.AspNetCore.App version. To resolve this you have to do the following things:-
- Add following code into .csproj file
<PropertyGroup>
<RuntimeFrameworkVersion>2.1.4</RuntimeFrameworkVersion>
<PlatformTarget>AnyCPU</PlatformTarget>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup>
- Check Microsoft.AspNetCore.App version is 2.1.4. if not please install this version.
3.Restore your package with 2.1.4 version. To restore run following code from package manager console
Install-Package Microsoft.NETCore.App -Version 2.1.4
Comments
Post a Comment