NU1108 error while installing DotLiquid with .Net Core - asp.net-core

I have ASP.NET Core 2.2 i am trying to install dotliquid using nuget
Install-Package DotLiquid -Version 2.0.298
but getting error
Does DotLiquid support .NET Core 2.2 ?

Update: Actually, I can reproduce your problem.
It seems to be because your solution or project is also called DotLiquid. When I create a new ASP.NET Core 2.2 web application called DotLiquid, just as you have in your screenshot, then I also get the cycles error:
Edit: This is apparently by design.
However, if I create an application with any other name, it installs fine.
Original answer
I just created a new ASP.NET Core 2.2 web application, and installed the latest version of DotLiquid - version 2.0.314 - and it installed successfully. Try that version instead of 2.0.298.

Related

HTTP Error 500.31 - ANCM Failed to Find Native Dependencies

I upgraded an existing application from asp.net core web API 2.0 to 3.1. When I run the application locally, application runs fine without any errors, but when I deployed the application to the same server where the 2.0 application was running, I got an error saying "ANCM failed to find Native dependencies".
Below is the screen shot:
From the provided link:
https://dotnet.microsoft.com/download/dotnet-core/3.1
I was able to find out that I need to install .net core 3.1. I am not sure if I need to install on my server:
ASP.NET Core Runtime 3.1.3
OR
SDK 3.1.201
I already have few 2.1 applications running on the server so I don't want the older applications to stop working if I upgrade to 3.1 . I have IIS installed on the server. Its a Microsoft windows NT version 6.2 DataCenter edition terminal server and my application that I am trying to deploy is .net core 3.1
I just wanted to know whether I should install ASP.NET Core Runtime 3.1.3 or SDK 3.1.201
and installing any of these on the server wont affect the applications that are running on 2.0 .net core framwork.
any help will be apprecaited.
Each .NET Core will define which version it uses and will use that SDK or runtime. Installing another SDK or runtime will not impact previously installed versions.
If your just hosting and not doing any development on the server then you only need to install the runtime. If any development will be taking place you will need the SDK.

The pipeline failed on 'nuget package' restore

I created a pipeline but when the process failed all the time on "Nuget Restore", see error message below.
I don't understand why
Thanks for your help
*The nuget command failed with exit code(1) and error(C:\Program Files\dotnet\sdk\2.2.110\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(137,5): error NETSDK1045: The current .NET SDK does not support targeting .NET Core 3.0. Either target .NET Core 2.2 or lower, or use a version of the .NET SDK that supports .NET Core 3.0. [D:\a\1\s\PackSecurity\PackSecurity.csproj] C:\Program Files\dotnet\sdk\2.2.110\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(137,5): error NETSDK1045: The current .NET SDK does not support targeting .NET Core 3.0. Either target .NET Core 2.2 or lower, or use a version of the .NET SDK that supports .NET Core 3.0. [D:\a\1\s\PackSecurity.Tests\PackSecurity.Tests.csproj])
Packages failed to restore*
Use "windows-2019" as the agent. Click on "Agent job 1" and set "Agent Specification" as "windows-2019".
Let me know if it worked for you.
According to the error message:
The current .NET SDK does not support targeting .NET Core 3.0. Either
target .NET Core 2.2 or lower, or use a version of the .NET SDK that
supports .NET Core 3.0.
We could to know that you have one or more projects target to the .NET Core 3.0, but the agent you select does not have that version .NET Core installed by default. It should has version 2.2.11 installed.
To resolve this issue, we could add a Use .NET Core task to install the .net core 3.0.x:
Check the similar ticket for some more details.
Hope this helps.

Problem in Building Project in Asp.net Core 2.2

I'm facing a problem of building a project of ASP.NET core 2.2 in visual studio 2017. Please Note that I'm successfully able to build and run project in ASP.NET core 2.1 . I have installed asp.net core 2.2 . I have also found in visual studio that when I created a Project of ASP.NET core I select .NET core version 2.2 As shown in the picture .
When I build the project first time I got this error
"Severity Code Description Project File Line Suppression State
Error NETSDK1045 The current .NET SDK does not support targeting .NET Core 2.2. Either target .NET Core 2.1 or lower, or use a version of the .NET SDK that supports .NET Core 2.2. WebApplication2 C:\Program Files\dotnet\sdk\2.1.505\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets 137 "
Please note that I have installed .net core 2.2 through package manager console through nuget but still I'm getting this yellow sign suggest that dependency problem . Please see the picture in bellow .
So I could not able to build and run the project what should I do . Thanks in advance
Its seems you have installed the wrong the version of .NET Core SDK for .NET Core 2.2.4 and Visual Studio 2017. You said that you have downloaded and installed the .NET Core SDK version 2.2.203 which is actually for Visual Studio 2019! That's the problem!
For Visual Studio 2017, Its SDK 2.2.106 for .NET Core 2.2.4. Please download it from here: https://dotnet.microsoft.com/download/dotnet-core/2.2 and install.
You error should go away now!
Download the SDK 2.2 in dot net core I think you don't have the SDK downloaded for the targeted version.
https://dotnet.microsoft.com/download/dotnet-core/2.2

Package was restored using .NetFramework instead of project target framework

I created a new project with the DevExtreme ASP.Net Core Application template.
Then I changed the framework from .Net Core 1 to .Net Core 2.0
However when I try to build I get the following error.
Warning NU1701 Package 'System.Linq.Queryable 4.0.0' was restored using
'.NETFramework,Version=v4.6.1' instead of the project target framework
'.NETCoreApp,Version=v2.0'. . This package may not be fully compatible with your project.
This problem is similar to This question about Nu1701 However the package in question is DevExtreme.AspNet.Core The name of the package indicates that it is meant to work with Core.
Upgrade to the DevExtreme 17.2.2 Beta and use the DevExtreme 17.2 ASP.Net Core Application (.NET Core) template

.NET Blazor Build error

I have tried to run the out of the box Blazor application to try out C# WebAssembly. I am running into issues when trying to run it different ways. I have also tried to hack the runtimeconfig.json according to this https://github.com/dotnet/cli/issues/7543
Running IIS Express
Running BlazorApplication1
The program '[42032] dotnet.exe' has exited with code -2147450749 (0x80008083).
Running in command line
It was not possible to find any compatible framework version
The specified framework 'Microsoft.NETCore.App', version '2.0.0-preview3-25512-01' was not found.
- Check application dependencies and target a framework version installed at:
\
- Alternatively, install the framework version '2.0.0-preview3-25512-01'.
You need to have the 2.1 preview of the .net core framework installed for Blazor to work: download here