Visual studio 2010 had a quick rightclick context menu to create unit test which has disappeared in VS2012, to move to a more general approach that isnt directly tied in with the MS unit testing system. It is possible however to re-enable the menu function or use a keyboard shortcut. full writeup source: http://serena-yeoh.blogspot.nl/2013/02/visual-studio-2012-create-unit-test.htmlhttp://blogs.msdn.com/b/malaysia/archive/2013/02/20/right-click-create-unit-tests.aspx Your […]
Author: bobnoordam
Exporting a HYPER-V Virtual machine to a network share
If you start a HYPER-V virtual machine export to a share, you will be greeted by an permissions error. This happens both with a manual export, and with a scripted backup through powershell using the Export-Vm cmdlet. note: this procedure does not apply to migrations The resolution for this problem is luckily simple. You need […]
Server 2012 – Change the type of a network location
By default the network location awareness service will attempt to classify your network, and you will not be able to change the location. To enable editing of the location(s) take the following steps: Start –> run –> MMC In the MMC console add the Group Policy Object editor for the local computer Open Computer configration, […]
Restore trust between server and workstation without leaving and rejoining the domain
If a workstation is restored from a backup you will likely run into a message like ‘the trust relationship between this workstation and the primary domain failed’. The general advice will be leaving and rejoining the domain. However, there is a much safer method. You can start PowerShell as an administrator, and run the command […]
Hyper-V 2008 Powershell Security Warnings
After setting the execution policy for windows powershell to unrestricted, you still are unable to run powershell scripts from a batch file or the command line without the following warning popping up: C:\MyScripts> Set-ExecutionPolicy unrestricted PS C:\MyScripts> ./somefile.ps1 Security Warning Run only scripts that you trust. While scripts from the Internet can be usefull they […]
XtraReports – Selecting a paper tray
This sample shows how to enumerate and select a specific tray to use for printing. The code works bij intercepting the oReport.PrintingSystem.StartPrint event and adding a handler to send it to a routine which enumerates the trays of the printer. There are a few pitfalls to take note off: My HP drivers insisted on having […]
Getting and setting the clipboard content
These samples show handling the clipboard in the most basic way. First a test is done to see if there currently is text on the clipboard. If a text is found, the programm proceeds to read and display the text, and then replace it with a new text. By modifieing the parameters you can use […]
Demonstration of structures and enumerable types
Module Module1 ‘ MCTS70-536-1-2 ‘ VB.NET ‘ Demonstration of a structure and an override of the ToString method to display ‘ all parts of our person Public Structure Person ‘ — Example of an enumaration, see the actual Main() Method for use Enum Genders Male Female End Enum Private _firstname As String Private _lastname As […]
Installing JQuery in Visual Studio step by step
All the knowledge is out there, but for people new to jQuery it can be a challenge to make a more or less clean integration in Visual Studio. The key components are the nuget package manager and the script manager component, which often are described separately. Keep in mind there are multiple methods to get […]
Getting the current date/time from a NIST server
‘ — Get the current time/date from an internet nist server ‘ more timeserver here: http://tf.nist.gov/service/time-servers.html Dim s_checkserver As String = “time.nist.gov” Dim myreader As StreamReader Dim s_timestring As String Try myreader = New StreamReader(New Net.Sockets.TcpClient(s_checkserver, 13).GetStream) s_timestring = myreader.ReadToEnd s_timestring = Trim(LTrim(s_timestring)) Catch ex As Exception ‘ — unable to contact timeserver End End […]