Team project has been deleted. Undo any pending changes…

image

  1. Go to the WebPortal, e.g. https://dev.azure.com/BillKrat and recreate the project, in my case I created PhotoGallery
  2. Go to team explorer and refresh the collection – the project and any pending changes will appear
    image
  3. Select the deleted project, e.g., PhotoGallery above, right click, and Undo all changes
  4. Go back to the WebPortal and delete the project again
  5. Refresh collection, the project should be gone and the dialog no longer appears

HTTP 500 Error for deployed ASP.NET CORE app – works when running locally

500 error when deployed

Object reference not set to an instance of an object.
Problem Id:
System.NullReferenceException at Microsoft.Extensions.DependencyInjection.IdentityServerBuilderConfigurationExtensions+<>c.<AddSigningCredentials>b__10_2

001browser1

This can be tough to diagnose if you are not deployed to Azure [with application insights enabled].  With app insights the message is not real helpful, but a clue lies in the “identityServerBuildConfigurationExtension”

003AppInsights

To verify the issue is with identity server configuration you can update the appsettings.json as shown below and redeploy.  If the site comes up but you can’t access the default “Fetch data” (see image) then this is the source of your problem; identity server configuration.

SNAGHTML952d1a08

in the appsettings.json add the following section:

    "Key": {
"Type": "Development"
}

image

The application will now run [in azure], however this configuration should not be used in a production environment.   The following link provides the steps [links] to “Deploy to Azure App Service”

Note: this fix will allow your site to work if you are deploying to Azure [because it is a secure site using https], however if you are trying to deploy to an ISP using http you'll have some more work because http causes error when deployed

VS Code / Typescript: hide .js files

1.  Create a settings.json file under the .vscode folder if it does not exist.
2.  Add the following settings and save

{
"files.exclude": {
// Hide the node_modules folder
"node_modules/": true,
// Hide all files that end in .d.ts
"**/*.d.ts": true,
// Hide all files that end with .js if they have a .ts file
"**/*.js": {
"when": "$(basename).ts"
},
}
}

settingsJson

Mac: show hidden files in finder

  1. Open terminal
    • <command>+<space>
    • Type in “terminal”
    • Double-click terminal
  2. Type in the following to enable viewing of hidden files in the finder
    defaults write com.apple.finder AppleShowAllFiles YES [NO = hidden files off]
  3. Relaunch the finder
    • Hold <options> key and right click on finder
    • Click on Relaunch


VS Code / Angular: launch in debug browser

.vscode.zip (1.91 kb)

Figure 1.  Launch debugger in Chrome

  1. Ensure Debugger for Chrome extension is installed (figure 2)
  2. In .vscode folder add launch (figure 3) and tasks (figure 4) json files
  3. From VS Code debug select Launch Chrome or Launch Chrome (Test)


Figure 2.  Visual Studio Code extension for Debugger for Chrome

{
"version": "0.2.0",
"configurations": [

{
"name": "Launch Chrome",
"type": "chrome",
"request": "launch",
"preLaunchTask": "npm start",
"url": "http://localhost:4200/",
"webRoot": "${workspaceFolder}",
"trace": true,
},
{
"name": "Launch Chrome (Test)",
"type": "chrome",
"request": "launch",
"preLaunchTask": "npm test",
"url": "http://localhost:9876/debug.html",
"webRoot": "${workspaceFolder}"
}
]
}
Figure 3. launch.json file
 
{
"version": "2.0.0",
"tasks": [
{
"label": "npm start",
"type": "npm",
"script": "start",
"isBackground": true,
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": {
"pattern": "$tsc",
"background": {
"beginsPattern": {
"regexp": "(.*?)"
},
"endsPattern": {
"regexp": "Compiled |compile."
}
}
}
},
{
"label": "npm test",
"type": "npm",
"script": "test",
"problemMatcher": [],
"group": {
"kind": "test",
"isDefault": true
}
}
]
}
Figure 4. tasks.json file