Can't deploy Through Release Management Server over HTTP(S)

by Donovan Brown 18. April 2014 03:11

Problem:

Configuring the “Drop Location Access” as “Through Release Management Server over HTTP(S)” with Release Management I get the following error:
“Message: Could not load file or assembly 'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies.

Solution:

Copy Newtonsoft.Json.4.5.1, net40 into the bin folder of Release Management “C:\Program Files (x86)\Microsoft Visual Studio 12.0\Release Management\bin”.

To get a copy of the correct version of newtonsoft.json I created a class library project in Visual Studio and issued this command from the package manager console:
“Install-Package Newtonsoft.Json -Version 4.5.1”

Then I copied the file from the packages folder “Newtonsoft.Json.4.5.1\lib\net40”.

Tags:

Work

I can't use email as Username with MVC5 Microsoft.AspNet.Identity

by Donovan Brown 10. March 2014 02:32

Problem:

I want to use email as the username with Microsoft.AspNet.Identity in MVC 5 application. But when I do I get the following error:

User name ... is invalid, can only contain letters or digits.

Solution:

In the AccountController constructor that takes a userManager as a parameter add the following code:

UserManager.UserValidator = new UserValidator<ApplicationUser>(UserManager)
 { AllowOnlyAlphanumericUserNames = false };

Tags: ,

Work

Find by Status is not working

by Donovan Brown 13. February 2014 22:45

Problem:

"Find by Status" of the TFS Power Tools always returns zero results even though people have files checked out.

 

 Solution:

Make sure the developers workspaces are Server and not Local.

Explanation:

Only Server workspace communicate the status of check outs back to the Server local workspaces do not.


 

Tags: , ,

Work

Running Microsoft Test Manager Suite with Release Management

by Donovan Brown 25. January 2014 19:45

Goal

I want to run a Microsoft Test Manager Suite after my bits are deployed by Microsoft Release Management (InRelease).

Solution:

There appears to be a bug in the current "MTM Automated Tests Manager" tool that will fail if your build definition name contains spaces. So I took this opportunity to write my own PowerShell script to run as part of my deployment within Release Management. 

Attached to this post is a PowerShell script that corrects the space issue. The remainder of this post will explain how to add a new tool to Release Management and add a testing component to your release template.

Begin by starting Release Management and clicking the Inventory tab then Tools.  Once on the Tools tab under Inventory click the New button.  Feel free to enter any Name and Description you like.  For the command simply type “powershell”. For the Arguments value enter:

-command ./MyTcmExec.ps1 -Collection __Collection__ -TeamProject __TeamProject__ -PlanId __PlanID__ -SuiteId __SuiteID__ -ConfigId __ConfigID__ -BuildDirectory __BuildDirectory__ -Title __Title__

If you took the time to read the MyTcmExec.ps1 file you may have noticed not all the parameters are listed in the arguments above.  That is because not all of the arguments are required to have a successful test run. However, if you need to pass in the additional parameters for your situation simply add them to the Arguments.  Each value that begins and ends with double underscore “__” will be assignable on each stage.

Now that we have our tool in Release Management lets create a component that uses our tool.  Click the Configure Apps tab then Components. Once on the Components tab under Configure Apps click the New button.  Feel free to enter any Name and Description you like.  On the Source tab simply enter a \ for the Path to package value.  On the Deployment tab is where we select our tool from the Tool dropdown.  Unless you would like to adjust the arguments for this component simply click Save & Close.  Note that any changes to the arguments will only affect this component and not the tool definition.

The final step is to add the component to our release template. Click the Release Template tab under Configure Apps.  Right click on Components in the Toolbox and select Add from the context menu.  Select the desired component and click the Link button or simply just double click the component to add it to the toolbox.  Now simply drag and drop the new component to the desired location in your stage’s workflow.

Although Release Management has helper variables for example $(PackageLocation), $(TfsUrlWithCollection) and $(TeamProject). I discovered the $(TfsUrlWithCollection) and $(TeamProject) variables do not expand to the expected values.  $(TfsUrlWithCollection) includes the team project and $(TeamProject) expands to an empty string. Therefore, I suggest you simply hardcode those values with the exception of $(PackageLocation) which appears to work as expected.

You will have to harvest the PlanID, ConfigID and SuiteID from Microsoft Test manager.  Use the images below to locate those values. 

You will also need the URL to the Team Project Collection and the name of the Team Project.

Using the values from Microsoft Test Manager and TFS you can now fill in the values of your component.  You can enter any value you like for the Title.  For the BuildDirectory enter $(PackageLocation).

The final step is to make sure you have associated automation to test case in your selected suite and the assembly that contains that automation is being built with the solution being released.

 Good luck.

MyTcmExec.ps1 (6.17 kb)

Tags: , , , , ,

Work

I can't run GetProcessingStatus

by Donovan Brown 21. January 2014 07:13

Problem:

When I Invoke GetProcessingStatus of the WarehouseControlWebService I get a http 500 Internal Server Error.

Solution:

Type "true" or "false" into the includeOnlineHostOnly texbox.

Explanation:

includeOnlineHostOnly is required and you must provide it a value to avoid the http 500 Internal Server Error.

Tags: , ,

Work

The build template with Release Management does not work in TFS 2013 Build

by Donovan Brown 17. January 2014 06:54

Problem:

I get an error when I use the build template installed with Release Management with TFS 2013.

Solution:

If your release of TFS 2013 is using TfvcTemplate.12.xaml you will not be able to use the ReleaseDefaultTemplate.11.1.xaml template that ships with Release Management. You will have to use one Leo Vildosola created here.

Tags: , ,

Work

How to install SQL Server Compact 4.0 Prerequisites for my setup project

by Donovan Brown 14. January 2014 05:56

Problem:

I am missing SQL Server Compact 4.0 Prerequisites for my setup project.

Solution:

Use the Microsoft Web Platform Installer to install Visual Studio SP1 Tools for SQL Server Compact 4.0.

Tags: , ,

Work

I want code lens to show me my code health.

by Donovan Brown 13. January 2014 22:20

Problem:

I want to see my code heath without having to run code analysis.

Solution:

Add code health to Code Lens with Microsoft CodeLens Code Health Indicator.

Tags: ,

Work

I need team rooms in my IDE

by Donovan Brown 13. January 2014 22:13

Problem:

I want to use the new Team Foundation Server team rooms but I don't want to leave my IDE.

Solution:

Install Team Rooms for Visual Studio 2013.

Tags: ,

Work

How do I grant permissions to ApplicationPoolIdentity in SQL Server

by Donovan Brown 27. December 2013 07:24

Problem:

My IIS Application Pool is using ApplicationPoolIdentity and does not have permissions to my SQL Server database.

Solution:

Open Sql Server Management Studio (SSMS) and create a new login for "IIS AppPool\{YourAppPoolNam}".  On the User Mapping page give the user access to the database and save and close the dialog.

Tags: , ,

Work

About the author

My name is Donovan Brown and I am a Technology Specialist for DevTools with Microsoft with a background in application development.  I also run one of the Nation’s fastest growing online registration sites for motorsports events DLBRacing.com.  When I am not writing software I race cars for fun.  DLBRacing.com has given me the opportunity to combine my two passions writing software and racing cars.

AdSense

Month List

AdSense