GenesysStack.com
RSS

Blog

How-to Create an Azure Marketplace SKU VHD URL
Important: This is your VM that will be released to production. This VM will need to be backed up and snapshotted regularly. 1. Install VM UNMANAGED VHD disk on a Storage BLOB 2. Customize VM, to prepare it to the state you wish your customers to see. 3. Install Windows Updates. 4. Setup Backup 5. Snapshot Tip: Rely on the Default folder to persist files (i.e. Desktop icons.) Tip: Rely on C:\ folders to persist files. I.e. C:\Docs, C:\WebSites. Tip: Setup data drives to precede the CDR drive. I.e. The SQL Server F:\ drive gets renamed to E:\. Solved by pre-configuring as E:\.
Did you know that $(MSBuildProjectDirectory) will work, even when $(ProjectDir) is blank?
Use $(MSBuildProjectDirectory) instead of $(ProjectDir), as it contains your project directory path from MSBuild itself.
Did you know how to keep Bootstrap 3 Navbar 1-line through all snaps?
The trick is to use hidden-md hidden-sm and visible-md visible-sm.

Here is the Html from default MVC template’s _Layout.cshtml:

<li><a href="#menu-1" data-toggle="collapse" data-target=".in"><div class="hidden-md hidden-sm">One<b class="caret"></b></div><span class="glyphicon glyphicon-open visible-md visible-sm"></span></a></li>

<li><a href="#menu-2" data-toggle="collapse" data-target=".in"><div class="hidden-md hidden-sm">Two<b class="caret"></b></div><span class="glyphicon glyphicon-ok visible-md visible-sm"></span></a></li>

<li><a href="#menu-3" data-toggle="collapse" data-target=".in"><div class="hidden-md hidden-sm">Three<b class="caret"></b></div><span class="glyphicon glyphicon-time visible-md visible-sm"></span></a></li>

<li><a href="#menu-4" data-toggle="collapse" data-target=".in"><div class="hidden-md hidden-sm">Four<b class="caret"></b></div><span class="glyphicon glyphicon-envelope visible-md visible-sm"></span></a></li>

How to Reinstall TFS 2015 Reports and Rebuild the reporting databases
Upgrades, running out of disk-space, admins gone rogue…there are many things that can disrupt your Team Foundation Server’s reporting databases. Luckily, there is a fairly quick and easy way to re-install the TFS SSRS reports and rebuild the Tfs_Warehouse and Tfs_Analysis databases. As all items are boilerplate reports and generated databases. To do this, we will work with the following components on TFS 2015 and SQL Server 2012 R2: ·         TFS 2015 SSRS Report Manager: http://Your_TFS_Machine_Name/Reports ·         Tfs_Warehouse: SQL Server Database ·         Tfs_Analsis: SQL Server Analysis Services Database
How-to Fix: A Downloaded Project Compile Error: Could not load file or assembly packages\ … or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
Could not load file or assembly packages\ … or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) Cause: The \packages folder and/or files is blocked. Fix: Backup and Delete the solution’s \packages\ folder, allowing NuGet to restore packages.
Did you know how to use EF ID functions even with Composite Primary Keys?
Did you know how to use EF ID functions even with Composite Primary Keys? A simple solution for transactional systems is to select your data from a view that concatenates the composite keys into a single ID column by using the Concat() function. SelectConcat(Field1, Field2)As ID, Field1, Field2 From MySchema.MyTable
How-to fix: Mvc Error CS0012 The type is definied in an assembly that is not referenced
After deploying a MVC project to the dev web server, a new partial view based on @model List<> began to throw the following exceptions: ·         Error    CS0012            The type 'DateTime' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. ·          Error   CS0012            The type 'List<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Collections, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' The fix was to alter the following block in your Mvc project root web.config: From: To:                                
Did You Know that you can use standard ISO 8601 Dates with the DataContractJsonSerializer class?
Did You Know that you can use standard ISO 8601 Dates with the DataContractJsonSerializer class? By default, the DataContractJsonSerializer class expects dates in the format of Date(ticks). This is problematic, because ASP.NET Web API returns dates in ISO 8601 format. * Default date: "{\"BirthDate\":\\\/Date(248860800000-0800)\\/\ * ISO 8601 date: "{\"BirthDate\":\"1982-11-16T00:00:00-08:00\"}"
Did You Know that you can capture results from a Stored Procedure into a Table variable?
Did You Know that you can capture results from a Stored Procedure into a Table variable? -- Save Time Range in central stored procedure DECLARE @Result TABLE (ID INT) InsertInto @Result Exec [Entity].[TimeRangeSave]@BeginDate, @EndDate, @ActivityID Select @TimeRangeID = ID From @Result
Did You Know that you can clear MVC TextboxFor default values?
If you like strongly-typed Views...the trick is the Value Html attribute. Not “value”, “Value”. For example: @Html.TextBoxFor(m => m.BirthDate, "{0:MM/dd/yyyy}", new { @id = "txtBirthDate", @class = "form-control BirthDate", @Value = Model.BirthDate == "01/01/1900" ? "" : Model.BirthDate.ToString(), @placeholder = "MM/DD/YYYY" })