Recommended Free Tools
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.
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
- 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.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →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.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →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.
- Close Visio and every other Office application.
- Open Settings.
- Select Apps.
- Select Installed apps.
- Find Microsoft 365, Microsoft Office, or Visio.
- Select the three-dot menu next to the entry.
- Choose Modify.
- Select Quick Repair.
- Select Repair and allow the process to finish.
- Restart Windows.
- 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
- 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.
- Close all Office applications.
- Return to Settings → Apps → Installed apps.
- Open the three-dot menu for Microsoft 365, Office, or Visio.
- Select Modify.
- Choose Online Repair.
- Select Repair.
- Follow the prompts until the repair completes.
- Restart Windows.
- 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.
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.
- Sign in to Microsoft 365 using the account associated with the Visio license.
- Open the account’s application installation area.
- Select Install apps.
- Select Visio if it is listed.
- Download and run the official installer.
- Restart Windows after installation.
- 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.
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
- 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.
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.
- Open Windows Security from the Start menu.
- Select Virus & threat protection.
- Select Protection history.
- Inspect detections around the time Visio stopped working.
- Expand any detection that names
sg.dll. - 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.
Esri’s sg.dll is a separate Shape Geometry library. It is not interchangeable with Microsoft Visio’s Shape Gallery library.
- Close the GIS application and related services.
- Confirm the file path and publisher in Properties.
- Open Settings → Apps → Installed apps.
- Locate the relevant ArcGIS, ArcSDE, or GIS product.
- Select its three-dot menu.
- Choose Modify, Repair, or the product’s maintenance option if available.
- If repair is unavailable, use the matching official installer supplied by your organization or software administrator.
- Restart Windows.
- 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.
Rank #4
- 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.
- Open the Start menu.
- Type Command Prompt.
- Right-click Command Prompt.
- Select Run as administrator.
- At the prompt, run:
DISM.exe /Online /Cleanup-image /Restorehealth
- Wait for DISM to complete.
- Then run:
sfc /scannow
- Wait until verification reaches 100 percent.
- Restart Windows.
- 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:
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11- 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:
- Right-click the Start button.
- Select Device Manager.
- Expand categories related to the reported hardware.
- Look for a yellow warning icon.
- Right-click the affected device.
- Select Properties.
- Review the General and Driver tabs.
- Use Update driver only with a driver supplied through Windows Update, your hardware manufacturer, or your organization.
- 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.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsManually 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.
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.
Best Value
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.
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:
- The complete error text.
- The executable that displays it.
- The full path where Windows found or expected
sg.dll. - The file’s description, version, and publisher.
- The result of the digital-signature check.
- Whether the application is 32-bit or 64-bit.
- Whether the problem followed an update, rollback, uninstall, crash, cleanup, or security scan.
- Any related entry in Event Viewer → Windows Logs → Application.
- 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.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsCan 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.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →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.
Quick Recap
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.




