[{"data":1,"prerenderedAt":160},["ShallowReactive",2],{"article-dotnet-new-install-error":3},{"article":4,"tags":54,"previous":82,"next":122},{"id":5,"title":6,"author":7,"body":8,"createdAt":42,"description":43,"extension":44,"img":7,"meta":45,"navigation":46,"path":47,"seo":48,"stem":49,"tags":50,"updatedAt":42,"__hash__":53},"articles\u002Farticles\u002Fdotnet-new-install-error.md","dotnet new–install Error",null,{"type":9,"value":10,"toc":38},"minimark",[11],[12,13,14,15,19,20,23,24,26,27,29,30,34],"p",{},"Error: Could not install …\nError: Value cannot be null.\nParameter name: key\nUsage: new ",[16,17,18],"span",{},"options","\n…",[21,22],"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.",[21,25],{},"\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.",[21,28],{},"\nReference: ",[31,32],"a",{"title":33,"href":33},"https:\u002F\u002Fgithub.com\u002Fdotnet\u002Fcli\u002Fissues\u002F8989",[31,35,33],{"href":33,"rel":36},[37],"nofollow",{"title":39,"searchDepth":40,"depth":40,"links":41},"",2,[],"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.","md",{},true,"\u002Farticles\u002Fdotnet-new-install-error",{"title":6,"description":43},"articles\u002Fdotnet-new-install-error",[51,52],"aspnet","visualstudio","XRM2kTE2W4vJBJM2Tq54l8-3P9fLs6wmg5o6w7hhzcA",[55,69],{"id":56,"title":57,"body":58,"description":62,"extension":44,"img":63,"meta":64,"name":51,"navigation":46,"path":65,"seo":66,"stem":67,"__hash__":68},"tags\u002Ftags\u002Faspnet.md","Aspnet",{"type":9,"value":59,"toc":60},[],{"title":39,"searchDepth":40,"depth":40,"links":61},[],"ASP.NET is an open source web framework, created by Microsoft, for building modern web apps and services with .NET.","https:\u002F\u002Fimages.unsplash.com\u002Fphoto-1598313183973-4effcded8d5e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=675&q=80",{},"\u002Ftags\u002Faspnet",{"description":62},"tags\u002Faspnet","SlUGLdZWQy8mYOWC6OetgJkwVulWNURoVHeuESIDleI",{"id":70,"title":71,"body":72,"description":76,"extension":44,"img":63,"meta":77,"name":52,"navigation":46,"path":78,"seo":79,"stem":80,"__hash__":81},"tags\u002Ftags\u002Fvisualstudio.md","Visualstudio",{"type":9,"value":73,"toc":74},[],{"title":39,"searchDepth":40,"depth":40,"links":75},[],"Develop apps for Android, iOS, Mac, Windows, web, and cloud",{},"\u002Ftags\u002Fvisualstudio",{"description":76},"tags\u002Fvisualstudio","glm3bYyBlAXGun4NJe-CV_iOzhszydeBRIpbGNNLeEk",{"id":83,"title":84,"author":85,"body":86,"createdAt":112,"description":113,"extension":44,"img":114,"meta":115,"navigation":46,"path":116,"seo":117,"stem":118,"tags":119,"updatedAt":112,"__hash__":121},"articles\u002Farticles\u002Funable-to-save-database-diagrams.md","Unable to save database diagrams","[object Object]",{"type":9,"value":87,"toc":110},[88,91,103],[12,89,90],{},"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)",[92,93,94,98],"pre",{},[95,96,97],"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,99,100],{},[95,101,102],{},"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,104,105,106],{},"Note: ",[31,107,109],{"href":108},"https:\u002F\u002Fdocs.microsoft.com\u002Fen-us\u002Fsql\u002Fssms\u002Fsql-server-management-studio-changelog-ssms?view=sql-server-2017","SSMS v18 release notes",{"title":39,"searchDepth":40,"depth":40,"links":111},[],"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.","\u002Farticles\u002Fimages\u002FrGWupsowyf.png",{},"\u002Farticles\u002Funable-to-save-database-diagrams",{"title":84,"description":113},"articles\u002Funable-to-save-database-diagrams",[120],"sql","Maa_m8xqrM2uhGGESY8pwhI8NqvDOGnAZPMbdyjrRtY",{"id":123,"title":124,"author":7,"body":125,"createdAt":151,"description":152,"extension":44,"img":145,"meta":153,"navigation":46,"path":154,"seo":155,"stem":156,"tags":157,"updatedAt":151,"__hash__":159},"articles\u002Farticles\u002Fcannot-execute-as-the-database-principle.md","Cannot execute as the database principle",{"type":9,"value":126,"toc":149},[127,130,135],[12,128,129],{},"I resolved this issue by setting database owner. My database did not have had any owner before this issue. Execute this command in your database to set owner to sysadmin account",[92,131,132],{},[95,133,134],{},"use [YourDatabaseName] EXEC sp_changedbowner 'sa'\n",[12,136,137],{},[31,138,140],{"href":139},"\u002Farticles\u002Fimages\u002Fimage_636694161252157189.png",[141,142],"img",{"style":143,"title":144,"src":145,"alt":144,"width":146,"height":147,"border":148},"border: 0px currentcolor; display: inline; background-image: none;","image","\u002Farticles\u002Fimages\u002Fimage_thumb_636694161255987537.png",416,97,0,{"title":39,"searchDepth":40,"depth":40,"links":150},[],"2018-08-09T16:55:25.000Z","My database did not have had any owner before this issue. Execute this command in your database to set owner to sysadmin account",{},"\u002Farticles\u002Fcannot-execute-as-the-database-principle",{"title":124,"description":152},"articles\u002Fcannot-execute-as-the-database-principle",[158],"sqlserver","PbylAI9ZBnAUp_zBnJXlFXGO3ZSZlRYI-Inwu0l9OrU",1781574761545]