[{"data":1,"prerenderedAt":192},["ShallowReactive",2],{"article-unable-to-save-database-diagrams":3},{"article":4,"tags":51,"previous":66,"next":149},{"id":5,"title":6,"author":7,"body":8,"createdAt":39,"description":40,"extension":41,"img":42,"meta":43,"navigation":44,"path":45,"seo":46,"stem":47,"tags":48,"updatedAt":39,"__hash__":50},"articles\u002Farticles\u002Funable-to-save-database-diagrams.md","Unable to save database diagrams","[object Object]",{"type":9,"value":10,"toc":35},"minimark",[11,15,27],[12,13,14],"p",{},"It sounds like your sysdiagrams table somehow lost the IDENTITY property on the diagram_id column.  Using the following SQL I was able to drop the sysdiagrams table and rebuild.  Note you will lose any existing diagrams (if you had any during this process)",[16,17,18,22],"pre",{},[19,20,21],"code",{},"DROP TABLE dbo.sysdiagrams;\nGO\nCREATE TABLE [dbo].[sysdiagrams]\n(\n    [name] [sysname] NOT NULL,\n    [principal_id] [int] NOT NULL,\n    [diagram_id] [int] IDENTITY(1,1) PRIMARY KEY,\n    [version] [int] NULL,\n    [definition] [varbinary](max) NULL,\n    CONSTRAINT [UK_principal_name] UNIQUE ([principal_id],[name])\n);\n",[12,23,24],{},[19,25,26],{},"GO\nEXEC sys.sp_addextendedproperty\n@name=N'microsoft_database_tools_support',\n@value=1 ,\n@level0type=N'SCHEMA',\n@level0name=N'dbo',\n@level1type=N'TABLE',\n@level1name=N'sysdiagrams';\nGO",[12,28,29,30],{},"Note: ",[31,32,34],"a",{"href":33},"https:\u002F\u002Fdocs.microsoft.com\u002Fen-us\u002Fsql\u002Fssms\u002Fsql-server-management-studio-changelog-ssms?view=sql-server-2017","SSMS v18 release notes",{"title":36,"searchDepth":37,"depth":37,"links":38},"",2,[],"2018-10-03 13:11:00","Once you resolve the ability to save database diagrams, please note that in the next release of SSMS v18 Microsoft is deprecating database diagram feature.  I don't quite understand this thinking however you can find more information in the release notes.","md","\u002Farticles\u002Fimages\u002FrGWupsowyf.png",{},true,"\u002Farticles\u002Funable-to-save-database-diagrams",{"title":6,"description":40},"articles\u002Funable-to-save-database-diagrams",[49],"sql","Maa_m8xqrM2uhGGESY8pwhI8NqvDOGnAZPMbdyjrRtY",[52],{"id":53,"title":54,"body":55,"description":59,"extension":41,"img":60,"meta":61,"name":49,"navigation":44,"path":62,"seo":63,"stem":64,"__hash__":65},"tags\u002Ftags\u002Fsql.md","Sql",{"type":9,"value":56,"toc":57},[],{"title":36,"searchDepth":37,"depth":37,"links":58},[],"SQL is a standard language designed for managing data in relational database management system. SQL stands for Structured Query Language. SQL is a standard programming language specifically designed for storing, retrieving, managing or manipulating the data inside a relational database management system (RDBMS).","https:\u002F\u002Fimages.unsplash.com\u002Fphoto-1598313183973-4effcded8d5e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=675&q=80",{},"\u002Ftags\u002Fsql",{"description":59},"tags\u002Fsql","HleFpAIKGUPMxp855dHtmfuv32MNyIbaOTi0ZjW_I1k",{"id":67,"title":68,"author":7,"body":69,"createdAt":140,"description":141,"extension":41,"img":142,"meta":143,"navigation":44,"path":144,"seo":145,"stem":146,"tags":147,"updatedAt":140,"__hash__":148},"articles\u002Farticles\u002Fupdate-npm-on-windows–current-best-approach.md","Update npm on Windows–Current Best Approach",{"type":9,"value":70,"toc":138},[71,79,82,87,98],[12,72,73,74,78],{},"This is the new best way to upgrade ",[75,76,77],"strong",{},"npm"," on Windows.",[12,80,81],{},"Run PowerShell as Administrator",[16,83,84],{},[19,85,86],{},"Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force\nnpm install -g npm-windows-upgrade\nnpm-windows-upgrade",[12,88,89,90,93,94,97],{},"Note: Do not run ",[19,91,92],{},"npm i -g npm",". Instead use ",[19,95,96],{},"npm-windows-upgrade"," to update npm going forward. Also if you run the NodeJS installer, it will replace the node version.",[99,100,101,105,112,115,118,121,127],"ul",{},[102,103,104],"li",{},"Upgrades npm in-place, where node installed it.",[102,106,107,108,111],{},"Easy updating, update to the latest by running ",[19,109,110],{},"npm-windows-upgrade -p -v latest",".",[102,113,114],{},"Does not modify the default path.",[102,116,117],{},"Does not change the default global package location.",[102,119,120],{},"Allows easy upgrades and downgrades.",[102,122,123,111],{},[31,124,126],{"href":125},"https:\u002F\u002Fgithub.com\u002Fnpm\u002Fnpm\u002Fwiki\u002FTroubleshooting#upgrading-on-windows","Officially recommended by the NPM team",[102,128,129,130,133,134,137],{},"A list of versions matched between NPM and NODE (",[31,131,132],{"href":132},"https:\u002F\u002Fnodejs.org\u002Fen\u002Fdownload\u002Freleases\u002F",") - but you will need to download NODE INSTALLER and run that to update node (",[31,135,136],{"href":136},"https:\u002F\u002Fnodejs.org\u002Fen\u002F",")",{"title":36,"searchDepth":37,"depth":37,"links":139},[],"2018-10-23T18:23:21.082Z","This is the new best way to upgrade npm on Windows","\u002Farticles\u002Fimages\u002Fsingleton_thumb.png",{},"\u002Farticles\u002Fupdate-npm-on-windows-current-best-approach",{"title":68,"description":141},"articles\u002Fupdate-npm-on-windows–current-best-approach",[77],"o4jaqV350CYl-Sj4Y9dUejcdC7WPqrJ9gzKLdNfnykg",{"id":150,"title":151,"author":152,"body":153,"createdAt":182,"description":183,"extension":41,"img":152,"meta":184,"navigation":44,"path":185,"seo":186,"stem":187,"tags":188,"updatedAt":182,"__hash__":191},"articles\u002Farticles\u002Fdotnet-new-install-error.md","dotnet new–install Error",null,{"type":9,"value":154,"toc":180},[155],[12,156,157,158,162,163,166,167,169,170,172,173,176],{},"Error: Could not install …\nError: Value cannot be null.\nParameter name: key\nUsage: new ",[159,160,161],"span",{},"options","\n…",[164,165],"br",{},"\nWhen building a new solution template for ASP.NET Core solution, I received the above error.  I had not seen this with prior template build efforts.  This was new with .NET Core.",[164,168],{},"\nThe error occurs when one of the node_modules folders contain a template.json file.  The solution for me, was to entirely remove the node_modules directory before attempting to build the template.",[164,171],{},"\nReference: ",[31,174],{"title":175,"href":175},"https:\u002F\u002Fgithub.com\u002Fdotnet\u002Fcli\u002Fissues\u002F8989",[31,177,175],{"href":175,"rel":178},[179],"nofollow",{"title":36,"searchDepth":37,"depth":37,"links":181},[],"2018-10-01T17:34:36.000Z","When building a new solution template for ASP.NET Core solution, I received the above error.  I had not seen this with prior template build efforts.  This was new with .NET Core.",{},"\u002Farticles\u002Fdotnet-new-install-error",{"title":151,"description":183},"articles\u002Fdotnet-new-install-error",[189,190],"aspnet","visualstudio","XRM2kTE2W4vJBJM2Tq54l8-3P9fLs6wmg5o6w7hhzcA",1781574766990]