SQL Server Management Studio Skin / Appearance / Layout - ssms

Can you apply a custom skin / appearance to SSMS? I am thinking something along the lines of a dark theme (black background, yellow font) you'd find in most IDEs

I decided to try something simple on SSMS 2012:
Go to http://studiostyl.es/
Pick a theme and download it
Follow these screenshot instructions
Note that doing this will only affect the theme of the text editor, not the toolbar, menu, object explorer window, etc.

SSMS 2012 is build on the VS 2010 shell. Thus, it can use compatible ".vssettings" files to apply custom color schemes.
See also http://studiostyl.es/ for a gallery.

If you are using SSMS 2016 (or later) you can use the Microsoft's own Dark theme once you've enabled it.
You can find instructions at Kyle Parrish's blog post titled Enable "Dark" Theme in SQL Server Management Studio 2016

For SSMS 18:
There is already a default dark theme which is removed by key.
You need to go to following file, go to section "Remove Dark theme" and comment the key out. The you will find the dark-theme in the settings. (Menu>Options>Environment/General - Color Theme)
C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\ssms.pkgundef
// Remove Dark theme
//[$RootKey$\Themes\{1ded0138-47ce-435e-84ef-9ec1f439b749}]
I found also a nice solution on a website that has a prepared powershell statement to change this:
powershell -Command "(gc 'C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\ssms.pkgundef') -replace '\[\`$RootKey\`$\\Themes\\{1ded0138-47ce-435e-84ef-9ec1f439b749}\]', '//[`$RootKey`$\Themes\{1ded0138-47ce-435e-84ef-9ec1f439b749}]' | Out-File 'C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\ssms.pkgundef'"
( Source: https://www.sqlshack.com/setting-up-the-dark-theme-in-sql-server-management-studio/ )

Here is my dark theme which you can download:
https://stingrae.com.au/dark-theme-for-microsoft-sql-management-studio.aspx

Related

Use .wid files with Visual Studio 2017

I have created a Setup Project with Visual Studio 2017 Professional (.vdproj file). I would like to use a Password Dialog as suggested in this page:
https://www.codeproject.com/Tips/659367/Password-Dialog-for-Visual-Studio-Deployment-Proje
This tutorial has been written for Visual Studio 2012 and it's working great, putting the file VsdUsernamePasswordDlg.wid into this folder:
"C:\Program Files (x86)\Microsoft Visual Studio
10.0\Common7\Tools\Deployment\VsdDialogs\1033"
But I can't find the right place to put this file to use it with Visual Studio 2017.
EDITED 09.10.2017
I followed the instructions given by PhilDW but when I try to compile the Setup Project I get this error: ERROR: No such interface supported.
I can't see the Password Dialog among the possible choices:
They are in:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\VSI\bin\VsdDialogs\1033
on my system. If you cannot find any .wid files at all it's probably because the installer project extension is a separate add-in, from here:
https://marketplace.visualstudio.com/items?itemName=VisualStudioProductTeam.MicrosoftVisualStudio2017InstallerProjects
A .wid file is basically a merge module that gets included into the MSI file, and the .wid file in that CodeProject article is just one of the standard edit dialogs that has the password bit set in the attributes of the control. In other words you can achieve the same result in this way:
Choose the additional dialog you want to install, and in this example I will use TextBoxes (C). Build the MSI file.
Open the MSI file with Orca, and go to the Control table. Click on the Dialog heading to sort, then look at the CustomTextC dialog entries. Edit2 and Edit4 will be the two password entries (because Edit1 and Edit3 are usernames in this example). The Attributes value will be 7, change it to 2097159, because you are just adding the value here that makes it a password control:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa368042(v=vs.85).aspx
Save your MSI file.
So in that article the author copied one of the TextBoxes .wid files, opened it with an MSI file editor such as Orca, went to the Control table, made the changes I just made, then saved it as a new .wid file. You can do exactly the same thing if yoi don't want to edit your MSI file.
To complete the answer from PhilDW I write here the solution to use .wid in .vdproj projects in VS 2013 and 2017. You have to put them into:
Visual Studio 2017
C:\Program Files (x86)\Microsoft Visual Studio\2017\ VS_Version
\Common7\IDE\CommonExtensions\Microsoft\VSI\bin\VsdDialogs\1033
Where VS_Version is the name of your VS Version: Community, Professional etc.
Visual Studio 2013
C:\Program Files (x86)\Microsoft Visual Studio
12.0\Common7\IDE\CommonExtensions\Microsoft\VSI\bin\VsdDialogs\1033

Can Orchard 1.8.x be installed on a build server that does not have Visual Studio Installed?

I also asked this question on the Orchard forum but no joy there yet. So here it is again...
https://orchard.codeplex.com/discussions/569444 Please read for a few more details.
IF the .NET 4/4.5 SDK came with a developer command prompt (like previous SDKs) then I would not be asking this question.
But since Orchard is build with .NET 4.5 I am getting build errors using the old SDK. It seems that my only option is to install Visual Studio Express on the build server.
I am doing that as we speak so at this point the question is purely academic but I am still curious.
EDIT
STILL NO JOY. Even after installing VS 2013 Express Web the vcvarsall.bat that usually configure the build environment is still not present. So this is no longer a curiosity question. The Express edition also cannot create my build environment. Help.
Seth
Here is my answer...copied and pasted from the forum.
This is a late answer. Bottom line is that I did eventually get our build server to build orchard projects. I am not sure if this is a complete answer or not as I should have answered as soon as I had it done. But I pretty sure this will work.
One other thing to note...It is quite possible that not all of these steps are required. I tried a lot of different things and it might be in the end some of the steps were not needed. It might also reflect a problem on our build server...especially the fact that I had to manually add registry entries.
But here it is without details.
Install the .NET Framework SDK for Windows 7.1.
http://www.microsoft.com/en-us/download/details.aspx?id=8279
Install the .NET 4.5 Full
http://www.microsoft.com/en-us/download/details.aspx?id=30653
Install Visual Studio 2013 Express for Web
http://www.visualstudio.com/en-us/products/visual-studio-express-vs.aspx
Install the Visual Studio 2013 Build Tools
http://www.visualstudio.com/en-us/products/visual-studio-express-vs.aspx
Finally, even after that...it didn't work until I added the following registry keys. I would attach the .reg file but I don't see how.
Save the lines between the lines into a fixBuild.reg file. Then double click...
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7]
"FrameworkDir32"="C:\Windows\Microsoft.NET\Framework\"
"FrameworkDir64"="C:\Windows\Microsoft.NET\Framework64"
"11.0"="C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\"
"FrameworkVer32"="v4.0.30319"
"FrameworkVer64"="v4.0.30319"
"12.0"="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\"
Finally, to actually do the build, I created a batch file that does the build.
Save the lines between the lines into a doBuild.cmd file. Be sure to place this in the root of the source download...then double click to build...
call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\VsDevCmd.bat"
msbuild /t:FastBuild Orchard.proj
The first line gets your environment ready. The second build the project using the FastBuild target in the Orchard.proj file. You can read that file if you want to try other build targets.
******* EDIT
There is one thing I forgot to mention. And that is that one thing you have to do to get this to work is that you have to edit some CSPROJ files because the command line build fails with errors like these...
\Orchard\src\Orchard.Web\Modules\CKEditor\CKEditor.csproj(337,6): error : "None" element name for include "Placement.info" should be "Content".
\Orchard\src\Orchard.Web\Modules\Orchard.Tokens\Tests\Orchard.Tokens.Tests.csproj(82,6): error : "None" element name for include "app.config" sh
\Orchard\src\Orchard.Web\Modules\TinyMceDeluxe\TinyMceDeluxe.csproj(377,6): error : "None" element name for include "app.config" should be "Cont
\Orchard\src\Orchard.Web\Modules\Upgrade\Upgrade.csproj(156,6): error : "None" element name for include "app.config" should be "Content". [C:\Us
\Orchard\src\Orchard.Web\Themes\Themes.csproj(280,6): error : "None" element name for include "Upward\Views\Content-Story.Detail.cshtml" should
The fix is to do exactly what the error indicates. Open the csproj files and search/replace "
Also, some of the projects reference app.config files that do not exist in source. You also have to remove those references. I usually just delete the content node entirely or the group entirely.
Seth

Removing all templates from SQL Server Management Studio

So in SSMS, the template browser has all of these preloaded templates that i personally will never use. I'd rather just clear this out so i can start my own structure, however, everytime i delete them from:
C:\Users[user]\AppData\Roaming\Microsoft\SQL Server Management Studio\11.0\Templates
and reboot SSMS, they all magically reappear. The templates that are in there are more or less worthless to me, but i would like to get out of saving query projects or quick templates to a folder and just put them in here for organization and ease. There's no settings that i can find that causes the behavior so i was wondering if anyone had an idea how to disable this feature.
Any help would be appreciated!
If you want to remove the default templates completely, we need to delete the files and folders under both of the following folders:
64-bit SQL Server:
%ProgramFiles(x86)%\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\SqlWorkbenchProjectItems\Sql
C:\Users\<user>\AppData\Roaming\Microsoft\SQL Server Management Studio\11.0\Templates\Sql\
32-bit SQL Server:
%ProgramFiles%\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\SqlWorkbenchProjectItems\Sql
C:\Users\<user>\AppData\Roaming\Microsoft\SQL Server Management Studio\11.0\Templates\Sql\
In SSMS 2008 R2 the folders are:
C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\SqlWorkbenchProjectItems\Sql
C:\Users\<user>\AppData\Roaming\Microsoft\Microsoft SQL Server\100\Tools\Shell\Templates\Sql
Instead of deleting the existing templates, I created a "z MS Shipped" folder and moved them into there, just in case.

TypeScript 0.9.* VisualStudio TS5037: Cannot compile external modules unless the '--module' flag is provided

I do get the TypeScript compiler error TS5037: Cannot compile external modules unless the '--module' flag is provided.
I am using TypeScript 0.9.1.1 und Visual Studio 2012.
Where can I set the --module option in Visual Studio?
Web Essential seems to no longer support this option in the dialog.
Thankx, Harry
Update:
I have a configuration file (config.ts) for my project. This file contains many statements as the following:
export var loggedInUserId: number = 0;
There are no other statements as the one before. Do I have to define a class or module around it?
I was having this problem in Visual Studio 2013, even with that setting above set correctly. It turns out there's a project-level setting as well. If you go to Project Settings on the project with TypeScript (highlight the project and type Alt+Enter), then go to the TypeScript Build tab, and select AMD under "Module System"
You can find the option for non project files here (Tools - options - Editor - TypeScript):
For my project based work I use grunt : https://github.com/basarat/grunt-ts

Making SSDT just generate a SQL script (and not deploy a database)

Having recently upgraded to SSDT 2012 I seem to be missing the option to just generate a T-SQL script instead of deploying the database to a server somewhere.
To be more accurate the predecessor to SSDT used to set the Deploy action to 'Generate script', but I cannot locate that option anywhere in the new version.
Is it possible?
To generate a script from an offline data project in SSDT rather than deploy to a target database, configure the project settings as shown below
You may want to look at the SQLPackage command line. You can set the options there to use an action of "script" and specify an outputfile name to generate scripts instead of publishing the database. You can also do that through a batch file so it will generate a script every time. You still need to provide a source project and target database, though. The reference for SQLPackage can be found here: http://msdn.microsoft.com/en-us/library/hh550080%28v=VS.103%29.aspx
Yes, it is possible.
Is you select Build > Publish ProjectName... from the menu bar, a dialog window pops-up with publishing options – there's a Generate Script button at the bottom of the dialog window.
I also had a problem where the SSDT project would attempt to deploy changes when the project was run.
In the project properties, choose the "Debug" tab. Change the Start Action to "None". That will prevent it from trying to deploy at that time.