Event: Windows 10 Dev Readiness Webcasts
Resolve – TF255050: A connection cannot be made to the Report Server WMI provider
Resolve – TF400069: You must install either SQL Server Analysis Services version 11.0 …
Fixing Warning – TF255119: The Windows Service Control Manager could not be contacted on
5 steps to targeting multiple .NET frameworks
Resolve – TF250049 and TF250067
Tech Nibbles 05 Jul, 2015
Passing Parameters to PS/DSC Scripts in vNext Release Templates – VS Release Management
In the vNext Release Templates there are few ways to pass parameters/configuration variables to a PS/DSC Script. Variables in five different levels can be used for this.
Global Variables – Defined at the Release Management Server level in Administration – > Settings – > Configuration Variables.
Server Variables – Defined at the Registered Target Server level in Configure Paths –> Servers –> Server –> Configuration Variables. The values defined in Server Variables will override the values of the variables defined in Global Variables.
Component Variables – Defined at the Release Component level in Configure Apps –> Components –> Component –> Configuration Variables. The values defined in Component Variables will override the values of the variables defined in Global and Server Variables.
Action Variables – Defined in the Release Template, Deploy Using PS/DSC action in Configure Apps –> vNext Release Templates –> vNext Release Template –> Deploy Using PS/DSC. The values defined in Action Variables will override the values of the variables defined in Global, Server and Component Variables.
All above four levels of Configuration Variables are supported with encrypted value by selecting the type Encrypted.
These variables can be managed in the release template using Configuration Variables and Resource Variables.
Variables in Configuration Script File – These variables will be defined in a configuration script file and should be available with the build output. These files will allow to source control configuration variables for each stage. There is no encryption for the variables defined in a script file. The values defined in Script File Variables will override the values of the variables defined in Global, Server, Component and Action Variables.
Passing Action Variables
To pass the Customer Name to the below script Action Variable can be used.
This script should be available in build output.
Component Should be setup to download the script to target server.
In the Deploy Using PS/DSC action the configuration variable CustomerName can be set like below.
When release triggered the scripts get downloaded to target server.
The value passed for CustomerName can be verified in the log.
Passing Component Variables
When component variable is only set it is getting passed to the script.
Action Variable Value Overriding Component Variable Value
When both Component and Action variable values set action variable value gets the precedence.
Setting Variables Using Script File
Configuration Variables can be set using a Script File as well.
This configuration variable script file should be available in build output.
When release triggered configuration variable script file is also copied to the target server.
Release PS/DSC script uses the configuration variable value defined in the configuration script file.
Script File Values Overriding Action and Component Variable Values
When value is defined for configuration variable in Component, Action and in a Configuration File the Configuration File get the precedence.
TFS on Azure – 01. Setup Virtual Network for AD in Azure
Prerequisite of setting up an AD (Active Directory) in Azure is to setup a virtual network. Step by step guide is below.
In Azure Management Portal go to Networks and click on Create a Virtual Network.
Provide a name for the Virtual Network and select the closest region.
Keep the DNS Server and VPN Connectivity empty for the time being since after setting up AD in and DNS server this can be configured later.
Set 256/24 for Classless Inter-Domain Routing (CIDR). More information on CIDR can be found in below links.
http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing
http://searchnetworking.techtarget.com/definition/CIDR
http://compnetworking.about.com/od/workingwithipaddresses/a/cidr_notation.htm
Once the final step of wizard submitted, the Virtual Network creation starts.
In few minutes Virtual Network is ready for use.
Event: Windows 10 Dev Readiness Webcasts
Coming soon is a series of live webcasts that deliver first-hand guidance on how you can leverage the new Windows 10 development model. The webcasts will be presented and moderated by Microsoft MVPs around the world at no charge and are a great opportunity for you to not only learn the foundations of Universal App Development in Windows 10, but also to connect with some of the top experts in your country and/or language. Bring your Windows Store app development questions and have them answered live, by the experts, and learn how to take advantage of the great opportunities ahead in the Universal Windows Platform.
- Each webcast will deliver the same content in different countries from June 8 – 12.
- They will last from one to three hours, depending on the amount of community interaction.
View the agenda and register for these free webcasts at: http://ln.ganshani.com/win10mvp2015
I’m also glad to have some of my SEA MVP friends Walter Wong and Tim Chew present a session on Universal Windows Platform.
Resolve – TF255050: A connection cannot be made to the Report Server WMI provider
When setting up reporting services in a remote server for TFS below error might occur.
*******************************************************************************************************
TF255050: A connection cannot be made to the Report Server WMI provider. Verify the following:
1. You have entered the correct name for the server, including the instance name.
2. The Windows Management Instrumentation service is running on tfsssrs.
3. The service is not blocked by Windows Firewall.
4. You have the required permissions to connect.
Details:
The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
*******************************************************************************************************
Verify reporting services running and all ports as specified in the “Ports required for installation of Team Foundation Server” are open.
WMI Service is running in report server.
WMI Service is allowed in Firewall of the report server.
Report server URLs populated after all above set.
Tech Nibbles 11 Jul, 2015
Welcome to Codetails!
Our Tech Nibbles list for 11 Jul, 2015 has 8 articles that are a must read for developers, designers and architects who are working on Microsoft Technologies or are passionate about Microsoft.
- Just released: Windows 10 Application Deployment tool
With the latest release of Windows 10 SDK Preview Build 10166, we are excited to introduce the Windows 10 Application Deployment (WinAppDeployCmd.exe) tool.
Windows Apps Team More: http://blogs.windows.com/buildingapps/2015/07/09/just-released-windows-10-application-deployment-tool/
- Getting faster downloads from MSDN with IE11
I use MSDN a lot to download MSDN licensed software and patches and one of the issues I’ve seen with these downloads is the download speed.
More: http://www.ganshani.com/blog/2015/07/getting-faster-downloads-from-msdn-with-ie11/
- Build native iOS, Android and Mac apps in C#
Mobile development skills are in demand, and Xamarin for Students gives you an edge over the competition. With Xamarin for Students, you can build native iOS, Android, and Windows apps with Xamarin Studio and Visual Studio, for free.
More: http://xamarin.com/student
- UNITY 3D – Leap Motion Integration
The future of human computer interaction (HCI) is about to have a paradigm shift.
Vahe Karamian More: http://www.codeproject.com/Articles/1007186/UNITY-D-Leap-Motion-Integration
- Visual Studio 2015 – Analyzing Architecture with Code Maps in Visual Studio 2015
Our starting point was the Roslyn solution opened in Visual Studio, and already built. To get there, we cloned the Git repository from https://github.com/dotnet/roslyn, using the Git cloning experience on the Connect tab of the Team Explorer window of Visual Studio, and then opened the RoslynLight.
Blair McGlashan More: https://msdn.microsoft.com/en-us/magazine/mt238403.aspx
- Visualizing Elasticsearch Watcher events using ASP.NET 5, SignalR and Angular
This article shows how to display Elasticsearch Watcher events in an Angular UI using SignalR. The Elasticsearch Watcher events are sent to a MVC 6 controller in an ASP.NET 5 application.
damienbod More: https://damienbod.wordpress.com/2015/07/05/visualizing-elasticsearch-watcher-events-using-asp-net-5-signalr-and-angular/
- Angular Tutorial – Part 3: Understanding and using Directives
In this article we will try to understand the basic concept of directives in angular. We will look at how directives are used in angular and try to use some built in directives in angular. Traditionally web only consisted of static HTML pages linked with each other.
Rahul Rajat Singh More: http://www.codeproject.com/Articles/1007001/Angular-Tutorial-Part-Understanding-and-using-Dire
- Windows 10 Development Training Resources
Tejaswi More: http://blogs.msdn.com/b/continuous_learning/archive/2015/06/29/windows-10-development-training-resources.aspx
Thanks,
Codetails Team
PS: You can also follow us on our Facebook Page for regular updates
Send Custom Build Notes with TFS Build Using PowerShell
One of the teams, required a customized build note including only Bug, User Story work items listed with few details. The default alert email of the TFS 2013 only send an email in below format which does not say which is the type of the work item associated with the build. It just said “work item <id>” for any work item and team was not happy about that.
Very interesting solution provided here with PS scripts by MIKAEL DEURELL.
Few issues were there in the sample script provided in MIKAEL DEURELL‘s article the team who requested this specific build note is not happy about.
1. Since it depends on the date of the last good build to get the associated work items for current build, it is not possible to queue a build for a previous changeset to make it the last good build and another with latest changeset will not send the associated work items correctly.
2. It sends all the work items and the team only wanted user story and bug WITs.
3. If a task work item associated it does not send the parent work item.
4. Team wanted the note to be formatted in a more readable format.
To overcome these issues the enhanced version of the sample script provided in MIKAEL DEURELL‘s article is below.
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.TeamFoundation.Client") [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.TeamFoundation.Common") [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.TeamFoundation.Build.Client") [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.TeamFoundation.Build.Common") [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.TeamFoundation.VersionControl.Client") [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.TeamFoundation.VersionControl.Client.VersionSpec") [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.TeamFoundation.WorkItemTracking.Client") $tfsCollectionUrl = "http://tfsserver:8080/tfs/projectcollection" $server = new-object Microsoft.TeamFoundation.Client.TfsTeamProjectCollection(New-Object Uri($tfsCollectionUrl)) $buildServer = $server.GetService([Microsoft.TeamFoundation.Build.Client.IBuildServer]) $buildDetail = $buildServer.QueryBuilds("teamprojectname", "builddefinitionname") | where { $_.BuildDefinition.LastGoodBuildUri -eq $_.Uri } #| select BuildNumber $buildDetail.BuildNumber | Out-File "$PSScriptRoottmpBuildNumber.txt" $versionControlServer = $server.GetService([Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer]) $workItemStore = $server.GetService([Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore]) $LinkingService = $server.GetService([Microsoft.TeamFoundation.Client.TswaClientHyperlinkService]) $lastGoodBuildStartTime = $buildDetail.StartTime $changesetVersionSpec = New-Object Microsoft.TeamFoundation.VersionControl.Client.ChangesetVersionSpec($buildDetail.SourceGetVersion.Substring(1)) $latest = [Microsoft.TeamFoundation.VersionControl.Client.VersionSpec]::Latest $recursionType = [Microsoft.TeamFoundation.VersionControl.Client.RecursionType]::Full $historySinceLastGoodBuild = $versionControlServer.QueryHistory("$/Orca/Main", $latest, 0, $recursionType, $null, $changesetVersionSpec, $latest,[Int32]::MaxValue, $true, $false) $historySinceLastGoodBuild.Length | Out-File "$PSScriptRoottmpHistoryCount.txt" $workItemsSinceLastGoodBuild = $historySinceLastGoodBuild | foreach-object {$_.workitems} $workItemsSinceLastGoodBuild.Length | Out-File "$PSScriptRoottmpWorkItemCount.txt" $tabName = "WorkItemTable" #Create Table object $WorkItemTable = New-Object system.Data.DataTable “$tabName” #Define Columns $colWorkItemType1 = New-Object system.Data.DataColumn WorkItemType,([string]) $colId = New-Object system.Data.DataColumn Id,([int]) $colTitle = New-Object system.Data.DataColumn Title,([string]) $colState = New-Object system.Data.DataColumn State,([string]) $colAssignedTo = New-Object system.Data.DataColumn AssignedTo,([string]) $colWILink = New-Object system.Data.DataColumn WILink,([string]) #Add the Columns $WorkItemTable.columns.add($colWorkItemType1) $WorkItemTable.columns.add($colId) $WorkItemTable.columns.add($colTitle) $WorkItemTable.columns.add($colState) $WorkItemTable.columns.add($colAssignedTo) $WorkItemTable.columns.add($colWILink) $workItemsSinceLastGoodBuild | foreach-object { if ($_.Type.Name -eq "Task") { # Get parent work item of task foreach($link in $_.WorkItemLinks) { if ($link.LinkTypeEnd.Name -eq "Parent") { $ParentWorkItem = $workItemStore.GetWorkItem($link.TargetId) #Create a row $row = $WorkItemTable.NewRow() #Enter data in the row $row.WorkItemType = $ParentWorkItem.Type.Name $row.Id = $ParentWorkItem.Id $row.Title = $ParentWorkItem.Title $row.State = $ParentWorkItem.State $row.AssignedTo = $ParentWorkItem.Fields["Assigned To"].Value $row.WILink = $LinkingService.GetArtifactViewerUrl($ParentWorkItem.Uri).AbsoluteUri #Add the row to the table $WorkItemTable.Rows.Add($row) break } } } else { # Adding associated work item other than task #Create a row $row = $WorkItemTable.NewRow() #Enter data in the row $row.WorkItemType = $_.Type.Name $row.Id = $_.Id $row.Title = $_.Title $row.State = $_.State $row.AssignedTo = $_.Fields["Assigned To"].Value $row.WILink = $LinkingService.GetArtifactViewerUrl($_.Uri).AbsoluteUri #Add the row to the table $WorkItemTable.Rows.Add($row) } } $WorkItemTable.Rows.Count | Out-File "$PSScriptRoottmpWorkItemTableCount.txt" $style = "<style>BODY{font-family: Arial; font-size: 10pt;}" $style = $style + "TABLE{border: 1px solid black; border-collapse: collapse;}" $style = $style + "TH{border: 1px solid black; background: #dddddd; padding: 5px; }" $style = $style + "TD{border: 1px solid black; padding: 5px; }" $style = $style + "</style>" $messageBody = $WorkItemTable |sort WorkItemType,Id -Unique | Select-Object WorkItemType, Id, State, Title, AssignedTo, WILink | ConvertTo-HTML -head $style | Out-String $Recipients = @("user1@yourOrg.com", "user2@yourOrg.com", "user3@yourOrg.com") Send-MailMessage -From "tfs@yourorg.com" -To $Recipients -SmtpServer "YourSMTPServer" -Body $messageBody -Subject "$Env:TF_BUILD_BUILDNUMBER Build Notes" -BodyAsHtml |
One more enhancement could be made to the script to generate the note in pre build and send it in post build. That is by changing the below script segment to write to a temp file in pre build.
$messageBody = $WorkItemTable |sort WorkItemType,Id -Unique | Select-Object WorkItemType, Id, State, Title, AssignedTo, WILink | ConvertTo-HTML -head $style | Out-String $Recipients = @("user1@yourOrg.com", "user2@yourOrg.com", "user3@yourOrg.com") Send-MailMessage -From "tfs@yourorg.com" -To $Recipients -SmtpServer "Ad-ex2003.domainx.local" -Body $messageBody -Subject "$Env:TF_BUILD_BUILDNUMBER Build Notes" -BodyAsHtml |
Above can be changes as shown below so that it writes to a temp file in pre build.
1 |
$WorkItemTable |sort WorkItemType,Id -Unique | Select-Object WorkItemType, Id, State, Title, AssignedTo, WILink | ConvertTo-HTML -head $style | Out-File "$PSScriptRoot..tmpBuildNote.txt" |
In post build the temp file content can be read like shown below and send the email.
$messageBody = Get-Content "$PSScriptRoot..tmpBuildNote.txt" | Out-String $Recipients = @("user1@yourOrg.com", "user2@yourOrg.com", "user3@yourOrg.com") Send-MailMessage -From "tfs@yourorg.com" -To $Recipients -SmtpServer "yourSMTPserver" -Body $messageBody -Subject "$Env:TF_BUILD_BUILDNUMBER Build Notes" -BodyAsHtml |
The build scripts should be checked in to TFS as shown below.
If there is multiple script then a run script can be used to call other scripts. For example pre build run script for above shown picture is below.
Invoke-Expression "$PSScriptRootGenerateBuildNotes.ps1" Invoke-Expression "$PSScriptRootApplyVersionToAssemblies.ps1" |
TFS build definition can be set to call the pre build and post build scripts.
With this build note as shown below can be obtained.
Tech Nibbles 19 Jul, 2015
Welcome to Codetails!
Our Tech Nibbles list for 19 Jul, 2015 has 11 articles that are a must read for developers, designers and architects who are working on Microsoft Technologies or are passionate about Microsoft.
- PowerJSON – A Powerful and Fast JSON Serializer
This is a fork, an enhanced version, of ‘s brilliant project . It adds some new classes, interfaces and custom attributes to facilitate JSON serialization and deserialization of objects. It also fixes some issues in the original version.
Mehdi Gholam, wmjordan, fastJSON More: http://www.codeproject.com/Articles/888604/PowerJSON-A-Powerful-and-Fast-JSON-Serializer
- PowerShell Conference Asia – Is it for Beginners too?
Looking through the agenda, I think there is a lot that a beginner would get out of it, so how might the conference experience look to someone just starting out to PowerShell?
matthitchcock More: http://matthitchcock.com/2015/07/18/powershell-conference-asia-is-it-for-beginners-too/
- Hangfire
An easy way to perform fire-and-forget, delayed and recurring tasks inside ASP.NET applications. No Windows Service required. Backed by persistent storages. Open and free for commercial use.
More: http://hangfire.io/
- Microsoft download from The Garage: Mouse without Borders
I’ve mentioned The Garage a number of times here on Next and Jay Greene also wrote a story recently about some Garage projects recently for Cnet. Today it gives me great pleasure to announce a free download resulting from a Garage project.
Steve Clayton More: http://blogs.microsoft.com/next/2011/09/09/microsoft-download-from-the-garage-mouse-without-borders/
- Expressmapper – The New .NET Mapper!
Expressmapper – lightweight, lighting fast and easy to use .NET mapper to map one type of object(s) to another in an automated and easy way.
Yuriy Anisimov More: http://www.codeproject.com/Tips/1009198/Expressmapper-The-New-NET-Mapper
- Four simple steps to create a Windows Universal App from Web App using Visual Studio 2015
Hi Everyone, in this post we will see how to create a windows universal app from existing web application. If you already have a web application, then you can create a windows universal app in just four steps.
More: http://blogs.msdn.com/b/arsurya/archive/2015/07/12/four-simple-steps-to-create-a-windows-universal-app-from-web-app-using-visual-studio-2015.aspx
- Introducing Web Tiles for Microsoft Band – My diabetes data on a Band!
I love wearables. Check out my blog post from 11 years ago on my “Wrist.NET” Microsoft SPOT watch. This was a time before ubiquitous connectivity and it was an amazing device that provided tons of glanceable information.
Scott Hanselman More: http://www.hanselman.com/blog/IntroducingWebTilesForMicrosoftBandMyDiabetesDataOnABand.aspx
- Visual Builder of React JS
This tool is a visual builder of React JS components for your web application. In builder you can easily combine available components with each other, and see how they look and feel right on a web page.
More: https://www.npmjs.com/package/react-ui-builder
- WebGrid: Inline Edit and Delete of data in ASP.NET MVC 5
More: http://www.codeproject.com/Articles/996400/WebGrid-Inline-Edit-and-Delete-of-data-in-ASP-NET
- Linking shader programs using the builder pattern
This post is the first in a series on design patterns in game programming. Design patterns play an important role in computer programming. Not every problem can be solved with a pattern, and not every pattern is useful in all circumstances.
Paul Scharf More: http://www.dotnetcodegeeks.com/2015/07/linking-shader-programs-using-the-builder-pattern.html
- Free ebook: Microsoft Azure Essentials: Azure Web Apps for Developers
Download all formats (PDF, Mobi and ePub) at the Microsoft Virtual Academy. Below you’ll find the ebook’s Foreword, by Scott Guthrie, Executive Vice President of the Cloud and Enterprise group at Microsoft, as well as a few helpful sections from its Introduction. Enjoy!
Rick Rainey. This More: http://blogs.msdn.com/b/microsoft_press/archive/2015/06/09/free-ebook-microsoft-azure-essentials-azure-web-apps-for-developers.aspx
Thanks,
Codetails Team
PS: You can also follow us on our Facebook Page for regular updates
Tech Nibbles 26 Jul, 2015
Welcome to Codetails!
Our Tech Nibbles list for 26 Jul, 2015 has 13 articles that are a must read for developers, designers and architects who are working on Microsoft Technologies or are passionate about Microsoft.
- Avoid design pitfalls in the IoT: Keep the focus on people
The O’Reilly Radar Podcast: Robert Brunner on IoT pitfalls, Ammunition, and the movement toward automation. Subscribe to the O’Reilly Radar Podcast to track the technologies and people that will shape our world in the years to come.
Jenn Webb More: http://radar.oreilly.com/2015/07/avoid-design-pitfalls-in-the-iot-keep-the-focus-on-people.html
- Build Your Own Messaging App in XAML
One of the most popular features of Xamarin.Forms is the ability to use your existing XAML experience to build UIs for iOS, Android and Windows Phone. Moments, a Snapchat clone built with Xamarin.Forms and Microsoft Azure, originally made use of the C# API for creating user interfaces.
Pierce Boggan More: https://blog.xamarin.com/build-your-own-messaging-app-in-xaml/
- Windows 1.0 to 10: The changing face of Microsoft’s landmark OS
Windows — originally codenamed Interface Manager — was announced by Bill Gates in 1983, but didn’t ship until 20 November 1985. Its first incarnation was as a front end for Microsoft’s command-line DOS, or Disk Operating System. Windows 1.
More: http://www.zdnet.com/pictures/windows-1-0-to-10-the-changing-face-of-microsofts-landmark-os/#ftag=RSSbaffb68
- VexFlow
The score below was rendered in your browser. If you’re a programmer interested in rendering music notation in your own applications, take a look at The VexFlow Tutorial.
More: http://www.vexflow.com/
- Edit this webpage with your voice
Commands you can speak Element selection Select the (element) Ex: “select the header” Ex: “select the footer” Select the largest image Select the text (text) Ex: “select the text GET INFORMATION” Ex: “select the text WITH YOUR VOICE” Select its parent Select its first child Select its last child
More: https://shaungallagher.github.io/say_restyle/
- Visual Studio Emulator for Android in VS2015 RTM
Back in November we first told you about our fast, free, Hyper-V compatible Android emulator. Then, we used your feedback to add features including OpenGL, Lollipop, multi-touch, camera simulation, device profiles and WiFi simulation.
Heath Stewart More: http://blogs.msdn.com/b/visualstudioalm/archive/2015/07/20/visual-studio-emulator-for-android-in-vs2015-rtm.aspx
- ReSharper 9.1.2 for Visual Studio 2015 RTM
Visual Studio 2015 and .NET Framework 4.6 were both released to market yesterday. Kudos to Microsoft for making this finally happen. We thought we would come up with a quick guide to help you sort out what to expect from ReSharper integration into the final RTM build of Visual Studio 2015.
Jura Gorohovsky More: http://blog.jetbrains.com/dotnet/2015/07/21/resharper-9-1-2-for-visual-studio-2015-rtm/
- Same Day Xamarin Support for Visual Studio 2015
Today, Microsoft is unveiling the final release of Visual Studio 2015 in a global webcast, and we are joining the celebration! Now Released to Market (RTM) for full use in production, Visual Studio 2015 includes many new features and improvements that make it easier to build apps quickly, includin
Miguel de Icaza More: https://blog.xamarin.com/same-day-xamarin-support-for-visual-studio-2015/
- NCover 5.1 Beta Program
When we originally released NCover 5 last year, we were excited to share a lot of great new features including Condition Coverage and even more ways to share coverage results across the organization.
More: http://www.ncover.com/blog/ncover-5-1-beta-program/
- CSS Gradients: A Syntax Crash Course
In the past most websites used images heavily to create a fancy UI. Thanks to various CSS properties this trend has changed. This tutorial will help you to learn about CSS gradients.You can use gradients to replace images in various UI elements as well as in backgrounds.
Baljeet Rathi More: http://www.sitepoint.com/css-gradients-a-syntax-crash-course/
- Internet of Things (IoT), JavaScript and Azure – The Way Ahead
With each passing day, we are getting hooked on to an increasing number of small devices. Besides, the Internet drives our lives like never before.
Punit Ganshani More: http://www.dotnetcurry.com/windows-azure/1154/internet-of-things-iot-javascript-nodejs-azure
- Visual Studio 2015 and .NET 4.6 Available for Download
Today, I am excited to announce that Visual Studio 2015 and .Net 4.6 are available for download! These releases are the next big step in the journey we outlined last November to bring the productivity of Visual Studio and .
Heath Stewart More: http://blogs.msdn.com/b/somasegar/archive/2015/07/20/visual-studio-2015-and-net-4-6-available-for-download.aspx
- PropertyObservable – A base class for the INotifyPropertyChanged interface.
If you are a .NET developer, especially a WPF developer with MVVM, you must know the importance of the INotifyPropertyChanged interface. It is a core interface that is used almost every day.
JO Hyeong-Ryeol More: http://www.codeproject.com/Tips/1010855/PropertyObservable-A-base-class-for-the
Thanks,
Codetails Team
PS: You can also follow us on our Facebook Page for regular updates
Deploy Azure DB via Web App – Using VS 2013 Release Management – Part 2 – Setup RM Component and Template to Deploy
In the Part 1 of this post, creating a web deployment package with dacpac, is explained. To deploy the dacpac to Azure DB via web deployment package, a Release Management template should be setup. The same component created in article “How to Deploy to Azure Websites with TFS build 2013 and VS Release Management 2013”, can be enhanced to deploy the database, using the dacpac file in web deployment package.
In the Configuration Variables tab the newly added token __DemoAzureDBCon__ (adding the token in publish profile explained in Part 1) is set as a variable.
Next step is setting up an Azure DB. To do this create an SQL database in Azure management portal.
Select Create a new Azure DB server, to create a new DB server for Azure DB. Make sure to select Allow Azure services to access server option.
Database created in Azure with above options.
A web app in Azure is created to deploy the web application.
Copy the connection string (ADO.Net connection string) from the database connection strings and add it in the created web app settings, as a SQL Database connection.
Make sure to update the correct password to the connection string (Copied one has {your_password_here}).
Server=tcp:ch-demodbsvr01.database.windows.net,1433;Database=DemoAzureDB1;User ID=ch-dbsvradmin@ch-demodbsvr01;Password={your_password_here};Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;
In the Web App download the publish profile.
From the publish profile copy the values and set the parameters in the Release Management template.
- WebAppName = Package zip file name (Package created with TFS build in Part 1).
- PublishUrl = Publish Profile –> PublishUrl.
- PublishUser = Publish Profile –> userName
- PublishPassword = Publish Profile –> userPWD
- AzureWebAppName = Publish Profile –> msdeploySite
- DemoAzureDBCon = Publish Profile –> SQLServerDBConnectionString
With this template a release can be triggered using the build (Part 1).
Web Application gets deployed.
Database deployed with Web App.
Created Azure DB can be viewed in SQL Object Explorer in VS.
Allow the IP if prompt.
Deploy Azure DB via Web App – Using VS 2013 Release Management – Part 1 – Package SQL dacpac with Web Deploy Package in TFS Build
As explained in the post “How to Deploy to Azure Websites with TFS build 2013 and VS Release Management 2013” a tool can be created in VS 2013 Release management to deploy web sites to Azure. Below are the steps to deploy a azure database with the web application, using the same tool (enhanced to handle database deployments).
In the solution taken for as example a Web application project and a Database project created.
For demo purpose one table added to the database and created in localdb (db server provided with Visual Studio).
This database is added to the Web Application project by defining a connection string in the web.config file.
In the publish profile (for details on creating a publish profile for the web application refer the article here) database connection should be defined as a token understandable by the VS 2013 Release Management (__ as prefix and suffix).
Once this is published the required deployment packages created.
But the .dacpac file to deploy the db is not added to the web package zip file. It is required to get .dacpac inside the web package to deploy it with web application deployment.
In order to get the .dacpac file to web package change the publish profile (pubxml) content as shown below.
Current
Changes highlighted.
- DB Connection object group enabled.
- Default created “DbDacFx” object type is disabled.
- Added new “DbDacFx” with dacpacAction Deploy and path set to relative path of the .dacpac file being built for the SQL project. Note that bin\debug path is set here which is not going to work with TFS builds.
Then there should be a project dependency added to build the SQL project before the web application project to make sure the availability of .dacpac file.
With the above change when the web application is published as a web deploy package, the .dacpac file gets included in it.
The next step is to get this packaged via TFS builds. As explained in the article here TFS build can be setup for this purpose with build arguments specified below.
/p:CreatePackageOnPublish=true /p:DeployOnBuild=true;PublishProfile=”TFSAzureRelease”
As expected FS build fails with error, unable to find .dacpac file.
By changing the publish profile relative path to .dacpac file as below as will give a successful build.
Web deployment package in the drop now contains the .dacpac file.
Set parameter xml is created with the tokens added for DB connection.
In Part 2 let’s look at how to enhance the release management component, to deploy web application package (explained in article here), with the database .dacpac file to Azure DB.
Tech Nibbles 02 Aug, 2015
Welcome to Codetails!
Our Tech Nibbles list for 02 Aug, 2015 has 11 articles that are a must read for developers, designers and architects who are working on Microsoft Technologies or are passionate about Microsoft.
- Windows 10 Tip: Associate Your PC with Your Free Windows 10 License
Good news, Windows 10 fans: if you follow these instructions, your genuine Windows 7- or 8.1-based PC will always be associated with Windows 10, and you will be able to clean install the OS at will going forward, and without ever having to manually activate. It will just work.
Paul Thurrott More: https://www.thurrott.com/windows/windows-10/5008/windows-10-tip-associate-your-pc-with-your-free-windows-10-license
- Microsoft Edge vs. Google Chrome: Which web browser is faster?
Windows 10 comes with a brand new web browser called Microsoft Edge. It’s got a lighter design, it’s blazing fast and Cortana is baked right into it. Edge washes away everything we hated about Internet Explorer, but how does it compare to Google Chrome, the world’s most-used web browser?
Raymond Wong More: http://mashable.com/2015/07/29/microsoft-edge-vs-google-chrome/
- How To Fix “Device Limited Reached” Error In Windows 10 Store
I came across lots of people reporting that they are facing “Device limit reached” error when installing apps in Windows 10 Store. It looks like you’ve reached your device limit for installing apps and games from the Store on your Windows 10 device.
pradeep More: http://microsoft-news.com/how-to-fix-device-limited-reached-error-in-windows-10-store/
- The nine most important updates in Windows 10
Windows 10 is officially out today. It’s the biggest update to Windows in years and represents a number of new directions for Microsoft’s premier software product. Windows 10 replaces Windows 8 and 8.1, and serves to attract those Windows 7 users that never bothered to update to Windows 8.
Dan Seifert More: http://www.theverge.com/2015/7/29/9060177/microsoft-windows-10-update-changes-browser-start-menu-cortana-xbox
- How to display the back button in the Windows Universal APPs title bar ?
Windows 10 Apps are universal apps they can be used in any device of any form factor. Normally apps running in windows tablet will be having back button on the screen. But when it comes to windows phone there is a default hardware back button.
Arun Kumar More: http://dailydotnettips.com/2015/07/29/how-to-display-the-back-button-in-the-windows-universal-apps-title-bar/
- ECMAScript 2015 Goodies – Part 2 – const
This is the second article in ECMAScript 2015 Goodies. In the first article, we have covered new keyword in the language – let, which allows us to define a true block level variable in the program. In this short article, we will cover another new keyword – const.
More: http://prasadhonrao.com/ecmascript-2015-goodies-part-2-const/
- RyuJIT Bug Advisory in the .NET Framework 4.6
A code generation (AKA “codegen”) issue in RyuJIT in the .NET Framework 4.6 has been discovered that affects a calling pattern called Tail Call Optimization. The RyuJIT team has fixed the issue and has started the process of producing a .NET Framework 4.
Heath Stewart More: http://blogs.msdn.com/b/dotnet/archive/2015/07/28/ryujit-bug-advisory-in-the-net-framework-4-6.aspx
- Getting Started with Windows 10
I’ve been making Windows 10 videos at night to help out friends and family, and because it’s fun. Windows 10 comes out July 29th, and it takes what was familiar about Windows 7 and what was great about Windows 8 and takes it forward.
Scott Hanselman More: http://www.hanselman.com/blog/GettingStartedWithWindows10.aspx
- Windows 10. GMUNK. ODESZA.
What happens when you combine one of the world’s hottest conceptual visual artists (Bradley G. Munkowitz aka GMUNK) with the amazing music duo Odesza, and throw in some blasting lasers, smoke machines and falling crystal dust? Turn up your speakers and watch. Created at Microsoft by Swodniw. To se
More: http://www.youtube.com/watch
- Windows 10 Quick Start Guide Leaked Online, Download It Now
Windows 10 quick guide from Microsoft got leaked online today. It details all the new features added in Windows 10 from Cortana to InstantGo. If you are new to Windows 10, just read this one document to know all about Windows 10.
pradeep More: http://microsoft-news.com/windows-10-quick-start-guide-leaked-online-download-it-now/
- Writing a NuGet package for VS2015 RTM and UWP
There are some changes coming to NuGet in VS2015 RTM, under the name “project.json”. How should you prepare for this as a NuGet package author? This article explains.
Lucian Wischik More: http://blogs.msdn.com/b/lucian/archive/2015/07/27/writing-a-nuget-package-for-vs2015-rtm-and-uwp.aspx
Thanks,
Codetails Team
PS: You can also follow us on our Facebook Page for regular updates
Restart Services with Dependant Services – Using PowerShell to Create RM Component
In release management there is a tool available to restart a service. This works fine as long as there is no other service depending on the service being restarted. If there is any dependant service this action throws an error.
Investigation in WWW revealed using a PowerShell to do this is not that easy. Few important links on this is here.
https://support.software.dell.com/appassure/kb/128574
http://www.blogmynog.com/2010/06/22/powershell-script-to-restart-service-and-dependents/
Each solution in above link had some sort of an issue. Some did not work if there is dependency in another dependant service. Some solution not have the correct order of stop start sequence. Some does not start only the services that were running earlier.
Out of above
the question (by Scott W. Sander) itself had a great code segment. A little bit of enhancement to that script made below powershell script which is perfectly working.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
Param ( [Parameter(Mandatory=$true)] [String]$ServiceName ) [System.Collections.ArrayList]$ServicesToRestart = @() function Custom-GetDependServices ($ServiceInput) { #Write-Host "Name of `$ServiceInput: $($ServiceInput.Name)" #Write-Host "Number of dependents: $($ServiceInput.DependentServices.Count)" If ($ServiceInput.DependentServices.Count -gt 0) { ForEach ($DepService in $ServiceInput.DependentServices) { #Write-Host "Dependent of $($ServiceInput.Name): $($Service.Name)" If ($DepService.Status -eq "Running") { #Write-Host "$($DepService.Name) is running." $CurrentService = Get-Service -Name $DepService.Name # get dependancies of running service Custom-GetDependServices $CurrentService } Else { Write-Host "$($DepService.Name) is stopped. No Need to stop or start or check dependancies." } } } Write-Host "Service to Stop $($ServiceInput.Name)" if ($ServicesToRestart.Contains($ServiceInput.Name) -eq $false) { Write-Host "Adding service to stop $($ServiceInput.Name)" $ServicesToRestart.Add($ServiceInput.Name) } } # Get the main service $Service = Get-Service -Name $ServiceName # Get dependancies and stop order Custom-GetDependServices -ServiceInput $Service Write-Host "-------------------------------------------" Write-Host "Stopping Services" Write-Host "-------------------------------------------" foreach($ServiceToStop in $ServicesToRestart) { Write-Host "Stop Service $ServiceToStop" Stop-Service $ServiceToStop -Verbose #-Force } Write-Host "-------------------------------------------" Write-Host "Starting Services" Write-Host "-------------------------------------------" # Reverse stop order to get start order $ServicesToRestart.Reverse() foreach($ServiceToRestart in $ServicesToRestart) { Write-Host "Start Service $ServiceToRestart" Start-Service $ServiceToRestart -Verbose } Write-Host "-------------------------------------------" Write-Host "Restart of services completed" Write-Host "-------------------------------------------" |
To create a reusable Release Management tool setup as shown below.
A component using the tool can be created.
The component available for release template.
When used with Release template it manages to stop dependant services first and stop the requested service. Then restart the requested service and the dependant services.
Tech Nibbles 16 Aug, 2015
Welcome to Codetails!
Our Tech Nibbles list for 16 Aug, 2015 has 10 articles that are a must read for developers, designers and architects who are working on Microsoft Technologies or are passionate about Microsoft.
- The PowerShell Conference 2015, Asia
Join us for the first PowerShell Conference Asia held in Singapore bought to you by SAPIEN technologies. during this two day event, powershell speakers from asia and around the world will come together to bring attendees two days of great in depth powershell content.
More: http://PowerShell.asia
- Visual Studio On-Demand Videos “The Big List”
One of my jobs as a Product Manager for Visual Studio is to enable product team Program Managers and developers to create videos of their new product features, and we’ve been very successful in creating hundreds of these on-demand videos over on Channel 9.
Dmitry Lyalin More: http://www.lyalin.com/2015/08/14/visual-studio-on-demand-videos-the-big-list/
- DevOpsDays Singapore 2015
DevOpsDays is a 2-day unconference that will be held in Singapore on October 16th and 17th, 2015. This conference, which is now happening frequently around the globe, is the conference for bridging the gap between development and operations.
More: https://ti.to/devopsdays-singapore/2015/en
- Microservices in C# Part 3: Queue Pool Sizing
This tutorial expands on the previous tutorial, focusing on the Queue Pool concept. By way of quick refresher, a Queue Pool is a feature of the Daishi.AMQP library that allows AMQP Queues to be shared among clients in a concurrent capacity, such that each Queue will have 0…1 consumers only.
Paul Mooney More: http://insidethecpu.com/2015/08/14/microservices-in-c-part-3-queue-pool-sizing/
- Code metrics from the command line
More: http://blogs.msdn.com/b/camerons/archive/2011/01/28/code-metrics-from-the-command-line.aspx
- Visual Studio Online Process Customization – Update
Back in May, we began explaining our roadmap for process customization on Visual Studio Online (VSO). In this post, I want to share the progress we’ve made and give an update on our overall plans.
Heath Stewart More: http://blogs.msdn.com/b/visualstudioalm/archive/2015/07/27/visual-studio-online-process-customization-update.aspx
- Dev Center open for Windows 10 app submissions, adds new features
The new unified Windows Dev Center is now open for Windows 10 app submissions. Dev Center launched a number of new features yesterday, summarized by Todd Brix. In this post I’ll share more details about what’s new:
Bernardo Zamora More: http://blogs.windows.com/buildingapps/2015/07/30/dev-center-open-for-windows-10-app-submissions-adds-new-features/
- Microsoft/TypeScript
Skip to content HTTPS clone URL Subversion checkout URL You can clone with or . Download ZIP Loading… Something went wrong with that request. Please try again.
More: https://github.com/Microsoft/TypeScript/issues/4238
- Team Foundation Server 2015 Now Available
Today, we are making available the final release of Team Foundation Server 2015.
Heath Stewart More: http://blogs.msdn.com/b/somasegar/archive/2015/08/06/team-foundation-server-2015-now-available.aspx
- Microsoft releases Windows Bridge for iOS as Open Source
Microsoft seems to introduce unique ways to reach out to people across the globe with its products. Just when everyone was excited for the release of Windows 10 operating system and its free upgrade; Microsoft released Windows Bridge for iOS as Open Source.
AnkitGupta More: http://news.thewindowsclub.com/microsoft-releases-windows-bridge-ios-open-source-79645/
Thanks,
Codetails Team
PS: You can also follow us on our Facebook Page for regular updates