UPDATE 2018-06-20: I was finally able to install the stand-alone version of SSDT for VS 2017 with working TFS integration. Read more about it here.
With the TFS integration enabled, you can perform basic TFS operations from inside PhpStorm. PhpStorm supports TFS up to TFS 2015. The information provided in this section assumes that you are familiar with the basics of the TFS version control system. Microsoft Git-TF for Visual Studio Team Foundation Server and Visual Studio Online Important! Selecting a language below will dynamically change the complete page content to that language. Just installed TFS addon for Visual Studio Community 2017 for mac. I’ve already managed to connect to my remote TFS and to map it to a local folder. Already through the most difficult part.
I’ve blogged a while back on how SSIS 2017 was finally here. Not much has changed; there is still no Visual Studio extension for SSIS, so if you want to create SSIS projects you still need to install SQL Server Data Tools (which makes it a bit useless that there are SSRS and SSAS extensions).
At my current client we are migrating to SQL Server 2017, so happy as I am I downloaded SSDT for Visual Studio 2017 (currently in the 15.4.0 preview version). I was happy because
So I installed SSDT and the TFS plug-in. I configured the connection to the TFS server and the mapping and downloaded all our project objects. Then I tried to open an SSIS project. I was greeted with the cheerfully “The source control provider associated with this solution could not be found. The projects will be treated as not under source control.
Do you want to permanently remove the source control bindings from this project?“. Euh, what?
Turns out, the latest version of SSDT for VS 2017 breaks the TFS mappings. Happy days. Here’s a whole thread of people with the same issue. Also for giggles, check out the comments at the download page of SSDT. Of course there’s no older version available for VS 2017, only for VS 2015 or 2013. Funny, that download page says:
“The last few downloads are provided for the unlikely event that you experience issues with the latest release.”
Unlikely event?
So I removed SSDT and the TFS plug-in. I installed the full-blown Visual Studio (not happy, but you can choose which parts to install so you can go for a very light-weight install. Still not free like SSDT) and then I installed the SSDT 15.4.0 preview again. Finally, I removed the SSRS extension (version 1.17) and installed the last version (1.19). This time, the TFS integration seems to work fine. Another option would be to downgrade to Visual Studio 2015, but then again, there you also need the full Visual Studio for TFS integration.
On a sidenote: every time you close a solution in VS 2017, the annoying start page pops up. There’s a thread on StackOverflow on how to disable this (hint: it involves the registry).
Moral of the story: even Microsoft doesn’t know how to do integration testing. 😉
SQL Server Data Tools – a free standalone download or and add-in to visual studio comes in different flavors and versions. Although this blog post uses Visual Studio 2012 and SSDT stand-alone the principles are example are also valid on Visual Studio 2013.
As you know SSDT is Microsoft developer tools for working with SQL Server databases on premises and in the cloud. It supersedes Management Studio in development functionality adding the powerful Visual Studio IDE to the rescue of developers that – for too many years – were stuck with SQL Server Management Studio.
When SQL Server 2012 was released, SSDT was also released and since then many versions have been released, not necessary following the release pattern of SQL Server.
Figure 1 SSDT version number
For each release, some new features are added. Some are still missing but they are probably coming in an upcoming release.
Team Foundation Server on the other hand has been around for quite a while. Team Foundation Server is the collaboration platform at the core of Microsoft’s application lifecycle management (ALM) solution. TFS supports agile development practices, multiple IDEs and platforms locally or in the cloud and gives you the tools you need to effectively manage software development projects throughout the IT lifecycle.
Remember : For SSDT in Visual Studio 2012 you will need TFS Express 2012. If you have SSDT 2013 you will need TFS Express 2013. You can’t mix versions!
In this post, we are going to focus on the interaction between SSDT and TFS. Developing locally and publishing the changes to an on-premises instance of SQL Server. We will look at how we can do continuous integration between development and other environments pushing the schema changes and upgrading the version numbers in a seamless manner upon successful build of the solution.
For more info about TFS, please read following: TFS overview
I am using the free version of TFS called TFS Express that can be installed locally. It is suitable for small projects only and is limited to five concurrent users. Download it here.
For creating a Visual Studio Online solution and more info about Visual Studio Online click here
On and Off-premises
At the time of writing, it is not possible to have Visual Studio Online (VSO) deploying to a local instance of SQL Server as VSO cannot “see” your on-premises SQL Servers. Even with a Hosted Build Controller.
The scenario
I am a database developer and I am working on an existing Azure SQL database that need some changes. I have some simple tables and I need to add a stored procedure to create customers ranking and a table to get hold of the customer ranking. The ranking should be calculated according to how much the customer has bought.
Stored Procedure:
Creating the project
Creating a project from an existing database in SSDT is straightforward.
In another blog post I will have a detailed look at the different ways to work with new and existing databases but for now let’s import an existing database in our project.
The first thing I always do when working on an existing database is taking a baseline for the solution. So I have an initial state of the database I eventually can return to when working on it. This is done by right-clicking on the database and choosing snapshot project. It will generate a dacpac file holding the database schema of the newly imported database. I usually name the file “baseline” and leave the timestamp so I now when it was created.
Visual Studio For Mac OsAdding the solution to Visual Studio Online
Now I need to add the database to the Source Control provider, in this case Visual Studio Online.
Visual Studio For Mac Tfs Integration ToolImplementing the changes
Now that I am done I can implement the changes necessary to database, adding the ranking table, the stored procedure and making changes to the customer table so it references the ranking table.
Listing 2: adding Foreign Key to Customer table
I also add data to the CustomerRanking table as described in the scenario above
There is also another table that I think it is important to add: Deployment. The idea behind this table is to keep track of all the deployments I’ve made, using a post deployment script that is always executed each I perform my continuous integration
Listing 3: Adding Deployment table
Total Photography Control. With RAW support for over 450 camera models, customizable batch presets, drag and drop searching, vast digital asset management features, and a full toolkit of non-destructive adjustments, ACDSee Photo Studio 4 is well-positioned as your go-to digital photography. So as I understand it ACDSee Photo Studio for Mac (Bata) is a revamp or replacement for ACDSee Mac Pro. ACDSee Mac Pro ran like a dog on my Mac after the Sierra upgrade and I was pleased to see the ACDSee Photo Studio for Mac (Beta) release arrive. Acdsee photo studio for mac beta. ACDSee Photo Studio Beta 8 Release Notes New Features. Added ability to open the target of alias folders in ACDSee; Added ability to enter cropping dimensions in Develop mode. ACDSee Photo Studio Beta 9 Release Notes New Features. Added Display P3 as an output color space option. ACDSee Photo Studio for Mac 4 ACDSee Photo Editor 10 ACDSee Video Studio 3. ACD Systems International Inc. Reserves the right to limit high quantity orders.
Now that I’ve done my changes I can build my project (necessary before taking a snapshot), take a snapshot project of my database, call it “change_complete”, and leave the timestamp as is.
Create a deployment profile
Before I can deploy I need to create a profile telling Visual Studio where to deploy upon successful build
Implementing the continuous integration
The idea is to have the database deployed each time I check the source code in. At the same time I want the deployment table to keep track of the deployments.
To achieve that I start by creating a post-deployment script:
![]() Visual Studio Mac Connect To Tfs Server
For modifying the deployment options go to the Source Control explorer tab and add a new build definition.
Figure 4: Adding a build definition
This is the page where you can control what happens during a build. Fruity loops for mac.
What we want here is to tell Visual Studio to use msbuild to deploy the database on any successful builds. This is done by:
The arguments necessary for the example are:
Visual Studio Tfs Setup
So in my case the arguments (separated by space) would be:
/t:build /t:publish /p:SqlPublishProfilePath=ContinuousIntegrationINT.publish.xml
You’re done!
Save the New build configuration. Every future check in should trigger a build and a publish to the database specified in the publish file.
Next time you check in it, your build definition should kick in and build the project:
The Build menu of the Team Explorer should show the current build:
And finally the Build log should show the progress and status:
Finally the database specified in your Publish file (ContinuousIntegrationINT) should be created where you specified it and the schema copied and your post deployment script executed so the Deployment table should show the data of the deployment
In the next post I will show you how to do unit testing of your SSDT database project. In the meantime: Happy deploying!
Régis BaccaroVisual Studio Tfs Tutorial
Régis is a Principal Consultant at Rehfeld a/s working with databases and administrations since 1999. He has been working with Business Intelligence since SQL Server 2000 and with SharePoint since 2003. He specializes in mentoring, performance tuning and scalable architecture of datawarehouses and bi-solutions.
His background and work experience mixes technology and business, providing him a unique edge to contribute to datawarehouse and SharePoint projects, being able to effectively interact with technical and business decision makers. Régis is a frequent speaker at SQL Server conferences and is a board member of the Danish SQL Server User Group and the founder of the SQL Saturday Denmark community event. In april 2014 Régis received the MVP award for SQL Server for his involvment in the product and the community. View all posts by Régis Baccaro Latest posts by Régis Baccaro (see all)
Related posts:Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2020
Categories |