Showing posts with label Tools. Show all posts
Showing posts with label Tools. Show all posts

Monday, 9 May 2016

MS Access and LINQPad

Situation:

As most developers, using LINQ queries saves a lot of time and works absolutely great. For me one of the greatest tools for quick and easy querying data and testing code is LINQPad. However, sometimes you get a project where the (backend)database is MS Access (yes, it still happens, even in 2016 :) ).

Problem:

And there starts the problem. There is no MS Access driver for LINQPad, at least no free one.

Solution:

But we are lucky, LINQPad provides a way to create custom drivers. So one of my colleagues, Frank den Outer, made a driver for MS Access to enable you to connect to *.mdb and *.accdb and allows you to query on data from LINQPad on MS Access database (even with password protected ones). So the credits of this post goes to him!

See the screenshots below:






Our company, DNM, offers you this driver for free. You can download is here: MSAccessDataContextDriver.lpx. After the download, start LINQPad, and when creating a new connection, you can easily add the downloaded driver.

Happy programming!

Tuesday, 11 June 2013

Free online 15GB+ storage alternative for Dropbox

Hi folks,

Dropbox is fine, but you can run out of space. There is a free alternative which give you even bigger storage, copy.com!
You start with 15GB and for every user who creates an account via yours, you both get 5 GB storage extra, for free.
So, start creating an account with this link: https://copy.com?r=2ClF1N and get the default 15GB + 5 GB extra, because of using this link (and I get 5 GB free as well :) ).

Copy.com supports both Microsoft and Mac OS X environment!

Thanks and have a nice day!

Thursday, 11 April 2013

Visual Studio 2012 XML IntelliSense for URL Rewrite 2.0

Problem:
I am working on a web-project within VS2012. I was trying to implement url-rewriting as described at cache busting in ASP.NET by Mads Kristensen. I was running into the problem that VS2012 didn't recognize the tag inside the .
I got it to work/function (thanks to ScottGu's blogpost) after installing the URL Rewrite Extension on IIS7.x.
So far so good, but VS2012 intellisense still didn't recognize the tag.
Solution:
I searched around and found the post http://ruslany.net/2010/04/visual-studio-xml-intellisense-for-url-rewrite-2-0/ on RuslanY Blog. Unfortunately, the script didn't work on VS2012. Even changing a part of the code to var vs9CommonTools = shell.ExpandEnvironmentStrings( “%VS110COMNTOOLS%” );
However, a guy named Michal A. Valášek created an updated js script to get it to work on VS2012.
So I put the pieces together for your convenience, you can download it here (I called it rewrite2.1_vsintellisense). Note this script is just for VS2012! Just unpack the zip file, run the commandline window as administrator (elevated privileges), and execute the script file with cscript UpdateSchemaCache.js
Happy programming!

Thursday, 10 March 2011

LinqPad on SharePoint data

Linq to SharePoint is great! The SPMetal.exe is really easy to use (see here how to use it).
But I was struggling a bit to get the right Linq queries. So I thought, well let's use LinqPad. I ran into the following error message:
PropertyOrFieldNotInitializedException: The property or field has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested.
I searched for a solution, but I didn't find one. Today I figured out how to use LinqPad to query on SharePoint data, without facing these security-IIS-related issues.
On CodePlex you can find the LinqPad Data Context Driver for SharePoint created by a guy named 'theiwaz'. Creating a new connection in LinqPad, using this driver did the trick. Read the documentation how to install and setup the configuration (very easy!).

In my situation, I ran into a small problem. The documentation shows a screenshot with a sample code, using "C# Expression" a the language.
When I tried that, it failed. I got the following message:
String was not recognized as a valid Boolean
 Changing the language to "C# Statement(s)" did the trick for me. I only need to rewrite the code a little bit. But that's actually a great advantage, because it now looks like the code as I will use inside my VS2010 project.
var q = from prod in Products
    where prod.Customer.Title == "DNM"
    select  prod.Title;

q.Dump(1);

Friday, 25 February 2011

Productivity Power Tools

Recently I found the Productivity Power Tools of Microsoft for Visual Studio. The extra functionality you get is very useful:
  • Find extension
  • Enhanced Scrollbar
  • Middle-Click Scrolling
  • Organize Import for VB.NET
  • Add Reference Support for Multi-Targeting
  • Options in HTML Cut/Copy
  • Solution Navigator (an enhanced Solution Explorer)
  • Tab Well UI
  • Searchable Add Reference Dialog
  • Tools Options Support
  • Quick Access (search for and execute common tasks within VS IDE)
  • Auto Brace Completion (Supports the following constructs: (), {}, [], <>, “”, and ‘’. This is really useful!)
  • Highlight current line
  • HTML Copy
  • Triple Click
  • Fix Mixed Tabs
  • CTRL+Click Go to definition
  • Align Assignments
  • Move Line Up/Down commands
  • Column Guides
  • Colorized Parameter Help
So, it's quit a list and beside of this, it's FREE!. See the web site (above) of these tools to get more information and to download these tools.

Wednesday, 5 May 2010

Deployment of a class library with WSPBuilder

This topic contains some points about deployment class library with WSPBuilder. For a couple of weeks I am working with WSPBuilder (http://www.codeplex.com/wspbuilder) for creating SharePoint web parts.
Due to the lack of some functionality, I wrote a class library which contains some extension methods for the SPWeb object. At that time the problems began.
Situation:
  • VMWare machine with MOSS 2007 on a Win2003 machine for development and test purposes
  • Visual Studio 2008 with WSPBuilder extension
  • Solution with several WSPBuilder web part projects
  • Custom class library SPExtensions.dll
Three of the WSPBuilder projects in my solution are using this class library with the extension methods in it. That works fine, until you are going to deploy it.
The deployment of the first WSPBuilder project deployed the class library into the GAC. This will affect the build process of the other two WSPBuilder projects. Those two wsp-packages do not have the class library dll in it. This happens even the referenced dll property "copy local" is set to "true". This was/is a real PITA! Because after updating the SPExtensions project, the new dll was not updated in the GAC for the 2nd and 3rd project (because the dll is not included in the wsp file).
So I want the SPExtentions.dll deployed to the WebApplication bin and not in the GAC. After some search and trial and errors I found the solution to get this job done.
  1. Make sure the SPExtensions.dll (or whatever your class library is called) is not present in the GAC anymore. You can use gacutil to uninstall the assembly.
  2. Created a '80' folder with a 'bin' subfolder inside all of the projects (e.g. ..\ProjectFolder\80\bin) that uses the SPExtensions.dll.
  3. Create for each of these project a post build event:
    move /Y "$(TargetDir)SPExtensions.dll" "$(ProjectDir)80\bin"
    NOTE: You should use the "move" command and not the xcopy. The WSPBuilder (by default) sets the DeploymentTarget of the assemblies found in folders, other than GAC and 80\bin to GlobalAssemblyCache. So make sure you move the SPExtensions.dll from the ProjectFolder\bin\release (or debug) to the 80\bin folder created in step 2.
  4. Now you can build the project, create the wsp-files and deploy (or upgrade) them. After step 3, I used the "clean" option, just to be sure that I do not get messed up with some left crap.

Friday, 26 March 2010

Improve performance of VMWare

For a while I am using VMware environments for SharePoint development projects. Last time, I was really struggling with performance issues. My host OS is Windows 7 (64-bit) with an Intel T7700 processor and 4 GB RAM. About every 10 minutes, the CPU of the virtual machine (Windows 2008 R2, 64-bit) was up to 100% caused by a variety of services (every time another one).
There are some improvements I have made which worked (at least) in my situation.
  • Configuration of the virus scanner.
    Exclude the VMware files from real-time protection and for the ThreatSense-engine
  • Add some parameters to the VMware configuration file (.vmx)
    - Disable page sharing (improves I/O). Add following line to the vmx-file:
    sched.mem.pshare.enable = "FALSE"
    - If you have enough free RAM for all planned concurrent VMs, be sure to disable memory trimming for guest OSes adding the following line to the virtual machine configuration (.vmx) file:
    memTrimRate="0"
  • A really performance hitter for virtual machines is a fragmented host OS disk. Be sure to schedule a disk defragmentation on your host OS a regular basis (best: daily)
  • See more tips here.
By now, I am a bit more happy

Friday, 19 March 2010

One way to fix slow FireFox startup

Last time FireFox was starting up very slowly on my computer. I am using FireFox 3.6, which is by now the most recent version.
The next solution helped me to increase the startup time.
  • Start FireFox
  • Type about:config in the address bar
  • Search for the preference name browser.sessionstore.enabled
  • Edit the value to false
  • If you cannot find it, you should create this preference name:
    1. Right click somewhere in the window
    2. Choose New>Boolean

    3. Enter the preference name browser.sessionstore.enabled

    4. Select the value false in the 'Enter Boolean value' window
    5. Press 'OK'
    6. Restart FireFox
Note:
with this value set to this preference, you will not have the option for session restore if FireFox crashes. To get the session restore option back, just edit this preference value to true or just delete this entry (Right click on preference and select Reset, restart FireFox and your entry is gone).
EDIT:
Search also for browser.sessionstore.resume_from_crash and set this value also to false.

Monday, 28 December 2009

Portable Skype version available!

Till today, I worked with a Skype version (3.8). For this version there was no portable version, and I love portable apps. My colleague and I created from the installed 3.8 version a portable one. That worked ok.
Today, I found that there is a portable Skype version (4.1) on portableapps.com. So no need to create your own work-around portable version.
You can download it here.

Tuesday, 14 July 2009

Launchy and Application References: Workaround

Launchy, the open source keystroke launcher, is a useful application when you have a lot of application installed. By pressing ALT+Spacebar (default setting), you get a little popup window. Just enter (beginning of) the name, Launcy shows it in the popup window, with the corresponding application icon: just press enter and your desired application will start. So far so good!

But one of the little problems we have is that we have an application installed which is installed with the publishing feature of Visual Studio. This means, this application is installed on your pc, but instead of placing a shortcut (.lnk), it places an application reference (.APPREF-MS). This extension is not recognized by Launchy, even if you add this extension (its actually not showing at all in Explorer with 'showing all extensions' on).

Here is a work around I found to be able to start my published applications using Launcy.
1. Open the application reference file in a text editor.
2. Verify the location that is pointed to, e.g.: file://192.168.23.xx/Software/publish/MyApp/MyApp.application#MyApp.application
3. Create a shortcut to this MyApp.application
4. If you wish, you can change the icon of the shortcut to the one you needed (I placed an icon into the same directory).
5. Now you are ready. This shortcut does the same thing as the application reference (well, as far as I can see now :))

Good luck.