It’s going to be one of those days…

14 07 2008

VS2008 has crashed 20+ times today.  Reboots aren’t helping.  I’m slowly uninstalling plug-ins at the moment.  Ugh.

Obviously a Monday

I broke'd it...

Tags: ,




AnkhSVN 2.0 Released - How’s it look?

11 07 2008

When I first started using Subversion full time for all of my personal projects, I stuck with the VisualSVN server and AnkhSVN as a Visual Studio client.  Both were free, easy to install, and easy to use.

However, after a few weeks, the AnkhSVN client could almost be called “annoying.”  It trampled over the existing SCC plugins for SourceSafe (for work) and made a mess out of several of my project uploads.  I ended up going back to using TortioiseSVN and doing everything through Explorer.

When AnkhSVN 2.0 was released, I figured I’d give it another shot.

The site claims quite a bit—including several unique additions:

  • Pending changes window; subversion status and commands available in one place
  • Full support for Visual Studio 2005 and 2008; AnkhSVN is now a SCC package instead of just an addin
  • Better log viewer
  • Merge support
  • Property editor
  • AnkhSVN now supports most project types previously unsupported via the SCC api
  • All solution explorer actions (rename, copy&paste, drag&drop) keep subversion history now
  • Enhanced build process and setup
  • Automatic check for updates
  • And last but certainly not least end user documentation

All of those look great—especially the SCC package and changes window.  But how does it compare once installed?

After installation and starting up VS2008, everything looks normal.

Brief Look

Pending Changes Window

The new pending changes window is FANTASTIC—much improved over the old 1.x versions.  I did run into a snafu when trying to resize the window where the scrollbars didn’t update on the screen; however, I’m not sure if it’s a VSS or AnkhSVN issue.

SCC Package

Under Options > Source Control, AnkhSVN shows up just like it should.

What does boggle me is that all of the Subversion commands and menus are available no matter what—even when the VSS SCC is enabled.  It still has the stink of VSS and SVN trying to step on one another (“pick me! control your project with me! no, I’m better! pick me!”).

Log/History Viewer

I really like the new history viewer.  It’s clean and easy to read; however, if you change the options at the top—there doesn’t appear to be a way to “change it back” and see the history again, close the view and review.

Annoyances

  • Opening a project from Subversion (File > Subversion > Open from Subversion) will open a project just fine, copy it down, but never opens it.  You have to go back and open the solution after it’s created the local structure.  Not huge, but annoying.
  • When viewing history; you cannot view the history of a single file (that I’ve found) in the Repository Explorer. 

I’m still planning to give it a whirl for the next couple of weeks and see what happens.  Hopefully over a couple weeks I’ll have more time to code—it’s been a busy July so far!





FIX: Printing ANYTHING Locks Up Windows Server 2003

12 06 2008

A few days ago, I installed Visual Studio 2008 SP1 Beta and all the goodies that came along with that.  Since then, printing just didn’t work.  If I tried to print, it’d hang up the application for a few minutes (felt like hours) until it’d error out that the printer was not operational.  I could print DIRECTLY from the printer (the test page).  Meh.

Trust me, while trying to prototype a reporting application and print examples there is no happiness when you can’t print.

After several hours of hunting, testing drivers, trying fixes, etc… I finally came across a TOTALLY unrelated MS KB article, #948046.

The article is for Windows Server 2003 with SP2 and XP with SP2–-both x64 and x86 editions.  It focuses on Microsoft Word and not being able to print if the EU Font pack is installed.  The scenario of “Word document is not printed as expected” is pretty vague.

Now, I’ve been using the same HP printer drivers (an 8150 DN and 5550 DTN Color) for ages without any problems, so I can’t fathom that caused the problem, but who knows.  The problem started after installing VS2008 SP1 Beta (I haven’t combed the install logs to see if it reinstalled Unidrv.dll).

Anyway, the fix to this problem, so far (after testing in several applications including Adobe Acrobat, Word, Excel, Visual Studio, and SQL Management Studio), is to download the hotfix in the #948046 article

Install, reboot, and things work perfect.





Adding Multiple System Monitors ala Perfmon

22 05 2008

I use Perfmon a LOT. 

The logging and diagnostic software provided to us is, well, it’s just not that great.  Very slow to use and get around and every time I want a specific counter, I have to go ask for it because it’s someone’s “job” to add those. Ugh.  That’s no way to live.

Until now, I typically have a Perfmon console for each of my major application and SQL servers.  Why?  Because I was never smart enough to figure out how to add additional System Monitor controls into a single performance console.

Well, now I figured it out!

  • File > Add/Remove Snap-in
  • Click Add…
  • Select the ActiveX Control

ActiveX Control

  • A Wizard will start; scroll down and select System Monitor Control

System Monitor ActiveX Control

  • Give your new counter a name!
  • Repeat this until you’ve added your servers.  From there, configure each System Monitor control as needed.

Perfmon with all the servers!

From here, you can either add counters manually or use this brilliant PowerShell script.





TIP : Extracting Files from an MSI File

13 05 2008

Ever had an MSI file that you needed a library or something out of, but didn’t want to install it?  Amazingly enough, you CAN get to those files.

The Windows Installer (msiexec.exe) can be ran at the command line to extract files directly using an administrative install.

How?

msiexec /a “YourMSIPackage.msi” /qb TARGETDIR=”DRIVE:\YourTargetPath”

Switches used:

/a – Administrative installation
/qb – Basic UI (simple GUI progress bar)

This is a lot easier than hacking it using WinRAR. :)





FireFox 3.0 Beta 5 - DEP’d?

13 05 2008

Anyone else having Windows Server 2003 throw up on FireFox 3b5 with DEP errors?  I’ve excluded it for now, but it makes me a bit leery.

Firefox DEP'd.

Somewhere, there’s a bit of irony here.  I think Windows is just cranky that I have IE 7 disabled and have FireFox set as my default browser.





Using the CLR Profiler with VS2008 Web Projects

13 05 2008

Download CLR Profiler for .NET 2.0 Framework.

The CLR profiler is great; it’s sweet to be able to see where memory is allocated and how well objects are disposed of (and whether or not I missed something that GC just isn’t catching). 

The form is pretty easy to use, but there’s a bit of a trick for VS 2008 web application profiling when using the built-in Web Development Server.

NOTE:  This isn’t anything like the ANTS Profiler (which I wish I had a license for, but don’t).  ANTS will tell you where code slowdowns are and more, this simply returns back histographs of object usage, memory, and the stack/heap.  Still very useful none the less.

Here’s how to get started:

1. Download the CLR profiler (see the link at the beginning of this article or click here).

2. Extract the profiler into a directory (it defaults to C:\CLRProfiler); it will extract two directory structures (binaries, source) and a readme document.

3. To start using the application immediately, browse into the Binaries directory and execute the CLRProfiler. 

Use the x86 version. I haven’t been able to get the x64 version to work correctly (even though I’m on a x64 machine) when profiling .NET web applications ala the built-in web development server.

4. Under File > Set Parameters, modify the “Command Line” to reflect the parameters required to start the built-in web development server.  After the parameters have been set, click OK.

Usually, you have a Port parameter and a Path parameter.  Here’s an example:

/port:1234 /path:“J:\Projects\Work\Current\ERC\web\”

5. Click ‘Start Application’.  A browse window will open.  Visual Studio 2008’s web development server is located in the Common Files directory.

%CommonProgramFiles%
    \Microsoft Shared\DevServer\9.0
or
%CommonProgramFiles(x86)
    \Microsoft Shared\DevServer\9.0

6. After selecting the WebDev.WebServer.Exe application file, your server will kick off with the parameters you set.

Now you’re ready to open up a web browser, begin browsing around, and evaluate your application.  When finished, click the ‘Kill Application’ button on the Profiler or simply close the WebServer application.





Visual Studio 2008 and .NET 3.5 SP1 Beta

13 05 2008

The blogs are abuzz this morning after the first beta release of the VS2008 and .NET 3.5 SP1.   Download it here.

In my opinion, this isn’t a service pack—this is a new version!

There are quite a few bug fixes (what you normally associate with a service pack), but also a huge list of new additions and improvements.

From Somasegar:

Traditionally our service packs address a range of issues found both through customer and partner feedback as well as our own internal testing.  While this service pack holds true to that theme and delivers updates for these types of issues, it also builds on the tremendous value that Visual Studio 2008 and .NET Framework 3.5 deliver today and enables an improved developer experience by adding a number of additional components that cover a range of highly requested customer features. For example, the service pack is the first release for Visual Studio 2008 that delivers full support for SQL Server 2008 and the ADO.NET Entity Framework.

I’ve posted a few links at the end of the post to the more extensive sources right now, take a look and get ready for the plunge.

So, what am I most excited about?

  • ADO.NET Entity Framework – I’m hoping that the “real” release motivates Oracle to develop provides for the entity framework and my dream of LINQ-esque connections to Oracle will be realized.
  • ASP.NET Routing Engine – As the MVC framework gets closer to a production reality, it’s very motivating to see the underpinnings already in place.
  • VS2008 Performance Improvements – Anything has to be an improvement. :(
  • JavaScript Code Formatting – Sweet, now if I can only get JavaScript intellisense to work. :(
  • LINQ Debug Support – Very nice, love seeing the generated SQL right there at debug time.

There are also lots of updates to WCF and WPF.  Hopefully this summer I’ll have more time to use these .NET 3.0 technologies and maybe be a bit more excited. ;)

Visual Studio 2008 GUI/Tools

The Web Developer Tools team has released a comprehensive list of designer bug fixes, IIS templates and modules, formatting changes, intellisense upgrades, and more on their blog.

MVC and URL Routing

Phil Haack details the effects of the URL routing changes on the MVC Preview releases as well as how it affects the upcoming Preview 3.

Everything

ScottGu, as always does an excellent job tying everything up together—designer, framework, and tooling.

Now, if ReSharper 4.0 would EVER get to RTW before we’re ready to VS2009, it’d be super!





FIX: Find/Replace Crashes Visual Studio 2008

8 04 2008

For the past few months, I’ve “tolerated” Visual Studio 2008 crashing whenever I tried to do a Find/Replace.  I’m not sure why… I just did.

Today, I set out and finally found a fix—it’s a known issue, but the patch hasn’t been widely distributed.  The problem revolves around not Visual Studio, but Windows itself—any x64 bit version of Windows.

The full feedback submission on Microsoft Connect is available here.

The solution is to go to this HotFix request site and for the “Product and version affected”, request 947841.  A few hours later, you’ll get an email with the downloadable hotfix and a password to unlock the file.

Unfortunately—NOTHING I’ve found explains what the hotfix resolves, changes, etc, but it works.

 





SQL Server 2005: Stored Procedures Executor Role

7 04 2008

Granting permissions to use stored procedures is something I rarely do… in most of my applications, I either use .NET SQL projects and compile my SQL code OR everything is handled in the data layer/LINQ code.

We’ve had a recent consult project and the coders use stored procedures heavily.  That’s cool—to each their own.  Performance seems good on the system and the procedures are pretty small.

But… remembering to readd the EXECUTE permission to the user account on each reload is REALLY annoying.  I’d read this somewhere (if I can find the original source, I’ll cite it) ages ago and dragged it out of the code library.  A quick bit of TSQL code to create a database role that SHOULD exist out of the box—one that can execute stored procedures.

/* Create a new role for executing stored

   procedures */

CREATE ROLE db_executor

 

/* Grant stored procedure execute rights

   to the role */

GRANT EXECUTE TO db_executor

 

/* Add a user to the db_executor role */

EXEC sp_addrolemember ‘db_executor’, ‘AccountName’

Quite easy and it makes it VERY easy to control EXECUTE permissions for your accounts.