SlowCheetah transform config - slowcheetah

I am confused about where SlowCheetah looks to determine which transforms to add.
When I go to build/Configuration Manager, I can add new profiles, then go to appsettings.json, right-click, Add Transform, and it will add a new transform (empty file) based on that profile.
However, if I delete the Release and Debug profiles from Build/Configuration Manager, then add transforms again, it still generates appsettings.Debug.json and appsettings.Release.json.
Is it looking somewhere else in addition to Configuration Manager profiles?

The confusion here was due to confusing behavior in Configuration Manager.
If you create a new configuration, in order to delete that configuration, you have to first delete it from the Active Solution Configuration dropdown, then delete it again from project's configuration dropdown (even if they don't have it selected).
Definitely non-intuitive behavior from Visual Studio's build configuration manager.

Related

Change default gitignore file when creating a new project

Is there a way to change the default file .gitignore that Android Studio creates when creating a new android project? I searched for it in the Settings but could not find anything.
Unfortunately, there is no way to do that automatically, besides the one Ted has mentioned.
However, personally, I don't see this as a big downside, because you can thus safely add your specific templates that fit best to your project.
To be able to do this, do the following:
Go to File -> Settings and from there highlight Plugins. Click on Browse repositories... and you should be able to find the plugin entitled .ignore. Install it.
Now to configure a .gitignore for any project, in case you have no project opened, click on Configure -> Settings. In case you have an open project, go to File -> Other Settings -> Default Settingsā€¦. Now expand Version Control and click on Ignore Files Support. You should be able to add a custom user template of your .gitignore-file there.
To use any template you've added there, just right click on your .gitignore and click on Add templateā€¦. There you'll be able to add your custom specifications, however, many others are given by default, so you don't need to do a google search for an OS or language specific .gitignore configuration.
Good question. I tried manually modifying the project_ignore template in the Android Studio installation (located at C:\Program Files\Android\Android Studio\plugins\android\lib\templates\gradle-projects\NewAndroidProject\root in my Windows installation). That works, but it causes any future updates to Android Studio to fail unless you restore the original template first.
I'm posting this as an answer because it works. But it has such a bad down-side that I'm also starting a bounty in the hopes that someone can come up with a better solution.
On Mac, Applications->Android Studio.app(right click -> show package contents) -> contents-> plugins\android\lib\templates\gradle-projects\NewAndroidProject\root\ , i tried modifying, project_ignore file. i dont see error every time while looking for updates. instead of replacing, i appended at the end.

How to disable visualstudio.com stored project's multiple check-out?

I have a project stored in visualstudio.com. However when I have a file checked out, my colleagues can do the same. How can I disable that feature? I went to TEAM -> Team Project Settings -> Source Control in VS 2012 and disabled "Enable multiple check-out". However nothing seems to have changed. Do I need to do something else with that? Secondly, I read this but when I right click a file and chose "Check-out for edit", it only has "Unchanged" and "CheckIn" lock types but no "Check-out" which, as I understand, is the thing I need to chose. So, is there a way to make sure only one person can edit a file at one time?
What kind of workspace are you using? Make sure you're using a server workspace. If you're using a local workspace which is the default when you create a new workspace in VS 2012/TFS 2012, checkout locks are disabled. For more info on local and server workspaces:
Decide Between Using a Local or a Server Workspace.

Large solution ClickOnce distribution

I have a larger solution that I desire to distribute via ClickOnce. It consists of one main shell executable that directly references only a small subsection of libraries and processes that constitute the solution.
The solution consists of a few other processes and several libraries (some C++). I need to be able to include all of these libraries and processes in one ClickOnce distribution for both local builds and TFS server builds.
I cannot reference every other library and process form the shell project. And I do not wish to push these files into a MSI to be treated as a prerequisite as it would defeat the purpose of using ClickOnce to distribute/update the product.
What is the correct method to incorporate all of our necessary files/projects into a single ClickOnce distribution?
The IDE won't detect native DLLs as dependencies when publishing, but you can run the SDK tools directly to include them manually in your ClickOnce distribution. You can either use mage.exe in your post-build script or run MageUI.exe to have a wizard to guide you through the package generation.
Suggested reading:
Walkthrough: Manually Deploying a ClickOnce Application
Understanding Dependencies of a Visual C++ Application
There is an alternative to Visual Studio for this kind of situation. You could try using Mage, but it can be a little tricky to use. My company wrote an alternative called ClickOnceMore.
ClickOnceMore is a ClickOnce build tool for when you don't want or can't use Visual Studio to do ClickOnce builds.
There is a specific page on the UI for including files (using rules to include anything from a single file to an entire directory trees) so you should be able to do exactly what you need with it.
This is what I have done in a similar situation. I use TFS at work, so convert the terms to whatever you may use (or not use) for source control.
I have a main workspace that I use for all development of my application, I keep this workspace pristine.
I then created another workspace with a proper name (ex: solution-deploy) and in this workspace I do the following:
Get latest and merge everything from source-control into the deployment workspace
I build a Release build of my application
I r-click on the root (I put them in the root, because I need to access them from there, put them in whatever folder you want) project folder for my deployment project and select "Add -> Existing Item"
I browse in the file selector to the Release directory of the assemblies I want to add to my deployment package, select them, then I use the arrow next to the Add button and drop down to "Add As Link", do this for all of the assemblies you want to add and place them wherever you want them to be organized in your deployment
In the Solution Explorer, select the added assemblies and in the Properties window set the Build Action to "Content", this should be all you have to do, but others have had to also set the "Copy to Output Directory" to "Copy Always", I don't do that
Run a Release Build
Go to the Properties view for your deployment Project
Go to the Publish Tab and Click on the Application Files button
Your files should all be available and added to the Deployment
Set up your ClickOnce settings however you need them to be
Publish your ClickOnce package
Your published package should contain all of the assemblies you need now.
Keep your separate Deployment workspace set up this way and never check it in. Do your work in your development workspace. Whenever a new deployment is needed, open your solution in your Deployment workspace and get the latest code, build, then publish.

how to add files in web.config transformation process?

I am having a website developed in Visual Studio 2012.
The web.config is currently containing following files in its transformation:
- web.Debug.config
- web.Release.config
I have recently added a new build configuration (named as "Staging") in my project. How can I create a "web.Staging.config" transformation file?
There are two ways for the web.config transform files to be generated within VS:
If you have a web application project, Right-click on web.config and choose Add Config Transform. This will add any config transforms that are missing from your project based on build configurations (i.e. if you have Production and Staging build configs, both will get a transform added).
This method is not supported for Website projects as they do not support multiple build configurations.
In either web project type, right click on a publish profile (.pubxml) and choose Add Config Transform. This will add a new config transform for that profile only.
This requires VS2012 Update 2 or the Azure SDK 2.0 for VS2010 (I think).
In a web site project, the new transform file will not be nested under web.config as VS doesn't support that behavior. Just look for it in the root folder.
IN VS 2012:
Go to Build->Configuration Manager
Click on the Active solutions configuration and select "New".
Enter the name of your new configuration and click Save.
Right click on your Web.config file and select Add Config Transform.
Your new transform file will be automatically created.
You need to first install the Configure Transform extension [Extensions -> Manage Extensions -> Online section] to see the option when right-clicking your web.{environment}.config files.

Visual Studio 2012 - Database Project - setting a default profile for publish

Just wondering if anyone knows how to set a saved publish profile as the default i.e. profile that's automatically loaded when I select publish. I love the new profile approach but I'm a bit over having to reselect the same profile over and over while I'm developing.
In VS2012 and up, you can set the Default Publish Profile by right-clicking on the .xml profile file and clicking the Set As Default Publish Profile option. It will then be auto-loaded when you click to Publish the project.
So I've just discovered how to do this, right click on the specific .xml file (e.g. Debug.publish.xml) that you wish to publish and it is automatically loaded into the Publish panel.
Double clicking the XML file also works
The latest Visual Studio 2012 Updates also now include right click options for:
1 - Set as default
2 - Publish
Rob, you may want to consider setting up some batch files that call SQLPackage to use your desired Publish profile. I blogged about it here: http://schottsql.blogspot.com/2012/11/ssdt-publishing-your-project.html
For our dev team, we have a set of batch files set up that can build one or all databases locally from whatever branch they're currently using. That makes it a lot easier to update the local database. The "Publish All" batch file takes a little time to run but is still better than opening each project individually to publish the databases.
Slightly odd issue: I renamed my .xml file to .localdev.xml....file name is "double extension'd" - VS/Datatools looks for ".publish.xml" NOT just the .xml file. In my case I needed "*.localdev.publish.xml". When it had the wrong name the "Set as Default Publish Profile" right click option DID NOT show up, nor did double-clicking...where is Molder when you need him?!?!? ;)
Get the name right, get the right functionality......MS needs better, more creative QA people!! ;)

Resources