The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

Archive for the ‘Visual Studio 2005’ Category

Word 2007/2010/2013: Enabling the Word Developer Tab on the ribbon (via: Andrew Coates ::: MSFT – Site Home – MSDN Blogs)

Posted by jpluimers on 2014/01/16

This is one of the things I tend to forget, as you do it once per machine, and the place to do it is not logical to me.

I mainly use it to quickly record a Macro (boy, I wish Office had a TemporaryMacro feature like Visual Studio had. Alas no more: Macro Recording/Playback has been removed in Visual Studio 2012).

The logical place for me would be to have a context-menu on the ribbon where you can enable the Developer tab.

Anyway, this is how to enable the Developer tab in Word 2007/2010/2013: Read the rest of this entry »

Posted in Development, Office, Office 2007, Office 2010, Office 2013, Power User, Software Development, Visual Studio 11, Visual Studio 2002, Visual Studio 2003, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio and tools, Word | Leave a Comment »

.NET/Visual Studio: The ContextSwitchDeadlock doesn’t necessarily mean your code has an issue.

Posted by jpluimers on 2014/01/07

Thanks Pedro! (emphasis below is mine)

The ContextSwitchDeadlock doesn’t necessarily mean your code has an issue, just that there is a potential.

If you go to Debug > Exceptions in the menu and expand the “Managed Debugging Assistants”, you will find ContextSwitchDeadlock is enabled.

If you disable this, VS will no longer warn you when items are taking a long time to process.

In some cases you may validly have a long-running operation.

It’s also helpful if you are debugging and have stopped on a line while this is processing – you don’t want it to complain before you’ve had a chance to dig into an issue.

–jeroen

via: c# – Visual Studio: ContextSwitchDeadlock – Stack Overflow.

Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, Development, Software Development, Visual Studio 11, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio and tools | Leave a Comment »

Attach attach a debugger to a WebService (via: Stack Overflow)

Posted by jpluimers on 2013/12/10

Some things you have done for ages, are already phrased so nicely, the only thing you can do is quote.

Thanks Dave Coulter:

You can attach the Visual Studio debugger to a process by:

Debug > Attach to Process > Attach Read the rest of this entry »

Posted in .NET, .NET 1.x, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Development, Software Development, Visual Studio 11, Visual Studio 2002, Visual Studio 2003, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio and tools | Leave a Comment »

Some notes and links on DVCS (distributed version control systems)

Posted by jpluimers on 2013/10/01

I love DVCS for one single reason: merges are so much easier than with traditional version control systems, and you can use it in a disconnected way for almost 100% of the time. Coming from a traditional world, interoperability is key. So here are some links that greatly helped my getting started with DVCS (a really long while ago; this post has been way overdue).

The meaning of D

Usually, the D in DVCS is regarded as distributed. But it can have multiple meanings (even at the same time), depending on how you use it.

  • Distributed (the repository is available on all systems that have forked it, lessening the need centralized backups)
  • Decentralized (there is no need for a central server, though a certain structure in how you fork, pull and push (or pull request) can make life a lot easier)
  • Disconnected (a big plus: you can work off-line most of the time, and still perform your day to day work, but sometimes you want it to be truly distributed, and tools for that exist too)
  • Dynamic (especially for open source projects: being able to fork projects and perform pull requests has allowed to open source world to work in a much more dynamic way)

The reason to go D

Because it leads to experimenting, which makes you a better programmer: Version Control Makes You A Better Programmer | Cocoa Is My Girlfriend.

Because you will never lose your repository: Embarcadero Discussion Forums: XanaNews users ….

Because… Intro to Distributed Version Control (Illustrated) | BetterExplained.

Because of the demise of traditional version control systems: SVN projects on SourceForge, CodePlex and other sites are massively migrated to DVCS.

Hosting

Note that for by hosting on USA based or USA related providers, NSA can probably do whatever they please.

There are various lists of hosting sites, for instance:

I have experience with the sites I mention below. When time permits, I’m going to try some non-USA hosted providers as well.

Bitbucket.org

can host both GIT and HG for you. (it is from Atlassian; both public and private projects; free for private projects up to 5 users).

Notes:

Tip for a first commit: make sure you have a good README file in your rout (you can use various extensions), as it will get a prominent place at your bitbucket repository page.

GitHub.com

can host GIT for you. It can also hosts GISTs (small code snippets). Note it is USA based too.

tfs.VisualStudio.com

can host both TFVC and GIT for you (it is from Microsoft; payed if you have over 5 developers). Note it is USA based as well.

www.CodePlex.com

can host TFVC, GIT and Mercurial for you (also from Microsoft, but free, though supports only public projects) . Note it is USA based.

Bridging / conversion

SVN2TFS

can put migrate from SVN to TFVC in TFS. I have not used this myself, but did use:

SVNBridge

an SVN front-end to TFVC. CodePlex uses this a lot, and I used it client-side to pull a TFS 2005 repository to a user that could only do SVN. I could never get this to work on TFS 2005 server side, then never bothered as I switched to GIT/Mercurial soon after.

SVN to Mercurial: HGSVN and HGSubversion

There are three  tools that can help you integrate SVN and Mercurial:

GIT and Visual Studio / TFS

Getting Started with Git in Visual Studio and Team Foundation Service – Visual Studio ALM + Team Foundation Server Blog – Site Home – MSDN Blogs. GIT TF: Announcing Git Integration with TFS – Brian Harry’s blog – Site Home – MSDN Blogs. GIT TFS: similar to GIT-TF, but works cross platform. git-tfsHow do I use git-tfs and idiomatic git branching against a TFS repository? – Stack Overflow.

GIT / Mercurial

GIT and Mercurial are so so similar that there is both a Hg-Git Mercurial Plugin (free command-line tool) and Kiln Harmony (payed hosting service, but free for teams up to 2 developers).

D Workflow

Normally you work on a local for of a more global repository. Locally you branch/tag on work (then merge back into a more mainstream branch) and finally push your work (or create a pull request) to integrated it in other repositories. But if you are going to do major work that you are not sure you are willing to push back, then you are going to fork locally as well: Forking a Repository – Bitbucket – Atlassian Documentation.

Note that pull requests between BitBucket/GitHub/GoogleCode are not possible (hopefully yet). Actually it takes a bit of effort to push to multiple servers so I’ll ever that to another blog post.

Currently, the best practice is to use either of these two workflow models:

Both are a set of  scripts (Python for HG Flow, Shell for Git flow) assisting in managing your workflow.

The concept behind HG Flow is based on Git Flow, which has been made after the article A successful Git branching model » nvie.com (see also the list below).

For an example, examine the commit flow of the HG Flow project itself.

There are various pages with nice graphs and diagrams on what kind of workflows you can use, for instance:

Fork, Pull request: the Integrators workflow

The best is to do all your work in feature branches, as that makes working with pull requests a lot easier.

Even in a shared repository model, forks and pull requests have benefit as they allow for discussion / mentoring / code review.

Various VCS/DVCS links

Maintain the integrity of your .hg, .git and .svn directories

One of the drawbacks of files-based repository databases is that if they get damaged, you are hosed as downloading a fresh repository can take a long time. HG, GIT and SVN store their database in local directories named .hg, .git and .svn. You should be extra careful with them. So first and for all: make backups! Then: make sure you disable virus scanners for your .hg, .git and .svn directories.

SourceTree GUI on a Mac

SourceTree GUI on a Mac

GUI Installation / Commandline versions

For GUI tools, I’ve switched from TortoiseGit and TortoiseHG to SourceTree: see image on the right. It is the most powerful standalone VCS GUI I know about, and is available both on Windows (written in .NET using WPF controls; supporting HG and Git) and Mac OS X (supporting HG and Git, and importing from SVN). Actually, the Mac version was there first; the Windows version got released in March 2013 (:

For both SourceTree for Windows and Mac OS X, you can choose to use System (pre-existing) command-line versions of HG and Git, or embedded versions of HG and Git. Their clear aim here is that you should seldom be bothered with using the command-line tools, and that indeed works for most of the time.

Another very strong feature is that SourceTree supports both HG Flow and Git Flow out of the box: no need to use the flow command-line tools here. There is a good Git Flow guide here: Smart branching with SourceTree and Git-flow | SourceTree Blog.

Finally, SourceTree has some extra built-in support for the repository hosters Bitbucket and GitHub making it easier to interact with those.

All Tortoise* downloads, except TortoiseGit (go figure!) can install command-line versions of the tools. TortoiseGIT requires the commandline tools for msysgit to function at all.

Tortoise HG Werkbench

Tortoise HG Werkbench

In my experience (before discovering SourceTree), I needed to go to the command-line a lot, especially for TortoiseGit and TortoiseSVN. TortoiseHG has a way better GUI: they include HG Workbench – see image on the right – , which none of the other Tortoise implementations have leaving a clear gap for SourceTree (next to the virtually non-existence of good other GUI based VCS tools on Mac OS X).

If you want to do command-line only, here are some sources:

Encoding

The best is to use ASCII filenames and comments. Be very careful when using non-ASCII filenames, especially across operating systems. The main reason is that the Windows Console does not use the UTF-8 codepage. Some links (mainly about HG, but all version control systems have issues here):

Be careful with file content. For instance, TortoiseHG does not like UTF-16 files with BOM: it thinks they are binary: Converted `GroupProj.xsd` from UTF-16 to UTF-8 as TortoiseHg does not like UTF-16 files (it thinks they are binary).

Atomicity

Since the local operations are on your file system, they are not atomic. Which means that when a command is interrupted, your local state can be corrupted. This can hold for any version control (SVN, GIT, HG, TFS, etc). This leads to answers and comments like with these questions:

Status info

One of the really powerful features of SVN is that you can get status info in XML format for easier parsing. Without it, you get questions like these:

For GIT and HG you need this a lot less, but when you need it, they don’t have it.

Relative URLs

SVN 1.5 added a great feature (improved with 1.6) called relative URLs (they start with ^, .., / or //) which made a lot of commands easier. Since HG and GIT contain the complete repository history, virtually any path can be relative.

Ignore lists

Ignore lists are path patterns to ignore in your version control system. There is a whole bunch of pattern examples for various languages at Github. Setting up Ignore lists under GIT and Mercurial is easy: add a .gitignore or .hgignore file in the root of your repository. They are version controlled, so apply to all clients. HG ignore allows to kinds of patterns: glob and regex. For SVN it is a lot harder, so here are some links that can serve as a good starting point:

For all version control systems: Don’t use a client-side global ignore list; they only apply at that particular client. Even if you have ignore lists, thinks can seem to be strange. A few examples:

Renaming / Moving files

This is a bit tricky as the standard rename/move in Windows explorer does not notify the version control system about the operation. So you have to perform the rename or move in your version control tool or on the commandline.

Cheat sheets

Version control Icon overlays in the Windows Explorer

Version control Icon overlays in the Windows Explorer

Explorer overlay icons

Version control Icon overlays in the Windows Explorer can have a big system impact. TortoiseHG does handle this in a very smart way, that’s why TortoiseHG does not have Icon Overlay include, exclude paths. TortoiseSVN and TortoiseGIT however do, as they share large parts of the code (hence the dialogs look very similar), and this is how you configure them:

  • Both:
    • Disable default showing on all kinds of media.
    • Exclude all paths.
    • Include only the paths you perform version control in.
  • TortoiseGIT: Make sure that you have a * at the end of the include paths:

    20130820-TortoiseGit-overlay-icons-setti ngs (click to enlarge)

    20130820-TortoiseGit-overlay-icons-setti ngs (click to enlarge)

  • TortoiseSVN: No need to include a * at the end of the include paths:

    20130820-TortoiseSVN-overlay-icons-setti ngs (click to enlarge)

    20130820-TortoiseSVN-overlay-icons-setti ngs (click to enlarge)

For all three, there can be various reasons for overlay icons not to show up, varying from wrong configuration to crossing the Windows limit of 15 overlay icons (which is the reason that all three use the same overlay icon set).

External Comparison Tools example: Beyond Compare integration

I love Beyond Compare very much as a diff/merge tool as it supports to many file and archive formats.

Their support list lists a large number of other tools they integrate with, including many version control systems.

Integration screenshots (click on each to get a larger version):

TortoiseHG

  • A dropbox selection

    Select

    Select “beyondcompare3” from the dropdowns in both “Three-way Merge Tool” and “Visual Diff Tool”

TortoiseGit

  • Compare: Fill in the path plus parameters:
    “C:\Program Files (x86)\Beyond Compare 3\BComp.exe”  %base %mine /title1=%bname /title2=%yname /leftreadonly

    Select

    Switch the radiobutton to “External” then fill in the path and parameters.

  • Diff: Fill in the path plus parameters:
    “C:\Program Files (x86)\Beyond Compare 3\BComp.exe” %mine %theirs %base %merged /title1=%yname /title2=%tname /title3=%bname /title4=%mname

    Switch the radiobutton to

    Switch the radiobutton to “External” then fill in the path and parameters.

TortoiseSVN

  • Compare: Fill in the path plus parameters:
    “C:\Program Files (x86)\Beyond Compare 3\BComp.exe”  %base %mine /title1=%bname /title2=%yname /leftreadonly

    Switch the radiobutton to

    Switch the radiobutton to “External” then fill in the path and parameters.

  • Diff: Fill in the path plus parameters:
    “C:\Program Files (x86)\Beyond Compare 3\BComp.exe” %mine %theirs %base %merged /title1=%yname /title2=%tname /title3=%bname /title4=%mname

    Switch the radiobutton to

    Switch the radiobutton to “External” then fill in the path and parameters.

Line ending conversion

Be careful that you do not accidentally change CRLF line endings into LF ones: Delphi still does not like those. See You Clumsy GIT – DelphiFeeds.com.

Multiple upstreams

Both Mercurial/HG and GIT support multiple upstreams.

I need to put some more research in this though.

Making the move from SVN to HG (or GIT)

Mercurial/HG

  1. HgInit: Subversion Re-education.
  2. HgInit: Ground Up Mercurial.
  3. HgInit: Setting up for a Team.
  4. HgInit: Fixing Goofs.
  5. HgInit: Merging.
  6. HgInit: Repository Architecture.
  7. Mercurial: The Definitive Guide. (hosted at Red Bean, see below)
  8. Mercurial repository identification – Stack Overflow.
  9. Do not fork an empty repository: as soon as you commit changes to both, they loose their connection because an empty repository has a nullid first changeset to which the fork is bound, but the nullid gets overwritten at the first commit.

GIT

  1. Learning GIT | gitmap.
  2. Git Workflows, Branching & Merging Q&A – blogs.collab.netblogs.collab.net.
  3. Introduction to Git Concepts | Intertech Blog.

Red Bean: Books and more about VCS and OSS

Next to Mercurial: The Definitive Guide, there is quite bit of other stuff around version control and open source software at Red Bean, for instance these three books are great:

DVCS differences

Syncing a fork on BitBucket HG or GitHub GIT

You use forks when you do not have write access to a public repository. Pull requests than allows you to offer your changes back to the original repository. But what if the original repository changes? You want to sync your fork, right? On BitBucket with HG, this is easy: they offer a sync button. On GitHub with GIT it is a bit more work: you have to sync through your local clone through what is usually called the `upstream` (the original repository), then push the changes back to your fork. GitHub explains this using the command-line tools at Syncing a fork · GitHub Help, and manojlds for TortoiseGit at github – Can I update a forked project, on git, to the original/master copy? – Stack Overflow.

TFS and Mercurial, SVN, and GIT

Real-World use of Mercurial with a Team Foundation Server? – Stack Overflow. This explains how to use HG, and how to push/pull from the TFVC. The comments and answers also talk about SVN, and other version control systems.

TFS migration itself

–jeroen

Posted in .NET, CodePlex, Delphi, Development, DVCS - Distributed Version Control, Encoding, git, Mercurial/Hg, Software Development, Source Code Management, Subversion/SVN, TFS (Team Foundation System), Unicode, Visual Studio 11, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio and tools | 3 Comments »

.NET/C# – InvalidCastException for two Objects of the same type (via: G+/Stack Overflow)

Posted by jpluimers on 2013/08/03

If you ever get something similar to

InvalidCastException: [A]Person cannot be cast to [B]Person.

then you are (or more precise: your process is) probably loading the same assembly twice, but from a different context.

.NET allows that, and for reason (side by side loading, appdomains, etc).

Delphi doesn’t (thanks Warren Postma for noticing). But a mistake you see quite often is that Delphi developers try to load the same Delphi type from both an EXE and a DLL wondering why they don’t match. If you want to spread your types in Delphi, then use BPLs (run-time packages) for that. BPLs are similar to .NET assemblies, but cannot be loaded in memory twice.

–jeroen

via c# – InvalidCastException for two Objects of the same type – Stack Overflow.

Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Development, Software Development, VB.NET, VB.NET 10.0, VB.NET 11.0, VB.NET 8.0, VB.NET 9.0, Visual Studio 11, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio and tools | Leave a Comment »

What programmers font (monospaced!) do you like best?

Posted by jpluimers on 2013/05/08

Lucida Console Sample (thanks Wikimedia!)

Lucida Console Sample (thanks Wikimedia!)

I’m in search to see if there is a better programmers font than the monospaced Lucida Console mainly to be used in Visual Studio, Delphi, the Windows console, Xcode and Eclipse. What I love about Lucida Console design is the relatively large x-height combined with a small leading (often called “line height”). This combines very readable text, and a lot of code lines in view. Lucida has two small drawbacks, see the second image at the right:

  • The captial O and digit 0 (zero) are very similar.
  • Some uppercase/lowercase character pairs are alike (because of the large x-height)

But, since the font hasn’t been updated for a very long time, lots of Unicode code points that are now in current fonts, are missing from Lucida Console (unless you buy the [Waybackmost recent version that has 666 characters from Fonts.com) Well, there are dozens of monospaced fonts around, so I wonder: which ones do you like? In the mean while, I’m going to do some experimenting with fonts mentioned in these lists:CcKkOoSsUuVvWwXxZz are much alike.

A few fonts I’m considering (I only want scalable fonts, so raster .fon files are out):

I have tried Adobe Source Code Pro about half a year ago. That didn’t cut it: problem with italics in Delphi, and not enough lines per screen. [WaybackNew Open Source monospaced font from Adobe: Source Code Pro.

–jeroen

Posted in .NET, Adobe Source Code Pro, Apple, Delphi, Delphi 2007, Delphi XE3, Development, Encoding, Font, Lucida Console, Mac, Mac OS X / OS X / MacOS, Power User, Programmers Font, Software Development, Typography, Unicode, Visual Studio 11, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio and tools, Windows, Windows 7, Windows 8, Windows Server 2008 R2, Windows XP, xCode/Mac/iPad/iPhone/iOS/cocoa | 43 Comments »

Dot Net Tips & Tricks, C# (C Sharp)Tips & Tricks: Visual Studio Immediate Window

Posted by jpluimers on 2013/03/06

Great post on what you can do with the Immediate Window: Dot Net Tips & Tricks , C# (C Sharp)Tips & Tricks: Visual Studio Immediate Window.

It is far more than you’d expect on first sight.

The really good thing: this Immediate Window gem has been there for over a decade (:

–jeroen

Posted in Development, Software Development, Visual Studio 11, Visual Studio 2002, Visual Studio 2003, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio and tools | Leave a Comment »

Integrating Beyond Compare into Visual Studio for use with Team Foundation System

Posted by jpluimers on 2013/02/05

Clarification of the steps from via Support Beyond Compare to use Beyond Compare 3 or 2 from Visual Studio and with Team Foundation System.

First run this little batch file to show you the exact location of BComp.exe:

@echo off
  call :show "%ProgramFiles%\Beyond Compare 3\BComp.exe"
  call :show "%ProgramFiles(x86)%\Beyond Compare 3\BComp.exe"
  call :show "%ProgramFiles%\Beyond Compare 2\BComp.exe"
  call :show "%ProgramFiles(x86)%\Beyond Compare 2\BComp.exe"
  goto :eof
:show
  if not exist %1 goto :eof
  echo Beyond Compare is here:
  echo %~1

(I know that this will not find a Portable Beyond Compare installation).

Note that BComp.exe (for GUI use) and BComp.com (for console use) are bootstrappers for BCompare.exe. Both will wait when ran from a GUI or console for the comparison to finish. Starting BCompare.exe will not wait. See BComp.exe vs BComp.com – Scooter Forums for more information on this.

Everywhere you see path to BComp.exe below, enter the path that the above batch file tells you.

The first two pictures on the right show common steps for all three integrations. The images below are the specific ones for each integration. You can click on each image to view a larger version.

The steps work with the full version of Visual Studio and the Team Explorer edition of Visual Studio.

You can find different arguments for other tools on this excellent diff/merge configuration in Team Foundation – common Command and Argument values post by James Manning.

Adding diff/compare support to Visual Studio

  1. In Visual Studio Choose Options from the Tools menu.
  2. Expand Source Control in the treeview.
  3. Click Visual Studio Team Foundation Server in the treeview.
  4. Click the Configure User Tools button.
  5. Click the Add button.
  6. Enter “.*” in the Extension edit.
  7. Choose Compare in the Operation combobox.
  8. Enter the path to BComp.exe in the Command edit.
  9. In the Arguments edit, use:
    %1 %2 /title1=%6 /title2=%7
  10. Then press OK, then OK, then OK

Adding 3-way Merge to Visual Studio

You need Beyond Compare version 3 Professional for this.
(note: only the steps marked with * are different from above)

  1. In Visual Studio Choose Options from the Tools menu.
  2. Expand Source Control in the treeview.
  3. Click Visual Studio Team Foundation Server in the treeview.
  4. Click the Configure User Tools button.
  5. Click the Add button.
  6. Enter “.*” in the Extension edit.
  7. * Choose Merge in the Operation combobox.
  8. Enter the path to BComp.exe in the Command edit.
  9. * In the Arguments edit, use:
    %1 %2 %3 %4 /title1=%6 /title2=%7 /title3=%8 /title4=%9
  10. Then press OK, then OK, then OK

Adding 2-way Merge to Visual Studio

This is for Beyond Compare version 2, and Beyond Compare version 3 Standard.
(note: only the step marked with * is different from above)

  1. In Visual Studio Choose Options from the Tools menu.
  2. Expand Source Control in the treeview.
  3. Click Visual Studio Team Foundation Server in the treeview.
  4. Click the Configure User Tools button.
  5. Click the Add button.
  6. Enter “.*” in the Extension edit.
  7. Choose Merge in the Operation combobox.
  8. Enter the path to BComp.exe in the Command edit.
  9. * In the Arguments edit, use:
    %1 %2 /savetarget=%4 /title1=%6 /title2=%7
  10. Then press OK, then OK, then OK

To summarize, the differences

Functionality
entry in
Operation combobox
content of
Arguments edit
Beyond Compare
version/edition
 diff/merge Compare %1 %2 /title1=%6 /title2=%7 any version/edition
3-ware compare Merge %1 %2 %3 %4 /title1=%6 /title2=%7 /title3=%8 /title4=%9 3/Professional
2-way compare Merge %1 %2 /savetarget=%4 /title1=%6 /title2=%7 2 or 3/Standard

Hope this helps a few people.

–jeroen

via:

Posted in .NET, Beyond Compare, Development, Power User, Software Development, Visual Studio 11, Visual Studio 2002, Visual Studio 2003, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio and tools | Leave a Comment »

VBScript tips and tricks

Posted by jpluimers on 2013/01/22

I normally don’t do much VBScript stuff, but sometimes I have to, and these tips helped me big time:

–jeroen

This was the script in question (mimicked a bit after Prnmngr.vbs): Read the rest of this entry »

Posted in Development, Scripting, Software Development, VBScript, Visual Studio 11, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio and tools | Leave a Comment »

Converting Visual Studio 2003 WinForms to Visual Studio 2005/2008/2010/2012 partial classes (via: Duncan Smart’s Weblog)

Posted by jpluimers on 2013/01/10

In the .NET 1.x past, the WinForms designers in Visual Studio .NET and Visual Studio 2003 would put the C# or VB.NET code containing the form code as the InitializeComponent method of the top most class monolithic C# and VB.NET files that also contain the user code (for events and such).

As of Visual Studio 2005 (actually: Whidbey and higher), this code is based on partial classes. For each form (actually designable entity, but lets limit this to WinForms forms) you get a MyForm.cs and MyForm.Designer.cs

As a side note, with a bit of effort, you can generate the Windows Form Designer generated code yourself as this answer shows. This is for instance convenient when you have form definitions in a different technology and want to convert it to WinForms, WPF or another form of designer based .NET code.

I long time ago I wrote a short manual for co-workers on converting the monolithic files (for people interested, it is below).

Since then I found a couple of very interesting links: Read the rest of this entry »

Posted in .NET, .NET 1.x, .NET 2.0, .NET 3.0, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Development, Software Development, Visual Studio 11, Visual Studio 2002, Visual Studio 2003, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio and tools, WinForms | 1 Comment »