Exception of type ‘Phx.FatalError’ was thrown

Recently i come access a build issue while in Debug mode

Severity Code Description Project File Line Suppression State
Error CA0001 CA0001 : Exception of type ‘Phx.FatalError’ was thrown. Active

That means “msdia140.dll” (or msdia100.dll/ msdia110.dll/ msdia120.dll/ msdia130.dll depends on your visual studio version) for your Visual studio is not registered in windows registry.

To register this dll in windows registory, please run following commands in command prompt based on your visual studio version.

Please note that you need to run command prompt in Administrator mode to run following commands

regsvr32 “location-of-dll–\msdia140.dll”

Visual Studio 2019 Enterprise

regsvr32 “%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\
Common7\Packages\Debugger\
msdia140.dll”

Visual Studio 2019 Professional

regsvr32 “%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Professional\Common7\Packages\
Debugger\msdia140.dll”

Visual Studio 2015

regsvr32 “%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\Common7\Packages\
Debugger\msdia140.dll”

Visual Studio 2013

regsvr32 “%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\Common7\Packages\
Debugger\msdia120.dll”

Visual Studio 2012

regsvr32 “%ProgramFiles(x86)%\Microsoft Visual Studio 11.0\Common7\Packages\
Debugger\msdia110.dll”

Visual Studio 2010

regsvr32 “%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\Common7\Packages\
Debugger\msdia100.dll”

About the author

Naveed Ul-Haq

I am a UK-based Technical Architect, Founder & Technology Evangelist. I'm Optimizely MVP & Optimizely SME on Content Cloud and Commerce Cloud. I love working on .NET-based CMS, eCommerce solutions, .NET Core, DevOps, and Cloud computing. I'm also a Certified Optimizely Content Cloud Developer, Certified Optimizely Commerce Cloud developer, Optimizely B2B Commerce developer and Microsoft Certified Professional in Azure application development. I spend my free time with my family and reading books. You can contact me at hello@naveedulhaq.com

View all posts

Leave a Reply

Your email address will not be published.