XSD : error : The CodeDom provider type "Microsoft.VisualC.CppCodeProvider, CppCodeProvider could not be located.
Question
Friday, August 11, 2017 10:19 AM
I'm moving to a new development machine and after installing Visual Studio 2017 I've got the error
XSD : error : The CodeDom provider type "Microsoft.VisualC.CppCodeProvider, CppCodeProvider, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" could not be located.
When working with some XSD files.
I have exactly the same Visual Studio 2017 installation in both machines, but the new one is not able to "xseed" the files due that error.
The only difference in both machines is the old one had other older Visual Studio versions installed and now removed.
Any idea how to resolve this?
All replies (3)
Thursday, October 26, 2017 8:25 AM âś…Answered | 8 votes
There was seemingly a change in the Visual Studio installation. VS2015 installs the CppCodeProvider assembly in the GAC whereas VS2017 provides it only in the PublicAssemblies folder. Since xsd depends on the codeprovider assembly it fails to load since it is not located on the assembly search path. The easiest workaround I found is to use the gacutil to install the codeprovider dll in the GAC.
**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.4.1
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
c:\gacutil -i "%DevEnvDir%\PublicAssemblies\CppCodeProvider.dll"
Monday, August 14, 2017 1:45 AM
Hi RFOG,
thanks for posting here.
Could you please provide more information about your problem? When do you get this error?
This forum is about c++ code issues. If your case is more related to vs setup, I will help you move it to vs setup and installation forum for better support.
Your understanding and cooperation will be grateful.
Best Regards,
Sera Yu
MSDN Community Support<br/> Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact <a href="mailto:MSDNFSF@microsoft.com">MSDNFSF@microsoft.com</a>.
Friday, November 8, 2019 4:07 PM
This also fixed the issue for me in Visual Studio 2019 v 16.3.8