Monday, January 21, 2008

Microsoft's new agile pace is just killing me.  I'm glad that sp1 will be out some time in the foreseeable future but.  I don't want thing about upgrading to vs 10 in another 18 months. 

C# Debugging Improvements for VS 2008 SP1- Part 1

 

posted by Aaron Fischer on Monday, January 21, 2008 5:18:07 PM (Pacific Standard Time, UTC-08:00)   #    Comments [0]
 Monday, November 19, 2007

You might receive the "The debugger does not support debugging managed and native code at the same time on this platform." error message in Visual studio 2005/2008 if you have a 32bit native/mixed mode dll linked to your x64bit assembly.  If you change the project properties so that Platform target is x86 you should be able to debug both assemblies.

posted by Aaron Fischer on Monday, November 19, 2007 7:55:13 AM (Pacific Standard Time, UTC-08:00)   #    Comments [0]
 Monday, November 12, 2007

The Vc++ team blog announced the release of performance improvements for vc++ as a General Distribution Release.

posted by Aaron Fischer on Monday, November 12, 2007 2:23:27 PM (Pacific Standard Time, UTC-08:00)   #    Comments [0]
 Saturday, October 27, 2007

Brad Abrams is taking a poll, Allowing .NET EXEs to run off a network share.  There are a lot of useful solutions that are blocked by the current .NET policy.  I would like to see it go the way of the dodo.  It doesn't really offer protection since unmanaged code will execute from a network share.  Removing this default limitation would allow for true xcopy deployment.

Please vote early and often!

posted by Aaron Fischer on Saturday, October 27, 2007 11:43:28 AM (Pacific Standard Time, UTC-08:00)   #    Comments [0]
 Monday, October 22, 2007

If your running Visual studio 2005 under Terminal services or Remote desktop and you find the editor constantly refreshing ( repainting, flickering ) Disable font smoothing on your remote desk top connection.  If you have your heart set on using font smoothing try courier as your editors font.

posted by Aaron Fischer on Monday, October 22, 2007 2:34:35 PM (Pacific Standard Time, UTC-08:00)   #    Comments [0]
 Wednesday, October 10, 2007

Since I deal with a large VC++ of native-managed code I am glad to see Somasegar's list of VC++ performance enhancements in Visual studio 2008

· Editor responsiveness – Updating IntelliSense, displaying the QuickInfo tooltip and processing AutoComplete requests won’t degrade editor experience.

· Goto Definition improvements – Significant reduction in the time required to “Goto Definition”.  One customer reported that a 2 minute delay dropped to 10-20 seconds.

· Load solution performance – Load time of large Visual C++ solutions is much better.  Some customers are reporting speed ups of 25%-70%.

· File lookup in projects – Provides improvements to several scenarios such as adding files to projects, changing configurations, etc.

· Changing configuration options – Modifying options, such as adding an include directory or changing the active configuration, are much faster for large solutions.

· Reduced CPU consumption – We now process low-priority background items (such as IntelliSense population) using 20% less CPU time.

I have had to deal with slow IntelliSense and solution load times. All of these issues affect my daily use of VS.  Its great that the VC++ is finally able to address them.  Its even better to hear there will be a patch for VS 2005.

posted by Aaron Fischer on Wednesday, October 10, 2007 6:07:08 PM (Pacific Standard Time, UTC-08:00)   #    Comments [0]
 Wednesday, October 03, 2007

Scott Gu announced the releasing of .Net framework libraries (Microsoft Reference License).  This is good news its some thing that i miss very much when not working with the MFC libraries.  Truth be told you could already view and to some extent debug the .NET Framework with reflector but first class support in VS 2008 is defiantly great news.  Scott Hanselman appears to already have a Hansel Minutes relating to this announcement.

posted by Aaron Fischer on Wednesday, October 03, 2007 8:55:29 AM (Pacific Standard Time, UTC-08:00)   #    Comments [0]
 Monday, October 01, 2007

In July Microsoft released Security Bulletin MS07-040-Critical Vulnerabilities in .NET Framework Could Allow Remote Code Execution (931212) 

A Security Update for Microsoft.net Framework 2.0 (KB928365) was released for  windows server 2003

this updates System.web.dll

I have found this security update to crash IIS and any asp.net 2.0 web site/web service w3wp.exe to be restarted on every web request.

It looks like this is only a problem when this security patch is automatically installed via windows updates.  Once I uninstalled the security update the crashing issue went away.  When I manually reinstalled the security update and rebooted IIS and ASP.NET continued to function correctly with out error.

 

Also updated was,

 940521 (http://support.microsoft.com/kb/940521/) The behavior of UTF8Encoding, Unicode Encoding, and UTF32Encoding changes to comply to the Unicode 5.0 requirements for Unicode encodings after you install the security update for the .NET Framework 2.0 that is described in security bulletin MS07-040

this seems to affect how ASP.NET generates its web control names.

posted by Aaron Fischer on Monday, October 01, 2007 9:27:40 AM (Pacific Standard Time, UTC-08:00)   #    Comments [0]
 Thursday, September 06, 2007

Doug Stewart has posted an extensive list of CRL 2.0 bug (hot)fixes.  Its worth a look if your Dot Net 2.0 app is having issues.  Thanks for putting together such a comprehensive list Doug. 

I have seen this issue on a QA server The managed heap becomes corrupted when you run a program that is built by using the Microsoft .NET Framework 2.0 good to see its not my code and that there is a fix for it.

Some of the Hot fix support articles do leave a little something to be desired though I would like to see Microsoft spend the time to detail the cause for each issue so I can better evaluate my need for a given fix.

posted by Aaron Fischer on Thursday, September 06, 2007 6:27:40 AM (Pacific Standard Time, UTC-08:00)   #    Comments [0]
 Thursday, August 09, 2007

I am now running windows vista 64.  Which has been surprisingly simple how ever I have run into a few issues.  Windows Explorer went insane and ignored the open in same window setting (note open in new process option was set to false.) resulting in a new window pre directory.  I find life impossible in that situation.  After numerous attempts to correct this via registry edits, I failed.  Having given up I installed xpore2 as a replacement. ( great program I always wanted to filter my directory to only one file type) I now find after a reboot Windows Explorer works correctly and recycles the the window when displaying a new directory.

I have also found that you cannot just install sql management studio 64bit.  you need to run(as admin) dvd drive:\Tools\Setup\SqlRun_Tools.msi otherwise you go through all the motions but nothing gets installed.

posted by Aaron Fischer on Thursday, August 09, 2007 12:19:59 PM (Pacific Standard Time, UTC-08:00)   #    Comments [0]
 Thursday, August 02, 2007

Is it a Memory leak or a Resource leak.

It would seem that if you take a c++ managed extensions gc class containing a native pointer to dot net 2.0.  The classes finalization does not happen correctly.  Ie the destructor is no longer invoked.

further more if you migrate said c++ code to c++/cli then your destructor will not get called when the managed object is disposed of via garbage collection.  You will need to either explicitly call the destructor or add a finalize to your reference class.

 

Not the most obvious memory leak in the world to say the least.

posted by Aaron Fischer on Thursday, August 02, 2007 9:39:54 AM (Pacific Standard Time, UTC-08:00)   #    Comments [0]
 Saturday, July 28, 2007

Microsoft support has a Hotfix request Submission form now which promises;

To obtain this Hotfix, please submit your request via this form to Microsoft Online Customer Service and Support – you should expect to receive a download link via email from Microsoft within 8 business hours.

HotFix Request From

posted by Aaron Fischer on Saturday, July 28, 2007 8:33:04 AM (Pacific Standard Time, UTC-08:00)   #    Comments [0]
 Thursday, July 26, 2007

In your quest to down load all the visual studio 2008 goodness you may find this new ctp tool from Microsoft very useful

Microsoft Secure Content Downloader July 2007 Community Technology Preview

Overview

The Microsoft Secure Content Downloader (MSCD) is a peer-assisted download manager capable of securely downloading specific files. MSCD is intended for consumers who are downloading from a home PC, or business users whose computers are not behind a corporate firewall. If you use MSCD from behind a corporate firewall, you may be unable to download content, and may adversely affect other clients' ability to download content.
Main features of the MSCD are:

  • Secure content description
    • Each file available for download has a secure description, ensuring the content you download is exactly what the publisher published.
  • Scalable performance
    • MCSD is a peer-assisted technology. Each client downloads content by exchanging parts of the file they’re interested in with other clients, in addition to downloading parts from the server.
      • No matter how great the internet’s demand for the file, you will always be able to make progress downloading.
      • MSCD lets you download content more quickly than possible without peer assistance.


Some MSCD clients may be connected to each other via peer connections, forming a ‘cloud’ of clients. Pieces of the file you are downloading are sent through these peer connections between clients, as well as through connections with the file server. As a member of the cloud, your computer both serves as a client and server to other members of the cloud. Data destined for the cloud may be routed through your computer and sent to other cloud members. The other cloud members connected to you will be able to access only pieces of the file you are downloading via MSCD – they have no access to any other data on your computer.
You are only connected to other clients while you are downloading a file via MSCD. When the file has finished downloading – or when you pause or cancel the download, or exit the application – you disconnect from the cloud. Once you disconnect from the cloud, you will no longer have any connections to any other members in the cloud and no data will be routed through your computer.
This version of MSCD is a Community Technology Preview, and will only allow you to obtain current Visual Studio 2008 Beta 2. Since it is a Community Technology Preview, additional information related to MSCD’s performance and network transactions -- including your machine name and IP addresses -- may be logged to help evaluate and improve MSCD performance.

Just incase you have been under a rock here are the links to detailed information about today's release of Visual studio via Scott Gu and Somasegar respective blog posts.

posted by Aaron Fischer on Thursday, July 26, 2007 9:52:06 PM (Pacific Standard Time, UTC-08:00)   #    Comments [0]
 Wednesday, July 11, 2007

I have been having odd locking issues when using solutions that have  a c# project that is referenced by a c++/cli project.  This would happen in  VS 2003 and VS2005.  What could cause this horrid behavior?  Intellisense.  It has been locking the C#/VB output file while it updates.  Which means no building of the solution. 

While I am on Intellisense I have found many things in VC require it.  You need Intellisense to go to declarations and definitions, you even need it for the winforms designer to work.  Yet it is so utterly broken a large project will take any system to its knees with every press of the space bar.

posted by Aaron Fischer on Wednesday, July 11, 2007 10:07:04 AM (Pacific Standard Time, UTC-08:00)   #    Comments [0]
 Wednesday, June 27, 2007

 Found this in the new MSDN help.  Pretty nice feature this rebuild after an assembly change has driven us nuts for years. 

Managed Incremental Build Support
The compiler supports managed incremental builds

When you specify this option, the compiler will not recompile code when a referenced assembly changes. Instead it will perform an incremental build. Files are recompiled only if the changes affect the dependent code. For more information, see General Property Page (Project).

What's New in Visual C++ Codename "Orcas"

 

I have notice the online MSDN is much better now.  Slow but I do like the article version specific note along with links to newer and older versions.

image
posted by Aaron Fischer on Wednesday, June 27, 2007 2:22:39 PM (Pacific Standard Time, UTC-08:00)   #    Comments [0]
 Tuesday, June 19, 2007

Microsoft KB article 894435

posted by Aaron Fischer on Tuesday, June 19, 2007 9:00:06 AM (Pacific Standard Time, UTC-08:00)   #    Comments [0]
 Monday, June 18, 2007

Microsoft's SoftGrid Video

With Microsoft SoftGrid Application Virtualization, you can turn Windows applications into centrally managed, virtual services that are never installed, and can be instantly streamed to any desktop or laptop. In this one-hour video, learn how SoftGrid's virtualization technology can simplify desktop administration by automating processes for deploying, patching, updating, and terminating applications. It is now easier—and requires fewer IT resources—to address complex critical business projects such as OS and application migrations, security refreshes, and disaster recovery plans.

 

 

As an ISV I am trying to think how I could leverage this to ease my deployments.

posted by Aaron Fischer on Monday, June 18, 2007 2:09:50 PM (Pacific Standard Time, UTC-08:00)   #    Comments [0]
 Friday, June 15, 2007

Scott posted a nice article Tip/Trick: Creating Packaged ASP.NET Setup Programs with VS 2005  for deploying your Visual Studio 2005 project.  While Scott's article is focused on deploying to a customer I have found those scenarios to be beyond what VS offers and requires Install shield.  I do this this post is a handy trick for moving your project from dev to QA to staging maybe even production.

posted by Aaron Fischer on Friday, June 15, 2007 2:02:29 PM (Pacific Standard Time, UTC-08:00)   #    Comments [0]

If your moving MFC or C++ extensions to dot net 2.0 here are a few items you might find useful

posted by Aaron Fischer on Friday, June 15, 2007 1:50:33 PM (Pacific Standard Time, UTC-08:00)   #    Comments [0]
 Monday, June 11, 2007

Virtual Server 2005 R2 SP1 now available

details

download.

posted by Aaron Fischer on Monday, June 11, 2007 6:28:08 PM (Pacific Standard Time, UTC-08:00)   #    Comments [0]
 Thursday, June 07, 2007

There was a new drop of the AJAX Control Toolkit 10606 release.

for more details about what was included see Delay's notes.  If you would like pics with that visit Shawn's notes.  And just to play with the new coolness.

posted by Aaron Fischer on Wednesday, June 06, 2007 11:44:31 PM (Pacific Standard Time, UTC-08:00)   #    Comments [0]
 Tuesday, May 29, 2007

Erika wrote a couple posts worth a look regarding Data driven document generation.

Data-driven document generation with Word 2007 and the Office XML File Formats: Part 1

Data-driven document generation with Word 2007 and the Office XML File Formats: Part 2

Also If you wanted to take a Mail Merge word doc and port it over to XML

Migrating Mail Merge Fields to Content Controls ( I republished the code so that its legible)

 

Private Sub Document_Open()

    If (MsgBox("Convert Mail Merge fields to Content Controls?", vbYesNo, "Convert Mail Merge Fields") = vbYes) Then

        ConvertMailMergeFields

    End If

End Sub

'** Traverse Mail Merge fields collection and convert each mail merge field into a content control
'** while preserving its font style and format.
Private Sub ConvertMailMergeFields()

    Dim i As Integer, Count As Integer
    Dim currentFont As Font
    Dim mergeFieldname As String
    Dim field As MailMergeField

    For Each field In ActiveDocument.MailMerge.Fields

        '** Select Mail Merge field to process.
        field.Select
        Set currentFont = Selection.Font

        '** Set name for content control.
        mergeFieldname = GetMailMergeFieldName(field.Code)
        Debug.Print ("Processing [" & mergeFieldname & "]")

        '** Remove Mail Merge field and replace it with addition of new content control.
        Selection.Cut

        '** Add new content control.
        AddContentControl mergeFieldname, currentFont
        Count = Count + 1

    Next

    Debug.Print ("Number of Mail Merge Fields converted to Content Controls: " & Count)

End Sub

'** Add new content control.
Private Sub AddContentControl(ByVal mergeFieldname As String, ByVal currentFont As Font)

    Dim newControl As ContentControl
    Dim fontStyleName As String

    Set newControl = ActiveDocument.ContentControls.Add(wdContentControlText)

    '** The Title property only allows for 64 characters.
    '** If name is longer, we will put the rest in the Tag property.
    If (Len(mergeFieldname) < 64) Then

        newControl.Title = mergeFieldname
        newControl.Tag = "" 

    Else

        newControl.Title = Mid(mergeFieldname, 1, 64)
        newControl.Tag = Mid(mergeFieldname, 65, Len(mergeFieldname) - 64)

    End If

    newControl.SetPlaceholderText , , "Click to add."

    '** Set font for content control.
    fontStyleName = GetFontStyleName(currentFont)
    SetFontStyle newControl, fontStyleName, currentFont

    '** Allow carriage return.
    newControl.MultiLine = True

End Sub

'** Quick and dirty way to check to see if the given font style exist; if it does not, create it.
Private Sub SetFontStyle(ByRef newControl As ContentControl, ByVal fontStyleName As String, ByVal currentFont As Font)

    On Error GoTo Error_FontStyleDoesNotExist

    newControl.DefaultTextStyle = fontStyleName

    Exit Sub

Error_FontStyleDoesNotExist:

    AddNewFontStyle fontStyleName, currentFont
    newControl.DefaultTextStyle = fontStyleName

End Sub

Private Sub AddNewFontStyle(ByVal newFontStyleName As String, ByVal currentFont As Font)

    Dim fontStyle As Style

    Set fontStyle = ActiveDocument.Styles.Add(newFontStyleName)

    With currentFont

        fontStyle.Font.Name = .Name
        fontStyle.Font.Size = .Size
        fontStyle.Font.Bold = .Bold
        fontStyle.Font.Italic = .Italic

    End With

End Sub

Private Function GetFontStyleName(ByVal currentFont As Font) As String

    Dim fontStyleName As String

    With currentFont

        fontStyleName = .Name
        fontStyleName = fontStyleName & .Size
        fontStyleName = fontStyleName & .Bold
        fontStyleName = fontStyleName & .Italic

    End With

    '** Return result.
    GetFontStyleName = fontStyleName

End Function

Private Function GetMailMergeFieldName(ByVal fieldCode As String) As String

    Dim mergeFieldname As String: mergeFieldname = ""

    '** Name of Mail merge field: MERGEFIELD MailMergeFieldName \* MERGEFORMAT
    mergeFieldname = Replace(fieldCode, "MERGEFIELD", "")
    mergeFieldname = Replace(mergeFieldname, "\* MERGEFORMAT", "")
    mergeFieldname = Trim(mergeFieldname)

    '** Return result.
    GetMailMergeFieldName = mergeFieldname

End Function
posted by Aaron Fischer on Tuesday, May 29, 2007 7:36:12 AM (Pacific Standard Time, UTC-08:00)   #    Comments [0]
 Tuesday, May 22, 2007

I found an interesting load generation tool on IIS.net defiantly worth a look

Features

  • HTTP 1.0 and HTTP 1.1 capable
  • Supports IPv6
  • Multithreaded Support
  • Supports generating stress from multiple machines
  • Extensible through C plug-in DLLs
  • Supports Performance Counter integration
  • Measures throughput and response time
  • Supports SSL requests
  • NTLM Authentication request support
  • Easily supports testing thousand of concurrent users

Benefits

  • Very light weight (low hardware requirements)
  • Extensible to handle any aspect of the HTTP request or response
  • Allows remote collection of perfmon data and registry

Down Load

posted by Aaron Fischer on Tuesday, May 22, 2007 8:37:33 AM (Pacific Standard Time, UTC-08:00)   #    Comments [0]
 Sunday, May 20, 2007
posted by Aaron Fischer on Sunday, May 20, 2007 7:44:55 PM (Pacific Standard Time, UTC-08:00)   #    Comments [0]

This is how Microsoft packages a product.

Now see how Microsoft names their products.


Video: Windows Server 2008
posted by Aaron Fischer on Sunday, May 20, 2007 10:09:16 AM (Pacific Standard Time, UTC-08:00)   #    Comments [0]
 Friday, May 18, 2007

start by having a solution with two projects.

In the solution exploder window right click the solution and choose add New or existing item.

 

For this how two we will add a new c# class

click add.  Visual studio will create a new suborder under the solution called "Solution Items" Class1.cs will be in this folder.

now select one of your projects and right click select add existing item.  Navigate to your solutions directory and select Class1.cs

click the drop down arrow next to the add button

select add as link

You will now have a shared link to a common solution file/class

repeat for each project you wish to add this file/class to.

posted by Aaron Fischer on Friday, May 18, 2007 12:41:40 PM (Pacific Standard Time, UTC-08:00)   #    Comments [0]
 Thursday, May 17, 2007

Some times I am pretty sure the Dev's at Microsoft are smoking something.  I would like to know what, and if they would share.

I have had a little trouble with the last IE update Internet Explorer and the Update of Doom (This Old Code ).  and IE 7 DOA after May 5th Cumulative Security update ( This Old Code ). 

You install the May 2007 Cumulative Security Update for Internet Explorer (MS07-027), and then you try to open Windows Internet Explorer 7. After you do this, the File Download – Security Warning dialog box may open, and you may receive the following message:

Do you want to save this file?
The File Download – Security Warning dialog box also refers to the "navcancl" file name. After you close this dialog box, you cannot start Internet Explorer 7.

Finally Microsoft has released a Knowledge base article to dell with this issue Microsoft Knowledge Base article 937409 ( thanks to the IEBlog Follow Up to Internet Explorer May 2007 Security Update)

Method 2: Grant permissions to the "Temporary Internet Files" folder

To complete Method 2 on a Windows XP-based computer or on a Windows Server 2003-based computer, follow these steps:

1.
Click Start, click Run, type inetcpl.cpl, and then click OK.

2.
On the General tab, click Settings in the Browsing History area.

3.
Click View Files.

4.
In Windows Explorer, move to the folder that contains the "Temporary Internet Files" folder.

5.
In the right-pane, right-click an empty area, and then click Properties.

6.
On the Security tab, click the name of the affected user in the Group or user names box. If the name of the affected user is not listed, follow these steps:

a.
Click Add.

b.
In the Enter the object names to select box, type the name of the affected user, and then click OK.

c.
In the Group or user names box, click the name of the affected user.

7.
In the Permissions for User_Name box, click to select the Full Control Allow check box.

8.
Click Apply, and then click OK.

9.
Close Windows Explorer.

10.
Click OK two times.

11.
Start Internet Explorer 7.

Funny thing about the Knowledge base article, its wrong the Temporary Internet Files folder is a system folder us low admin's can't reset permissions on the folder.  You can how ever move the folder which will allow ie to correctly run once with one tab ( oddly enough, not very useful).  My temporary solution rather then uninstalling the update yet again was to completely disable phishing( thankfully this feature is not of much use.).

How to disable Phishing Filter ( in Windows XP)
  1. start, run type inetcpl.cpl
  2. Click the Advanced tab.
  3. Scroll to the bottom of the screen up about six items is "Phishing Filter"
  4. Select "Disable Phishing Filter" ( turning it off will not work it must be disabled )
  5. Click the ok button
  6. now start up ie and browse the Internet, just don't click any links from email ;)
posted by Aaron Fischer on Thursday, May 17, 2007 8:56:44 AM (Pacific Standard Time, UTC-08:00)   #    Comments [0]
 Wednesday, May 16, 2007

Here are a couple interactive command reference guides to help you find your way around Word and Excel.  These guides allow you to see were the 2003 UI has moved to in 2007.  Nice find by Alfred Thompson

posted by Aaron Fischer on Wednesday, May 16, 2007 6:15:27 AM (Pacific Standard Time, UTC-08:00)   #    Comments [0]
 Monday, May 14, 2007