-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error "Class not registered" when building inject_debug_resources.vcxproj #7979
Comments
It looks like the following "Important" instruction is responsible for this error:
However actually performing this step successfully is problematic. |
In order for that command to be successful it must be run in a 32-bit command window and not the default 64-bit command window. Use the following to start a 32-bit command window:
|
Ping. Hit this issue again |
I have same issue, @briansull thank you for workaround. |
Hit the issue today. |
I hit this issue as well. Work around fixed the issue thank you @briansull |
I performed a search in registry of mentioned CLSID {3BFCEA48-620F-4B6B-81F7-B9AF75454C7D} and changed all paths for it on C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\msdia120.dll. Before that this CLSID pointed to dll by inexistent path (maybe it was accidentally deleted). After editing registry the error disappeared. |
ping! ** Note: if you receive the following error, you have failed to register the class noted above:
** |
Note that the root cause for this is that there is a tool called DacTableGen in the microsoft.dotnet.buildtools.coreclr package which uses a COM object to open symbols, and is using an old version of this library (msdia120.dll). This was current in VS2015 but VS2017 has moved on to msdia140.dll (which has a different COM GUID. The fundamental problem is that DacTableGen should bundle and install anything that it uses, but instead is 'piggybacking' on the fact that VS installs this COM object. That was true for VS2015 but not for VS2017. It turns out that VS2017 DOES have this msdia120, however it does not register it. Thus you can work around it by using the instructions
from an administrative prompt. However the real fix is to update microsoft.dotnet.buildtools.coreclr so that
We have located the source code for this in the ProjectK branch in VSTS. (source for DacTableGen in src\NDP\clr\src\ToolBox\SOS\DacTableGen and nuget specifications in src\NDP\FxCore\src\Packages\Microsoft.DotNet.BuildTools.CoreCLR). However this branch is now old enough that it will take some time to get the build building again so we can rebuild the package. In the mean time I will be putting a check in the build.cmd file so that it gives this work-around (which only has to be done once per machine) until such time as we fix the package. See dotnet/coreclr#14948 for the change to build.cmd to make the work-around obvious. |
If you ONLY install VS2017 (now the common scneario) and build coreclr, it will fail with COM with a Class_Not_Registered error This is because a build-tools package is depending on an old COM object that has gone way in VS2017. While we sort getting a proper fix, this makes the work-around (which is registering the DLL by hand) discoverable. See https://github.com/dotnet/coreclr/issues/11305 for details.
* Fix build break when VS2015 is not installed. If you ONLY install VS2017 (now the common scneario) and build coreclr, it will fail with COM with a Class_Not_Registered error This is because a build-tools package is depending on an old COM object that has gone way in VS2017. While we sort getting a proper fix, this makes the work-around (which is registering the DLL by hand) discoverable. See https://github.com/dotnet/coreclr/issues/11305 for details. * typo
There was a issue (see https://github.com/dotnet/coreclr/issues/11305) where a tool used in the CoreCLR build called DacTableGen requires a old version of the msdia120.dll. The symptom is that this tool would fail with a class not registered errror. This tool comes from a very old nuget package microsoft.dotnet.buildtools.coreclr, which we no longer can build easly. Our guidance now is to move tools that are only used in one repository (like this one) out of nuget packages and simply build them as part of the build. This change makes a step in that direction. The DacTableGen code actually was already in the CoreCLR repo, so this change 1. Fixes the source of DacTableGen so that tool no longer needs a com object to be registered (but it DOES need msdia140.dll to be on the path. This is true for VS2017. 2. Turns on the build of DacTableGen 3. Change the build use the built DacTableGen (unless running on VS2017, in that case we use the the version in the tool package. 4.) Remove the hack that warns people to register msdia120 (since you don't need to anymore) There is also an unrelated addition to the docs. This change should still work for VS2015 (because it falls back to the old DacTableGen in that case) Finally we should move to using the Linux method of creating the DAC, and so all these tools and their nuget package can be removed.
Due to lack of recent activity, this issue has been marked as a candidate for backlog cleanup. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process. This process is part of our issue cleanup automation. |
This issue will now be closed since it had been marked |
Here is the relevent portion of my builds log file:
e:\fxkit\coreclr\bin\Logs\CoreCLR_Windows_NT__x64__Checked.log
The text was updated successfully, but these errors were encountered: