jump to navigation

Installing .NET 3.5 SP1 on Windows Web Server 2008 R2 August 28, 2010

Posted by kevinbe71 in .NET, ASP.NET, Development, Web Development, Windows Development.
add a comment

One would expect this to be as easy as downloading the .NET 3.5 framework installer and running it.  Nope!

—————————
Microsoft .NET Framework 3.5 SP1 Setup
—————————
You must use the Role Management Tool to install or configure Microsoft .NET Framework 3.5 SP1.
—————————

The solution is to run this at the powershell command-prompt:

call powershell.exe -noexit -ImportSystemModules
  Add-WindowsFeature net-framework

(all on one line)

This generates some warnings that can be ignored (I think!) and will install .NET 3.5.

On other editions of Windows Server 2008 R2 it may be  possible to do this by enabling a feature but this doesn’t appear to be available in this edition.

NLog and Windows Event Log Bug? November 6, 2009

Posted by kevinbe71 in .NET, Development, Windows Development.
add a comment

I’ve been experimenting with a logging library for .NET called NLog.  My past experience has been with Log4Net but I’ve not been all that happy with Log4Net so I was looking for a better alternative.  NLog seems to be that alternative… but I ran into one glitch when I switched from file and console logging to Windows event logging.  I just wasn’t getting anything logged.  The first problem was that I didn’t have an event log source defined, so I used WiX to create an event source (pretty easy to do since I’ve already used WiX for this purpose in the past).  After that I was a bit puzzled- it still wasn’t working and the nlog internal logs weren’t showing anything either.

It was time to dig into the source code… and what I found out seems to be a bug in NLog.  I had a target configured this way:

<target
  name="eventlog"
  xsi:type="EventLog"
  layout="${longdate}|${level}|${message}"
  log="Application"
  source="My Source" />

I didn’t have machineName defined.  After all, the documentation stated that machineName defaults to the local machine anyway, so why set it to anything?  Well… because if you don’t then a boolean member var called _operational stays “false” and it needs to be set to “true” for the event log entry to get written!  So, the workaround for this is actually pretty easy:

<target
  name="eventlog"
  xsi:type="EventLog"
  layout="${longdate}|${level}|${message}"
  log="Application"
  source="My Source"
  machineName="." />

Anyway, I thought someone else may find this useful if they’re also an NLog newbie…

Uninstalling VS 2008 Beta “Microsoft Windows Vista Client Headers and Libraries (6001.16533.121)” January 4, 2009

Posted by kevinbe71 in Development, Windows Development.
add a comment

I recently upgraded one of my old desktop systems that had a VS 2008 Beta installed on it.  When attempting to install the gold version of VS 2008 it complained about the pre-release “Microsoft Windows Vista Client Headers and Libraries” still being present on the system.  This made some sense because the VS 2008 Beta uninstall had failed to uninstall some libraries.  I followed the work around documented on this page:

http://blogs.msdn.com/varungupta/archive/2007/11/27/i-uninstalled-visual-studio-2008-beta2-but-still-cannot-install-vs-2008-final-release.aspx

However, this process complained about a dependency on “vstscore_vs”.  The only page that had information on this was a Japanese page:

http://www.niuc.net/post/82/

(well, it looks like Japanese to me… I’m not really sure, but whatever it is I can’t read it!)

That same page mentioned “procore_vs” that is mentioned in the earlier article.  So, I put 2 and 2 together and figured that it was safe to use the “procore_vs” workaround for the “vstscore_vs” message.  It worked!

So, if you’re seeing a message about “vstscore_vs” then use the following step to remove the dependency:

Delete the following Registry key and try uninstall again.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\ProductReference\ReferencedProducts7D7D27646D242F5BC900906C330746E

The following warning note on the original page had made me nervous, but with the Japanese page showing this same step and mentioning both vstscore_vs and procore_vs I figured that it wasn’t that bad…

Note: This workaround is for a specific case and don’t delete registry key in any other case.”

However… the usual disclaimer should be included: use at your own risk!  Also, could someone who understands Japanese perhaps confirm my hunches?

Follow

Get every new post delivered to your Inbox.