Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
VGSources
Blog

sg.dll Missing: Verify Visio or Esri Before You Repair Windows

Length11 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

sg.dll is usually the Microsoft Visio Shape Gallery library, but sg.dll is not a unique filename. Esri ArcSDE and ArcGIS products also use an unrelated sg.dll, so identify the owning application before replacing anything.

The safest fix is to repair or reinstall the program that installed the file. Do not download a replacement DLL into System32, SysWOW64, or an application folder without verifying its publisher, architecture, and exact installation path.

As an Amazon Associate I earn from qualifying purchases.

First identify which sg.dll you have

Before running repair commands, record the complete error and determine which executable displays it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Common examples include:

  • “The program can’t start because sg.dll is missing from your computer.”
  • “The code execution cannot proceed because sg.dll was not found.”
  • “Error loading sg.dll.”
  • “sg.dll is either not designed to run on Windows or it contains an error.”
  • “Failed to load sg.dll.”
  • A message that names a full path ending in sg.dll.

The wording varies by Windows version and by the application loader. “The specified module could not be found” can also mean that sg.dll exists but one of its dependencies is missing.

#1 Best Overall
Microsoft Visio 2019 Standard for Windows 10 - Box Pack - 1 PC - Medialess
  • Create professional diagrams easily with ready-made templates and shapes
  • Get started quickly with a familiar office-like experience
  • Use your finger or pen to draw and make notes more naturally on touch-enabled devices
  • Create database visualizations using the built-in database model diagrams

Check the failing executable

Look at the title bar, error dialog, shortcut, or application name. The likely owner is Microsoft Visio if the error names:

  • Visio
  • visio.exe
  • An Office installation directory
  • A Visio template, shape, or gallery feature

The likely owner is Esri if it names:

  • ArcGIS
  • ArcSDE
  • An ArcGIS or SDE installation directory
  • Another GIS application that uses Esri components

Do not assume that every sg.dll belongs to Visio.

Check the actual file path

If the file exists, right-click it and select Properties. The General tab shows its location. The Details tab may show a description such as Visio Shape Gallery. Open Digital Signatures if that tab is available and inspect the signer.

A Microsoft Visio copy should identify Microsoft Corporation. An Esri copy should identify the relevant Esri product or installation. A file in C:WindowsSystem32 is not automatically a Windows system file. It could be an old third-party copy or an incorrectly deployed Esri library.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Also check whether more than one copy exists. Multiple Office generations, GIS installations, or old application directories can cause Windows to load the wrong library.

Check the application architecture

A 64-bit version of Windows can run 32-bit applications. The important match is:

  • 32-bit application with its compatible 32-bit DLL
  • 64-bit application with its compatible 64-bit DLL

The operating system being 64-bit does not mean every application or DLL must be 64-bit. A “bad image” or “not designed to run on Windows” message can indicate a mismatched or damaged file.

1. Repair Visio or Office

Time needed: About 10 to 30 minutes, plus the time required to restart the application.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If the failing program is Visio, this is the best first fix. sg.dll is an application file, not normally a protected Windows component, so repairing Visio is more appropriate than starting with SFC.

  1. Close Visio and every other Office application.
  2. Open Settings.
  3. Select Apps.
  4. Select Installed apps.
  5. Find Microsoft 365, Microsoft Office, or Visio.
  6. Select the three-dot menu next to the entry.
  7. Choose Modify.
  8. Select Quick Repair.
  9. Select Repair and allow the process to finish.
  10. Restart Windows.
  11. Open Visio and repeat the action that produced the error.

Quick Repair checks and replaces common damaged program components. If Visio starts normally and the affected feature works, the repair succeeded.

Rank #2
Microsoft Office Home 2024 | Classic Office Apps: Word, Excel, PowerPoint | One-Time Purchase for a single Windows laptop or Mac | Instant Download
  • Classic Office Apps | Includes classic desktop versions of Word, Excel, PowerPoint, and OneNote for creating documents, spreadsheets, and presentations with ease.
  • Install on a Single Device | Install classic desktop Office Apps for use on a single Windows laptop, Windows desktop, MacBook, or iMac.
  • Ideal for One Person | With a one-time purchase of Microsoft Office 2024, you can create, organize, and get things done.
  • Consider Upgrading to Microsoft 365 | Get premium benefits with a Microsoft 365 subscription, including ongoing updates, advanced security, and access to premium versions of Word, Excel, PowerPoint, Outlook, and more, plus 1TB cloud storage per person and multi-device support for Windows, Mac, iPhone, iPad, and Android.

Run Online Repair if Quick Repair fails

Online Repair is more complete and can replace damaged Office program files.

  1. Close all Office applications.
  2. Return to Settings → Apps → Installed apps.
  3. Open the three-dot menu for Microsoft 365, Office, or Visio.
  4. Select Modify.
  5. Choose Online Repair.
  6. Select Repair.
  7. Follow the prompts until the repair completes.
  8. Restart Windows.
  9. Test Visio again.

Online Repair may take longer and may require an internet connection. It is preferable to copying an isolated sg.dll, because it restores the files as a matched Visio installation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If the error began after an Office update, failed update, rollback, or removal of another Office version, Online Repair is especially appropriate. Different Visio releases contain different builds of Sg.dll; replacing only that file can leave the surrounding Office files mismatched.

2. Reinstall Visio from Microsoft

Time needed: About 20 to 60 minutes, depending on the installer and connection.

Use this step if both repair modes fail, Visio was partially removed, or the file disappeared after disk cleanup or manual deletion.

  1. Sign in to Microsoft 365 using the account associated with the Visio license.
  2. Open the account’s application installation area.
  3. Select Install apps.
  4. Select Visio if it is listed.
  5. Download and run the official installer.
  6. Restart Windows after installation.
  7. Launch Visio and test the failing document or feature.

Use the official Microsoft installer for the same edition and licensing arrangement. Visio for the web does not install desktop DLLs, so using the web version will not restore a desktop sg.dll.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If Visio is not listed, verify that you signed in with the account that owns the license. For volume-licensed or organization-managed installations, contact the administrator who manages Office deployment rather than combining files from another computer.

Check for mixed 32-bit and 64-bit Office installations

Mixed Office installations can leave an application looking in the wrong location or loading incompatible components.

Check whether the organization uses:

  • A 32-bit or 64-bit Visio installation
  • Microsoft 365 Click-to-Run
  • An older MSI-based Office installation
  • More than one Office generation

Microsoft normally installs 64-bit Office unless an existing 32-bit Office product or standalone application requires the 32-bit architecture. Switching architecture generally requires removing the existing Office installation first.

Rank #3
Office Suite 2026 Special Edition for Windows 11-10-8-7-Vista-XP | PC Software and 1.000 New Fonts | Alternative to Microsoft Office | Compatible with Word, Excel and PowerPoint
  • THE ALTERNATIVE: The Office Suite Package is the perfect alternative to MS Office. It offers you word processing as well as spreadsheet analysis and the creation of presentations.
  • LOTS OF EXTRAS:✓ 1,000 different fonts available to individually style your text documents and ✓ 20,000 clipart images
  • EASY TO USE: The highly user-friendly interface will guarantee that you get off to a great start | Simply insert the included CD into your CD/DVD drive and install the Office program.
  • ONE PROGRAM FOR EVERYTHING: Office Suite is the perfect computer accessory, offering a wide range of uses for university, work and school. ✓ Drawing program ✓ Database ✓ Formula editor ✓ Spreadsheet analysis ✓ Presentations
  • FULL COMPATIBILITY: ✓ Compatible with Microsoft Office Word, Excel and PowerPoint ✓ Suitable for Windows 11, 10, 8, 7, Vista and XP (32 and 64-bit versions) ✓ Fast and easy installation ✓ Easy to navigate

Do not solve an architecture problem by copying a DLL from another PC. The copied file may have the wrong build, language resources, dependencies, or bitness.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

3. Check Windows Security quarantine

Time needed: About 5 to 15 minutes.

If sg.dll disappeared immediately after an antivirus scan, check whether Microsoft Defender quarantined it.

  1. Open Windows Security from the Start menu.
  2. Select Virus & threat protection.
  3. Select Protection history.
  4. Inspect detections around the time Visio stopped working.
  5. Expand any detection that names sg.dll.
  6. Check the original path and detection details.

Do not restore the file merely because its name matches the error. First verify that:

  • The original path belongs to Visio.
  • The publisher and digital signature identify Microsoft Corporation.
  • The detection is a false positive.
  • The file was not in an unexpected temporary or system directory.

Reinstalling or repairing Visio from Microsoft is safer than restoring an unverified file. If you restore a file that is genuinely malicious, you can reintroduce the security problem. If Defender repeatedly removes a legitimate Visio file, let your organization’s security administrator review the detection and the file signature.

4. Repair the Esri installation instead

Time needed: About 15 to 60 minutes.

Use this branch when the failing program is ArcGIS, ArcSDE, AutoCAD Map 3D, or another GIS application, or when the file is located under an ArcGIS or SDE directory.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Esri’s sg.dll is a separate Shape Geometry library. It is not interchangeable with Microsoft Visio’s Shape Gallery library.

  1. Close the GIS application and related services.
  2. Confirm the file path and publisher in Properties.
  3. Open Settings → Apps → Installed apps.
  4. Locate the relevant ArcGIS, ArcSDE, or GIS product.
  5. Select its three-dot menu.
  6. Choose Modify, Repair, or the product’s maintenance option if available.
  7. If repair is unavailable, use the matching official installer supplied by your organization or software administrator.
  8. Restart Windows.
  9. Test the GIS application.

An unexpected sg.dll in System32 or another shared directory can cause conflicts with the version expected by Esri software. Do not replace an Esri file with the Microsoft Visio file, and do not replace a Visio file with an Esri file.

If the GIS application still fails, record the full path, the application executable, the file version, and the publisher. The problem may be an older shared library, a missing dependency, or a product-specific compatibility issue.

5. Use DISM and SFC for broader Windows corruption

Time needed: About 15 to 45 minutes.

SFC is not the primary repair tool for Visio’s sg.dll, because Visio files are not ordinarily protected Windows system files. Use Windows repair commands when several unrelated applications fail, Windows Update is damaged, or the message suggests broader system corruption.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Microsoft 365 Personal | 12-Month Subscription | 1 Person | Premium Office Apps: Word, Excel, PowerPoint and more | 1TB Cloud Storage | Windows Laptop or MacBook Instant Download | Activation Required
  • Designed for Your Windows and Apple Devices | Install premium Office apps on your Windows laptop, desktop, MacBook or iMac. Works seamlessly across your devices for home, school, or personal productivity.
  • Includes Word, Excel, PowerPoint & Outlook | Get premium versions of the essential Office apps that help you work, study, create, and stay organized.
  • 1 TB Secure Cloud Storage | Store and access your documents, photos, and files from your Windows, Mac or mobile devices.
  • Premium Tools Across Your Devices | Your subscription lets you work across all of your Windows, Mac, iPhone, iPad, and Android devices with apps that sync instantly through the cloud.
  • Easy Digital Download with Microsoft Account | Product delivered electronically for quick setup. Sign in with your Microsoft account, redeem your code, and download your apps instantly to your Windows, Mac, iPhone, iPad, and Android devices.

Microsoft recommends running DISM before SFC.

  1. Open the Start menu.
  2. Type Command Prompt.
  3. Right-click Command Prompt.
  4. Select Run as administrator.
  5. At the prompt, run:
DISM.exe /Online /Cleanup-image /Restorehealth
  1. Wait for DISM to complete.
  2. Then run:
sfc /scannow
  1. Wait until verification reaches 100 percent.
  2. Restart Windows.
  3. Test Visio or the affected application again.

Do not close the window while either command is working. If SFC reports that it repaired files, restart and test again. If it reports that it could not repair some files, repeat the application repair steps and investigate Windows corruption separately.

Repeatedly running SFC or DISM without knowing what changed can make troubleshooting harder. Outbyte PC Repair can scan for the specific problems behind manual repair work; its free scan shows what it finds, while repair features are completed by the full version. It is optional, and repairing or reinstalling Visio remains the definitive fix when Visio owns sg.dll.

6. Check storage and recent system changes

Time needed: About 10 to 30 minutes for initial checks.

If corruption returns after repair, look for a broader cause:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • A system crash occurred before the error appeared.
  • Other files are becoming unreadable.
  • Windows Update repeatedly fails.
  • The disk is nearly full.
  • Files disappear after cleanup software runs.
  • The computer has storage warnings.

Install pending Windows updates, restart the computer, and review whether other applications are affected. If corruption repeatedly returns, investigate storage health through your organization’s normal hardware diagnostics or support process.

System Restore is a fallback only when the problem clearly started after a recent system change and a suitable restore point exists. It is not a replacement for repairing Visio or the GIS product that installed the file.

7. Update or reinstall drivers only when evidence points there

Time needed: About 10 to 30 minutes.

A display, storage, or other driver is not the normal owner of sg.dll. Do not install drivers simply because a DLL error appeared. Consider driver work only if Device Manager reports a problem, the error began after a driver change, or several applications fail alongside graphics or storage symptoms.

To check Device Manager:

  1. Right-click the Start button.
  2. Select Device Manager.
  3. Expand categories related to the reported hardware.
  4. Look for a yellow warning icon.
  5. Right-click the affected device.
  6. Select Properties.
  7. Review the General and Driver tabs.
  8. Use Update driver only with a driver supplied through Windows Update, your hardware manufacturer, or your organization.
  9. Restart Windows and test the application.

If the problem began immediately after a driver update, Properties → Driver → Roll Back Driver may be appropriate when the button is available. Do not remove a working driver as a general DLL repair step.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Manually hunting driver versions across many devices is repetitive and can make it unclear what changed. Outbyte Driver Updater can scan for outdated drivers; its free scan identifies issues, while driver installation is completed by the full version. It is optional, and it will not replace the need to repair Visio or Esri when that application owns sg.dll.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Do not use regsvr32 as a general fix

Do not run this command just because the filename ends in .dll:

regsvr32 sg.dll

regsvr32 is intended for DLLs that provide registration entry points such as DllRegisterServer. It does not restore a missing file, repair Office, repair Esri, or fix an arbitrary application dependency. Microsoft does not identify Visio’s sg.dll as a self-registering COM component.

If the file is missing, restore the owning application through repair or its official installer. If the file exists but cannot load, investigate the path, publisher, architecture, dependencies, and surrounding application installation instead.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why random DLL downloads are unsafe

Avoid DLL archive sites, files copied from another computer, and replacements posted in forums. An isolated replacement can contain:

  • Malware or tampered code
  • The wrong Visio or Esri build
  • The wrong 32-bit or 64-bit architecture
  • Missing language resources
  • Dependencies that do not match the installed application
  • A version that conflicts with nearby Office or GIS files

It may also hide the real cause, such as an incomplete update, antivirus quarantine, disk corruption, or a missing dependency. The safe sources are Microsoft’s Office or Visio repair and installation process for Visio, and the matching managed installer for the Esri product when Esri owns the file.

Common causes and the correct response

Likely cause What points to it Correct response
Damaged Visio installation The error names Visio or an Office directory Run Quick Repair, then Online Repair
Failed update or rollback The problem began after an Office change Run Online Repair and install available Office updates
Antivirus quarantine Protection History names the file Verify the path and publisher, then prefer official repair
Wrong architecture “Bad image” or “not designed to run” appears Match the application and DLL architecture
Esri library collision The path belongs to ArcGIS or SDE Repair the Esri product and remove conflicting deployment through supported procedures
Windows corruption Several unrelated applications fail Run DISM, then SFC
Missing dependency sg.dll exists but the loader says a module is missing Repair the owning application and collect dependency details

If the error remains after repair

Collect this information before escalating:

  1. The complete error text.
  2. The executable that displays it.
  3. The full path where Windows found or expected sg.dll.
  4. The file’s description, version, and publisher.
  5. The result of the digital-signature check.
  6. Whether the application is 32-bit or 64-bit.
  7. Whether the problem followed an update, rollback, uninstall, crash, cleanup, or security scan.
  8. Any related entry in Event Viewer → Windows Logs → Application.
  9. Whether other Office, GIS, or unrelated applications fail.

At that point, the remaining cause may be a third-party add-in, damaged user profile, missing dependency, mixed Office installation, Esri conflict, or storage problem rather than sg.dll itself.

FAQ

Is sg.dll a Windows system file?

Usually not. The best-known Microsoft version belongs to Visio and is described as Visio Shape Gallery. An sg.dll under System32 is not proof that Windows owns it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Can I copy sg.dll into System32 or SysWOW64?

No. The correct directory is determined by the application that installed the file. Copying it into a Windows directory can create conflicts and does not repair the owning application.

Is sg.dll always a Visio file?

No. Esri ArcSDE and ArcGIS products use an unrelated sg.dll. Verify the path, executable, publisher, and digital signature first.

Should I install Visual C++, DirectX, or .NET?

Not automatically. Nothing about the filename alone proves that sg.dll belongs to one of those runtime packages. Repair the application that reports the error before installing unrelated runtimes.

Will SFC fix a missing Visio sg.dll?

Usually not. SFC repairs protected Windows system files. Use Visio or Office repair first, and use DISM followed by SFC when there are broader signs of Windows corruption.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Does Visio for the web install sg.dll?

No. Visio for the web does not install the desktop application’s DLLs. A desktop sg.dll error requires checking the installed desktop Visio or another application.

What is the safest first step?

Identify the failing executable and file path. If both point to Visio, run Quick Repair, then Online Repair. If they point to ArcGIS or ArcSDE, repair that product instead.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.