Monday, 19 April 2021

health checks in asp.net core

Asp.Net core create health check class in nuget

 System memory health check for ASP.NET Core (gunnarpeipman.com)

Publish your nuget package

Create API keys

1. Sign into your nuget.org account or create an account if you don't have one already.
2. Select your user name (on the upper right), then select API Keys.
3. Select Create, provide a name for your key, select Select Scopes > Push. Enter * for Glob pattern, then select Create. (See below for more about scopes.)
4. Once the key is created, select Copy to retrieve the access key you need in the CLI:

Create nupkg file
5. Download nuget.exe from https://www.nuget.org/downloads
6. nuget pack <project-name>.csproj
7. above command will create nupkg file

Push to nuget repo
8. dotnet nuget push AppLogger.1.0.0.nupkg --api-key api_key --source https://api.nuget.org/v3/index.json

Adding .gitignore file to existing repo

Step 1: Update gitignore file as needed. Save below lines to .gitignore file.


*.swp
*.*~
project.lock.json
.DS_Store
*.pyc
nupkg/

# Visual Studio Code
.vscode

# Rider
.idea

# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
build/
bld/
[Bb]in/
[Oo]bj/
[Oo]ut/
msbuild.log
msbuild.err
msbuild.wrn

# Visual Studio 2015
.vs/
 
 
Step 2: Then commit all pending changes along with .gitignore file

Then run this command:

git rm -r --cached .

This removes everything from the index, then just run:

git add .

Commit it:

git commit -m ".gitignore is now working"

Search This Blog

Creating your first "Alexa" Skill

Index What is Alexa What is Alexa Skill? Why is it required when Alexa already equipped with voice assistant? Dev...