Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Extensibility / February 2005

Tip: Looking for answers? Try searching our database.

Problem with VS .net macros

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MadHungarian - 05 Feb 2005 00:01 GMT
For no good reason, macros do not work any more in VS.NET 2003. If I
record a temp macro and try to run it, or try to run a macro in the
samples - nothing happens. I put a break point in any macro at the top,
and the break point is never hit. I enabled all exceptions to break -
nothing.

This all started when i was adding a new macro to samples/VsEditor -
simple one to add a copyright header to a source file. At some point in
the editing process all macros stopped working.

I deinstalled VS.NET (2003) and reinstalled it - no effect, same
problem.

I Googled around and could not find anything.

Any thoughts or help would be appreciated.
"Ed Dore [MSFT]" - 15 Feb 2005 00:19 GMT
Hi Thomas,

I (well my customers anyway) have run into this behavior on more than a few
occasions. When macros silently fail to execute, odds are the MSCORLIB.TLB
has somehow been unregistered on your system. This can be caused by someone
inadvertently including/deplioying MSCORLIB.TLB with their addin or other
project, and then subsquently unregistering it during an uninstall.

Below is the preliminary copy of a knowledge base article I wrote that
addresses this topic. In addition to MSCORLIB.TLB not being registered, it
may also be improperly registered. In some cases, we've seen some beta
software mess up the registry keys mentioned in the article below.

Let me know if neither of these suggestions fixes the problem for you.

Thanks,
Ed Dore [MSFT]

This post is 'AS IS' with no warranties, and confers no rights.

PRB: Macros may fail to execute in Visual Studio .Net.

----------------------------------------------------------------------------
---
The information in this article applies to:

-    Microsoft Visual Studio .Net (2002), All Editions
-    Microsoft Visual Studio .Net (2003), All Editions

----------------------------------------------------------------------------
---

Symptoms
=======

When attempting to execute (CTRL+P) or debug a macro, the macro fails to
execute
with no errors or warnings generated.

Cause
=====

This problem is known to occur when the MSCORLIB.TLB type library has
either failed
to register during install, or when inadvertently unregistered by some
other
application.

Resolution
==========

To fix this problem, you can use the REGTLIB.EXE utility to reregister the
MSCORLIB.TLB, as follows:

  From the Start.Run dialog, enter the following text, and then click OK.
     “<path1>\regtlib.exe” “<path2>\mscorlib.tlb”

  Where <path1> is the full path to the regtlib.exe utility on your
computer, and
<path2>
  is the full path to the most recent version of mscorlib.tlb on your
computer.

For example:

  “C:\Windows\System32\UrtTemp\regtlib.exe”
“C:\Windows\Microsoft.Net\Framework\v1.1.4322\mscorlib.tlb”

More Information
================

Most systems include a copy of the REGTLIB.EXE utility, but you may have to
search
your hard drive to locate it. For example, on some systems you may find a
copy in
the C:\Windows, and on others, it may be located in
C:\Windows\System32\URTTemp. If
this file doesn’t exist on your system, you can download and extract it
from the
latest Visual Studio 98 Service Pack, at the following website:

  <http://msdn.microsoft.com/vstudio/sp/vs6sp3/default.asp>

Likewise, you may need to search your hard drive for the latest version of
mscorlib.tlb. This will typically be found under the
C:\Windows\Microsoft.Net\Framework directory.

The REGTLIB.EXE utility is used as follows:

  Regtlib [-q][-h] -o(odl file) | <typelib, olb, exe or dll filename(s)>

  Where:
     -q quiet mode (no messages)
     -o read an ODL file and use importlib() statements for typelibs to
register
     -h<path> Directory for help file of typelib
     -? Display usage help

Status
======

Microsoft has confirmed that this is a bug in the Microsoft Products that
are
listed at the beginning of this article.

<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
<>
*** Research Log *** Nov 16 2004  1:01PM     eddo

The following is what this article should read like: Note, we added a 2nd
step to
the resolution section, as we've seen instances where running regtlib.exe
doesn't
correct a bad path to mscorlib.tlb in the registry keys mentioned below.

<ARTICLE BEGINS>

SRX030917602452 : KB\829085 PRB: Visual Studio Macros fail to execute.

PRB: Macros may fail to execute in Visual Studio .Net.

-------------------------------------------------------------------
The information in this article applies to:

  - Microsoft Visual Studio .Net (2002), All Editions
  - Microsoft Visual Studio .Net (2003), All Editions
-------------------------------------------------------------------

Symptoms Section
================

When attempting to execute (CTRL+P) or debug a Visual Studio macro, the
macro fails
to execute with no errors or warnings.

Cause Section
=============

This problem is known to occur when the MSCORLIB.TLB type library has
either been
improperly registered during installation, or when inadvertently
unregistered by
some other application.

Resolution Section
==================

To fix this problem, use the REGTLIB.EXE utility to reregister the
MSCORLIB.TLB as
follows:

  From the Start.Run dialog, enter the following text, and then click OK.
  "<path1>\regtlib.exe" "<path2>\mscorlib.tlb"

  Where <path1> is the full path to the regtlib.exe utility on your
computer.
  Where <path2> is the full path to the most recent mscorlib.tlb on your
computer.

Note, on some systems, this file may not be present on the machine. You can
extract
a copy of REGTLIB.EXE from the OAINST.CAB file.

  For Visual Studio .Net 2002, the OAINST.CAB file is located in the IE60
  directory of the Windows Component Update CD.

  For Visual Studio .Net 2003, you will find a copy of OAINST.CAB in the
  IE60SP1 directory of the Prerequisites CD.

If macro execution continues to fail after reregistering the MSCORLIB.TLB
type
library, use the regedit utility to ensure that the following registry
key(s)
contains the full path to the corresponding mscrolib.tlb file.
 
 
HKEY_CLASSES_ROOT\TypeLib\{BED7F4EA-1A96-11D2-8F08-00A0C9A6186D\1.0\0\win32
  (set to valid full path for v1.0.3705\mscorlib.tlb)

 
HKEY_CLASSES_ROOT\TypeLib\{BED7F4EA-1A96-11D2-8F08-00A0C9A6186D\1.a\0\win32
  (set to valid full path for v1.1.4322\mscorlib.tlb)

<end of article>
MadHungarian - 23 Feb 2005 14:10 GMT
Hi all - I finally got it to work by uninstalling and re-installing the
.NET framework SDK version 1.1. Registing the .TLB file did not seem to
help/Registry entries did not help. Thanks for all the reponses.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.