# Marko Apfel - Afghanistan/Belgium/Germany

Management, Architecture, Programming, QA, Coach, GIS, EAI

Home  |   Contact  |   Syndication    |   Login

# Tools

Saturday morning I received a mail from my parents NAS (Synology DS215j) about a reboot after a system update. A few hours later my father called me, mentioning that he cannot write to the NAS anymore. All files are accessible in read only mode. All write operations under windows raises an error. German: "Sie benötigen Berechtigungen zur Durchführung des Vorgangs" English: "You need permission to perform this action" After some research it came to light, that the WinBind Daemon hasn’t started. It ......

Today I’ve installed the Technology Preview of Windows 10 onto my Xen Server. With the XenCenter program under an existing Windows 8.1 installation it was an easy task. But this Win 8.1 runs virtualized via Parallels and Bootcamp on my MacBook. That creates a double windowing – first the virtualized window of Win 8.1 with XenCenter and inside XenCenter the windows of the XenServer hosted Windows 10. This is not nice. But we can shortcut that by using the Remote Desktop App for Mac OS X (you can find ......

After a longer period of blogging abstinence I had again to search the right plugin for Windows Live Writer (WLW) to get a pretty printed source code. I remembered ones in the past which made me really happy. That one I couldn’t find anymore. So I write this article to have a guideline in the future and maybe to collect some advices from you reader, helping me to find that one I initially searched for... btw: I really appreciate, if somebody could advice me a good blogging software for Mac. Currently ......

Why such constructs are included in the csproj-Files? <CodeAnalysisRuleSetDire... Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSe... <CodeAnalysisRuleDirecto... Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</Code... So it every projects needs some manual steps to clean the project file so the solution could be build on ......

Context Using the CTRL + or shortcuts to move between different heading levels works perfect. But if you use list styles it doesn’t switch the other defined types than headings. That’s because these shortcuts are the OutlinePromote and OutlineDemote shortcuts. Solution If you like to switch between the levels of a list style you have to use the decrease and increase indent buttons in the toolbar (). To access this functionality via shortcut you have to add own one. Remarks Customize shortcuts to ......

IDEs, Editors, .. Here are my favorites in descend order Visual Studio Express 2012 for Web yes! - it allows you free F# development, notably for libraries LINQPad again and again a wonderful tool! SharpDevelop sometimes a little bit idiosyncratic Online Scratchpad on TryFSharp.org the fastest start … Additional resources Maybe the following packages are necessary or in minimum useful: Visual F# Express Tools The free standalone F# compiler tools Windows 8 and .NET 4.5 SDK Windows 7 and .NET 4.0 ......

Problem I tried to add the Emmet (fka Zen Coding) package to Sublime Text 2. But by running this “Install Package” (CTRL + SHIFT + p) command no packages were displayed. Solution No glue why, but I had to change the repository channels protocol (Preferences > Package Settings > Package Control > Settings – Default) from https to http: And voila .. here we have the packages: ......

Situation, Problem During playing a little bit with these WPF MVC F# projects inside SharpDevelop I stumbled over the situation, that I could not send F# snippets to the interactive window. The menu was not available. Normally it looks like this: Solution If you would like to use the context menu “Send to F# Interactive” inside SharpDevelop during fsx developing, you have to ensure that this fsx file is part of an F# project! fsx only as a solution item no context menu “Send to F# Interactive” fsx ......

Today a colleague ask me to help. On his system all ReSharper menus are grayed out. Also the Visual Studio Add-In Manager does not show this add-in. He tried: a new installation: without success, running with administrative privilegeg: without success, looking in event- and application-logs: no entries. After searching a little bit with old buddy google we found this message: Wild World of Visual Studio -- Mysterious Component We downloaded and installed the latest Microsoft Core XML Services (MSXML) ......

In our team we have developers with Visual Studio 2005 and 2008. Often we have projects which must be coded by a mixed team. Visual Studio 2005 and 2008 compatibility for project-files Normally this is no problem because adding projects in Visual Studio 2005 and manually introducing the ToolsVersion="2.0" attribut in the new csproj-file allows an coexisting working when using two sln-files for Visual Studio 2005 and 2008. We name the sln-files normaly <solution>.2005.sln and <solution>.2008.sln. ......

Situation My private machine has Microsoft Visual Studio Express 2012 for Windows Desktop. This Visual Studio edition doesn’t allow to develop with F#. So I installed additionally SharpDevelop. But it took longer as expected to get F# projects running in this environment. Problem Creating a new or opening an existing F# project ended up in this error: “Please ensure that the F# compiler is installed on your computer.” According the the installation hints from Use F# on Windows, I installed the following ......

Installing redcar with sudo gem install redcar ends up in this error Building native extensions. This could take a while... ERROR: Error installing redcar: ERROR: Failed to build gem native extension. I installed these additional packages: sudo apt-get install open4sudo apt-get install rubygems1.8sudo apt-get install openjdk-6-jre´sudo apt-get install firefox-devsudo apt-get install ruby-dev and then it worked .... Maybe the last one is the most essential one and all the others are not necessary ......

Problem If you try to delete large folders with explorer it could run for several minutes. Also when you try to suppress the moving to recycle bin via SHIFT + DEL. Solution From all variants to do this, rmdir in command prompt is my favorite rmdir /s/q <foldername> btw: deleting of files with good old DOS-del is also a fast way – particularly when you redirect the output: del /f/s/q *.* > nul ......

Resource Refactoring Tool a nice tool under Visual Studio 2005 - but with Visual Studio 2008 a lot of peoples (including me) have troubles :-( Multi-Language Add-In for Visual Studio must be evaluated - looks fine Zeta Resource Editor must be evaluated - looks fine RGreatEx Resource Refactoring Tool (Link 1) RGreatEx Resource Refactoring Tool (Link 2) must be evaluated - looks fine ......

Problem If you go in Explorer to the GAC folder (%windir%\Assembly) a shell extension gives you a special view of the content there: In this view you couldn’t copy the DLLs to somewhere else. Solution With a special registry intervention you could deactivate the shell extension so that Explorer shows the content in a normal way. But this is like a hack. If you are practiced with command line you could go to the assembly folder And the smartest with explorer is to map a network drive to \\<your ......

Install App “Kontacts” via BlackBerry App world Run Kontacts and Export to csv Start “BlackBerry Desktop Software” Choose File Press BlackBerry Icon in address line Choose Device > home > user > documents > Kontacts Copy file via drag and drop to folder in Explorer Open www.google.com/contacts (maybe you have to sign in) More > Import Choose File (the exported file from above) Import Connect Phone to Google contacts via special app ......

Problem Starting Outlook shows only the splash screen with comment “loading profile”. I could cancel the startup but restarting shows the same. I verified with Task Manager that no hidden outlook process is bother me. Solution Scanpst Normally with Outlook the tool “Microsoft Outlook Inbox Repair Tool” (scanpst.exe) is additionally installed. Some people could access it via Startmenu, but not me. My lovely Launchy found it under "C:\Program Files (x86)\Microsoft Office\Office14\SCANPST.EXE" Scanpst ......

Programming Visual Studio ReSharper Agent Johnson Agent Smith StyleCop for ReSharper Keymaps SettingsManager Git Source Control Provider Gist NuGet Package Manager NDepend Productivity Power Tools PowerCommands for Visual Studio PostSharp Indent Guides Typemock Isolator VSCommands Ressource Refactor Clone Detective GhostDoc CR_Documentor AnkSVN Expression Blend SharpDevelop Notepad++, PS Pad StyleCop, FxCop, .. .NET Reflector, ILSpy, dotPeek, Just Decompile Git Extensions inkl. MSysGit, MinGW Github ......

If the content editor of SHFB opens without any functionality then the configuration file is corrupt. This is repairable through deleting the config-files under C:\Documents and Settings\[YOUR_USER_ID]\Local Settings\Application Data\Eric_Woodruff\... Sometimes an error occured during opening content editor next time. In this case you must study the message. Offen you have created a not XML-wellformed content file. Open your last used files with an other XML-editor and look for the place which is ......

Today i had an error by building my sandcastle documentation project. After compiling during opening the output instead my chm-file in the help viewer the internet explorer pops up with an error message that the destination could not be found. So i took a look in the log of the compile process and there was some warnings of the following type listed: HHC3004: Warning: Resources.HandlingCursors.0... : The HTML tag <CRYPTICAL SIGNS> is not a valid HTML tag (it does not begin with an alphanumeric ......

Problem If you run the “Generate database from model” wizard and execute the generated script the destination database could be the wrong one (for instance master of the SQL Server). Solution To use an own mdf attachable user database some connection information must specified during script execution. Execute your script opens the dialog “Connect to Server”. Press “Options” and go to the second tab “Connection Properties”. Select “Browse server” in the “Connect to database” dropdown box: Confirm ......

Initial situation Often for Visual Studio projects the typical content of a .gitignore file contains this line bin or [B|b]in It is used to avoid that Git tries to track compile outputs as repository relevant data. Problem But keep in mind: this will also suppress bin folders of additional stuff like frameworks and toolsets. For instance Microsoft.SDKs contains a folder named Bin with a lot of programs Simian contains a folder named bin with the program themselves If you store such artifacts also ......

Challenge In the past I added some RSS feeds to outlook. For one of these feeds now I would like to know the original URL. But this is not very intuitive to eliminate. Problem Via (intuitive) right mouse click you could open a properties dialog of a feed. But there is no hint for the URL! Solution You could find the information in the RSS Feed Options dialog Open Account Settings Double click the feed and voila - here is the URL ......

Challenge We documented a project on Github with the Wiki there. For most articles we used Creole as markup language. Now we have to deliver a lot of the content to our client in an usual format like PDF or DOCX. So we need a automatism to extract all relevant content, merge it together and convert the stuff to a new format. Problem One of the most popular toolsets to convert between several formats is Pandoc. But unfortunally Pandoc does not support Creole (see the converting matrix). Approach So ......

These settings reflecting my Git-environment. It a result of reading and trying several ideas of input from others. Must-Haves Aliases [alias] ci = commit st = status co = checkout oneline = log --pretty=oneline br = branch la = log --pretty=\"format:%ad %h (%an): %s\" --date=short df = diff dc = diff --cached lg = log -p lol = log --graph --decorate --pretty=oneline --abbrev-commit lola = log --graph --decorate --pretty=oneline --abbrev-commit --all ls = ls-files ign = ls-files -o -i --exclude-standard ......

Problem Normally I try to have my continuous integration as most a possible toolset free to ensure that no local stuff could have an impact to my build. My Silverlight app references a special compile target in a folder outside my developer tree: <Import Project="$(MSBuildExtension... /> So I copied the stuff from this folder to a local one and changed the call to this target in my csproj: <Import Project="..\..\..\tools\Web... ...... Problem Normally PostSharp runs fine on unattended build servers. So on our global Jenkins continuous integration server PostSharp does the job. But on my local TeamCity continuous integration server I got the following error: POSTSHARP error PS0127: The aspect 'EsriDE.Commons.Logging.Aop... uses non-licensed features (Basic Features). Please visit http://www.sharpcrafters.com/ to acquire a license of PostSharp. POSTSHARP error PS0154: Information regarding the previous ...... Problem Our global Jenkins continuous integration server throws this error during compile step. My local TeamCity continuous integration server runs fine. What is the difference. Background I integrate some static code analysis steps via MSBuild-targets in the csproj files. To allow a fast developing without a code analysis for ever compiling I bound these targets only to RELEASE-configuration. With the MSBuild element <ImportGroup> only one condition must be specified. So my construct was: ...... Problem A continuous integration server should only have a minimal toolset installed. This ensures that no unwanted libraries could affect the build and other steps. Clearly that with this slogan also StyleCop should not be installed to the CI server. But we wanna have this analysis as an part of the whole build. Solution Prerequisites First at all we need the necessary files from StyleCop (the core assemblies and the target). The easiest way is to download the MSI of StyleCop, install the software ...... # Problem When using xUnit and constructs like Debug.WriteLine the DbgView-tool does not show the written output anymore. # Solution Add a new Listener – for example: Debug.Listeners.Add(new DefaultTraceListener()); Problem I must go back to an older package version (from 1.1.0.0 to 1.0.0.0) but the Package Manager Console does not allow this. With the command Update-Package EsriDE.Commons.System.Utils -Version 1.0.0.0 I got the error: Update-Package : Already referencing a newer version of 'EsriDE.Commons.System.Utils'. Solution Don’t worry. You could uninstall the package Uninstall-Package EsriDE.Commons.System.Utils -Version 1.1.0.0 and install the older one instead. Install-Package EsriDE.Commons.System.Utils ...... As an GWB-influencer I had the chance to review SmartAssembly. Because obfuscation is an important part in protecting intellectual property this review chance was a good start for this. The first few clicks show that not only obfuscation could be made with SmartAssembly but also some other very interesting things. The complete review could be read here: GWB-Review SmartAssembly Essentials Run the bash for this as administrator. The shortcut is located in the Git installation folder. "%ProgramFiles(x86)%\Git”. Good Setting for the layout are: Screnn buffer size Width: 160 Height: 3000 Windows size Width: 160 Height: 75 A detail explanation could be found under Unable to modify git bash Windows shortcut - Full Instructions Additonals With the Console enhancement project (Console Enhancement Project at SourceForge) it’s a lot more fun to work with console. Settings for console ...... Initial situation If you download and install PostSharp you run the professional edition in trial mode if you don’t configure additional things – also if you want to run the community edition. There is no visual incisive hint, that informs you about that. So your assemblies gets an metainformation, that you use a PostSharp in evaluation mode. You could use the Reflector to check this: Setting a meaningful license In the start menu is the PostSharp tool “PostSharp 2.0 User Options”. With this tool ...... Getting the ressources First at all download xUnit http://xunit.codeplex.com/r... xUnit Contrib ReSharper http://xunitcontrib.codeple... This gives you a bridge between ReSharper functionality and your XUnit coding. Installation und Configuration Unzip both archives. xUnit part Configure the code to use xUnit Normally I prefer a single checkout point for my developing solution – this whole bundle I name DevTree. One of the top folders in the hierarchy of this DevTree is a lib-Folder. ...... Toggeling the checkbox “Perform Runtime Contract Checking” lets run the next application start with the new set option. But for unit test an explicit new build will apply the option for the next run. Motivation Encouraged from the article “Using NuGet without committing packages to source control” I decided to wrap the NuGet-call in a MSBuild target instead of using a pre-build event. Because we also trigger FxCop and StyleCop via targets this fits better in our project management. Create the targets-file First at all we need a targets-file for integration. It is located in a DevTree beside the NuGet-executable beneath a special tool-folder: The content is quite simple: <Project xmlns="http://schemas.micro... ...... If you develop ArcGIS Add-ins with Visual Studio under limited permissions you get during the build process an error, that the stuff could not be registered. Normally its enough to run one times this build as an admin. Then all needed information are set and also taken for users with limited access. So – how to suppress the registration task? If you look inside the running target (C:\Program Files (x86)\MSBuild\ESRI\ESRI.Arc... you will see these statements: <Warning Text="Skipping ...... Vorkenntnisse: Kenntnisse einer Programmiersprache sind hilfreich. Zielgruppe: Dieser Workshop richtet sich an alle Softwareentwickler und Softwarearchitekten, die Lösungen in Form von ArcGIS Desktop Erweiterungen oder ArcGIS Engine Anwendungen planen und entwickeln. Kurzbeschreibung: Professionelle Softwareentwicklung hat primär nichts mit Geld zu tun, oder mit der Verwendung teurer Entwicklungstools. Vielmehr basiert Professionelle Softwareentwicklung auf Werten mit dem Ziel, dauerhaft guten, fehlerfreien ...... Keymaps for ReSharper is a nice tool and allows the user easily to learn short cuts of ReSharper. Unfortunally the last update is from january 2010. So the installation folder of the installing script (Install.Keymaps.for.ReShar... is not up to date. If you run it no expected new menu item “Show Keymap” under the ReSharper-menu is listed. But you could easily correct this. Look in the cmd and you will see that the destination of the copy command inside points to "%APPDATA%\JetBrains\ReShar... ...... For getting data with using a proxy simply modify the command with included –-config-parameter with proxy-information. So the original: hg clone https://ralfwscratchpad.goo... ralfwscratchpad transforms to: hg --config http_proxy.host=proxy:8080 clone https://ralfwscratchpad.goo... ralfwscratchpad ...... Until now CopySourceAsHtml only supports Visual Studio 2008 out of the box. But it is no problem to pimp up the config-file for supporting Visual Studio 2010. Copy all three files to "%userprofile%\Documents\Vi... Studio 2010\Addins" Open CopySourceAsHtml.AddIn in a text editor and change both lines with <Version>9.0</Vers... to <Version>10.0</Ver... Run Visual Studio 2010 and CopySourceAsHtml works fine ...... By pasting formatted text in Word and OneNote both applications act a little bit different. Meanwhile Word supports RTF-formatting OneNote does not. OneNote could only handle HTML-formatting. In combination with presenting source code for Visual Studio the Add-in CopySourceAsHtml is available. During copying with Edit > Copy As HTML some option must set – notably Include RTF should be deactivated: ...... Today Patrick gives me a new license for his static code analysis tool NDepend for my fresh machine with Win7/64. This platform is new for me, so some things are different to Win XP. Maybe that till yet some of these things are not well enough understandanded from me. So i stepped in some traps. Here are my notes to get NDepend running. Download of NDepend Professional Edition from http://www.ndepend.com/NDep... Extracted to c:\program files (x86)\NDepend Started NDepend.Install.VisualStudi... ...... Today we updated our Hudson CI-server. After changig job-configuration Hudson throws an error, that the config.xml could not be deleted. But the new entries are correct saved. Nevertheless such behaviour bothers. The trick was to update also the plugins. After that all works fine again. Today my FxCop-GUI stated, that a new release is available – but the link to this release is broken. After googling a little bit i realized, that the new release of FxCop ist actually only included in “Windows SDK for Windows 7.1”. This is downloadable under Microsoft Windows SDK for Windows 7 and .NET Framework 4 (ISO) Extract the ISO Open the Setup\WinSDKNetFxTools\cab1... Extract WinSDK_FxCopSetup.exe_all_e... Run Install.Exe ...... StyleCop issues inheritedoc-comment Using <inheritdoc />-comment is not recognized by StyleCop. So this needs a suppression: // <inheritdoc /> [SuppressMessage( "Microsoft.StyleCop.CSharp.... "SA1604:ElementDocumentatio... Justification = "InheritDoc")] FxCop issues Too few namespaces [module: SuppressMessage( "Microsoft.Design", "CA1020:AvoidNamespacesWith... Scope = "namespace", Target = "EsriDE.Core.Service.Logging", Justification = "We want to ...... Using a project-specific custom disctionary for FxCop and FxCop build tasks is very simple. The FxCopCmd call in the FxCop-target offers the parameter /dictionary:<DictionaryN... for that. But for Visual Studio a little bit more steps are needed. And these steps musst me gone for all projects. Add the custom dictionary as a link to each project. I organize such links under the special Properties-folder. So normally these links dont violate my eyes ;-) Next step requieres editing of the csproj-files. ...... Globale Konfiguration Die setzt man unter den globalen SVN-Einstellungen. Diese öffnet man per kontextsensitiven Menü im Explorer: Global Ignores Standard *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo *.rej *~ #*# .#* .*.swp .DS_Store sinnvoll sind für .NET-Entwicklungen und Visual Studio und ReSharper folgende Ergänzungen *.suo *.csproj.user */_ReSharper.* *.ReSharper.user */bin */obj *.cache *.gpState Der oft genannte Vorschlag *bin und *obj ist keine gute Idee da auch Dateien die mit ...... For a general applicability i tried to specify the WorkingDirectory attribute in a qotted manner: <WorkingDir>&quot... or <DoubleQuotes>%22<... <WorkingDir>$(DoubleQ... The Exec task self is <Exec WorkingDirectory="$(Working... Command="$(ExtractComCatego... $(InputDirectoryArg)$(FilterArg) $(SeparationArg) ...... Installing StyleCop for ReSharper under an administrative account does not activate this ReSharper plugin under my developer account. A system analysis show, that this plugin is installed under %userprofile%\Local Settings\Application Data\JetBrains\ReSharper\v4... StyleCop for ReSharper This gives the hint, that the msi must be started for each individual user separately – maybe the is the possibility to move the stuff to all users or that there is also an administrative installation ...... If AgentSmith throws a warning that some term is not spelled correctly for this term the spell checking could be suppressed with: //agentsmith spellcheck disable ... //agentsmith spellcheck enable ...... Run FxCop as a post build event Since FxCop 1.36 it is possible to include FxCop in a post-build event. So FxCop runs after compiling in Visual Studio and allows you directly jumping to the warned line. Description of the command line In the sample above the command line is IF$(ConfigurationName) == Debug $(ProjectDir)..\..\..\..\to... /console /file:"$(TargetPath)" /directory:"$(ProjectDir)..... Interop Assemblies" /directory:"$(ProjectDir)..... ......

Often i see code-constructs like 1: try 2: { 3: string bitmapResourceName = GetType().Name + ".bmp"; 4: Bitmap bitmap = new Bitmap(GetType(), bitmapResourceName); 5: } 6: catch (Exception ex) 7: { 8: System.Diagnostics.Trace.Wr... bitmap."); 9: } The corresponding codetree has the structure: This works as so long as the bitmap is near the calling component and the names are similar. If the name of Form2 is changed (maybe through refactoring) the developer must remember, that there is ......

Offen also a simple application references some other assemblies. In those cases for a deployment all of these assemblies are needed. Instead giving the customer a bunch of all, with ILMerge you can bundle all assemblies in one. To support the merge-process in a post built step in my solution tree is a folder named Build which contains tools for the build-process. One of these tools is ILMerge: Next thing we need is a simple batch (ILMerge.bat) in the project which calls ILMerge: The ILMerge call ......

Im Zusammenhang mit der Entwicklung eines eigenen BizTalk Adapters trat immer wieder das Problem auf, dass nicht klar war ob ein Assembly geladen wurde oder nicht. Und gerade im Nichtladefall was der Grund dafür war.

Dafür gibt es das SDK-Tool fuslogvw (Assembly Binding Log Viewer).
Dieses Tool erlaubt das Aktivieren des Tracings von Assembly-Ladevorgängen.