DotNet Nuget pushing same package version without warning - .net-core

I have a command that runs after release build.
dotnet nuget push Test.nupkg -s \\Path
I am using Dotnet version
6.0.200
and nuget version
6.1.0.103
In the older version of dotnet (2.1) I used to get a error when pushing duplicate version like this
warning MSB3073: The command "dotnet nuget push "***" exited with code 1.
Is there a way to avoid pushing duplicate in 6.0.200 ?

Related

dotnet entity frameworkcore migration command not work in vs 2022

While migration in ef core using below command give me an error.
dotnet tool install --global dotnet-ef
After refer this link , i have executed below command.
dotnet tool install --global dotnet-ef
But still give me an error.
Below packages installed in my project.
Microsoft.EntityFrameworkCore(3.1.25) ,
Microsoft.EntityFrameworkCore.Design(3.1.25),
Microsoft.EntityFrameworkCore.SqlServer(3.1.25),
Microsoft.EntityFrameworkCore.Tools(3.1.25)
For the migrations command you need to install the Microsoft.EntityFrameworkCore.Tools Nuget package.

Browserslist: caniuse-lite is outdated. Please run: npx browserslist#latest --update-db NextJS

When I run my NextJs program this error always pops up
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist#latest --update-db
So then I run npx browserslist#latest --update-db in the shell:
npx: installed 6 in 1.905s
Current version: 1.0.30001179
New version: 1.0.30001179
Removing old caniuse-lite from lock file
Installing new caniuse-lite version
$ npm install caniuse-lite
Cleaning package.json dependencies from caniuse-lite
$ npm uninstall caniuse-lite
caniuse-lite has been successfully updated
No target browser changes
And the I when I run my Next program again, the same error occurs. This started happening to me yesterday. I just used npx create-next-app and the npm run dev.
UPDATE
The new version (10.0.6) has been released few moments ago. No warnings present.
This is a falsy warning in current Next.js version (10.0.5).
It's already solved in canary version, which is a base for the next stable version. You can install it (npm install next#canary or yarn add next#canary) and make sure there are no warnings.
Since canary version is not recommended for using in production, you can continue working in 10.0.5 without any side effects. The warning will disappear after new stable version release.

dotnet-ef still not found after installation

I installed the dotnet-ef tool on a Ubuntu server, and it installed successfully. However, the program was still not found:
~/app$ dotnet --version
3.1.201
~/app$ dotnet tool install --global dotnet-ef --version 3.1.3
Since you just installed the .NET Core SDK, you will need to logout or restart your session before running the tool you installed.
You can invoke the tool using the following command: dotnet-ef
Tool 'dotnet-ef' (version '3.1.3') was successfully installed.
After rebooting the server:
~/app$ dotnet-ef migrations add "First On Server"
dotnet-ef: command not found
~/app$ which dotnet
/usr/bin/dotnet
~/app$ which dotnet-ef
~/app$
How do I get the dotnet-ef tool on a Ubuntu machine?
The dotnet tool install command requires elevation!

Dotnet aspnet -codegenerator failed for dotnet core 3.1

I followed https://learn.microsoft.com/en-us/aspnet/core/tutorials/razor-pages/model?view=aspnetcore-3.1&tabs=visual-studio-code and run
dotnet tool install --global dotnet-aspnet-codegenerator
dotnet aspnet-codegenerator razorpage -m Movie -dc RazorPagesMovieContext -udl -outDir Pages\Movies --referenceScriptLibraries
After that, I got error
Building project ...
Scaffolding failed.
Add Microsoft.VisualStudio.Web.CodeGeneration.Design package to the project as a NuGet package reference.
To see more information, enable tracing by setting environment variable 'codegen_trace' = 1.
RunTime 00:00:03.47
I try to add package using
dotnet add package Microsoft.VisualStudio.Web.CodeGeneration.Design --version 3.1.0
and Get error
Writing C:\Users\tdong.BCFSA\AppData\Local\Temp\tmpA5E0.tmp
info : Adding PackageReference for package 'Microsoft.VisualStudio.Web.CodeGeneration.Design' into
project 'D:\Work\Testing\Movies\RazorPagesMovie\RazorPagesMovie.csproj'.
info : Restoring packages for D:\Work\Testing\Movies\RazorPagesMovie\RazorPagesMovie.csproj...
error: Package NuGet.Frameworks 4.7.0 is not compatible with netcoreapp3.1
(.NETCoreApp,Version=v3.1). Package NuGet.Frameworks 4.7.0 does not support any target frameworks.
error: Package 'Microsoft.VisualStudio.Web.CodeGeneration.Design' is incompatible with 'all'
frameworks in project 'D:\Work\Testing\Movies\RazorPagesMovie\RazorPagesMovie.csproj'.

Docker: Running dotnet publish -o /output results in a nonzero error on CLI

I'm using Ubuntu 16.04 LTS,
Docker-compose v 1.18.0-rc2, build 189468b
Docker version 17.12.0-ce-rc1, build ee2f943
Running this command: dotnet publish -o /output with docker results in this error:
ERROR: Service 'generator' failed to build: The command '/bin/sh -c
dotnet publish -c Release -o out' returned a non-zero code: 145
I've installed the .NET SDK for Ubuntu and not sure how to resolve this error; it just won't create that publish folder; here's dotnet --info
joel#worker-2:~/workspace/asp (copy)/api$ dotnet --info .NET Command
Line Tools (2.0.2)
Product Information: Version: 2.0.2 Commit SHA-1 hash:
a04b4bf512
Runtime Environment: OS Name: ubuntu OS Version: 16.04 OS
Platform: Linux RID: ubuntu.16.04-x64 Base Path:
/usr/share/dotnet/sdk/2.0.2/
Microsoft .NET Core Shared Framework Host
Version : 2.0.0 Build :
e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d
Link to the same question worded differently with more error logs
The error you are seeing is because your project contains a global.json file that pins the required SDK version to 2.0.2. However, the docker images contain newer SDK versions (current one is 2.1.3) which. Because no 2.0.2 SDK is present in the docker image you use to build, it just errors out.
First, if you are using Ubuntu, docker for Windows is not relevant.
I see dotnet publish -c Release -o out used in "Dockerize a .NET Core application" (and the repo dotnet/dotnet-docker-samples) with images starting with
FROM microsoft/aspnetcore-build:2.0 AS build-env
It is a tag which is multi-arch, meaning it will pull either Windows or Linux containers depending on the host (here Ubuntu)
But you mention in your previous question following the pluralsight.com course docker-images-containers-aspdotnet-core, and that one might only work when done on Windows (meaning Windows server 2016/2017, able to execute Windows images)

Resources