You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Opening Microsoft.Win32.Registry via build.cmd -vs Microsoft.Win32.Registry and building the src project fails with the following errors and warnings:
Severity Code Description Project File Line Suppression State
Warning MSB3245 Could not resolve this reference. Could not locate the assembly "mscorlib". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. Microsoft.Win32.Registry (ref\Microsoft.Win32.Registry) C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets 2081
Warning MSB3245 Could not resolve this reference. Could not locate the assembly "mscorlib". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. Microsoft.Win32.Registry (src\Microsoft.Win32.Registry) C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets 2081
Error TypesMustExist : Type 'Microsoft.Win32.Registry' does not exist in the implementation but it does exist in the contract. Microsoft.Win32.Registry (src\Microsoft.Win32.Registry) C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\5.0.0-beta.20201.2\build\Microsoft.DotNet.ApiCompat.targets 82
Error TypesMustExist : Type 'Microsoft.Win32.RegistryHive' does not exist in the implementation but it does exist in the contract. Microsoft.Win32.Registry (src\Microsoft.Win32.Registry) C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\5.0.0-beta.20201.2\build\Microsoft.DotNet.ApiCompat.targets 82
Error TypesMustExist : Type 'Microsoft.Win32.RegistryKey' does not exist in the implementation but it does exist in the contract. Microsoft.Win32.Registry (src\Microsoft.Win32.Registry) C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\5.0.0-beta.20201.2\build\Microsoft.DotNet.ApiCompat.targets 82
Error TypesMustExist : Type 'Microsoft.Win32.RegistryKeyPermissionCheck' does not exist in the implementation but it does exist in the contract. Microsoft.Win32.Registry (src\Microsoft.Win32.Registry) C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\5.0.0-beta.20201.2\build\Microsoft.DotNet.ApiCompat.targets 82
Error TypesMustExist : Type 'Microsoft.Win32.RegistryOptions' does not exist in the implementation but it does exist in the contract. Microsoft.Win32.Registry (src\Microsoft.Win32.Registry) C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\5.0.0-beta.20201.2\build\Microsoft.DotNet.ApiCompat.targets 82
Error TypesMustExist : Type 'Microsoft.Win32.RegistryValueKind' does not exist in the implementation but it does exist in the contract. Microsoft.Win32.Registry (src\Microsoft.Win32.Registry) C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\5.0.0-beta.20201.2\build\Microsoft.DotNet.ApiCompat.targets 82
Error TypesMustExist : Type 'Microsoft.Win32.RegistryValueOptions' does not exist in the implementation but it does exist in the contract. Microsoft.Win32.Registry (src\Microsoft.Win32.Registry) C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\5.0.0-beta.20201.2\build\Microsoft.DotNet.ApiCompat.targets 82
Error TypesMustExist : Type 'Microsoft.Win32.RegistryView' does not exist in the implementation but it does exist in the contract. Microsoft.Win32.Registry (src\Microsoft.Win32.Registry) C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\5.0.0-beta.20201.2\build\Microsoft.DotNet.ApiCompat.targets 82
Error TypesMustExist : Type 'Microsoft.Win32.SafeHandles.SafeRegistryHandle' does not exist in the implementation but it does exist in the contract. Microsoft.Win32.Registry (src\Microsoft.Win32.Registry) C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\5.0.0-beta.20201.2\build\Microsoft.DotNet.ApiCompat.targets 82
Error TypesMustExist : Type 'System.Security.AccessControl.RegistryAccessRule' does not exist in the implementation but it does exist in the contract. Microsoft.Win32.Registry (src\Microsoft.Win32.Registry) C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\5.0.0-beta.20201.2\build\Microsoft.DotNet.ApiCompat.targets 82
Error TypesMustExist : Type 'System.Security.AccessControl.RegistryAuditRule' does not exist in the implementation but it does exist in the contract. Microsoft.Win32.Registry (src\Microsoft.Win32.Registry) C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\5.0.0-beta.20201.2\build\Microsoft.DotNet.ApiCompat.targets 82
Error TypesMustExist : Type 'System.Security.AccessControl.RegistryRights' does not exist in the implementation but it does exist in the contract. Microsoft.Win32.Registry (src\Microsoft.Win32.Registry) C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\5.0.0-beta.20201.2\build\Microsoft.DotNet.ApiCompat.targets 82
Error TypesMustExist : Type 'System.Security.AccessControl.RegistrySecurity' does not exist in the implementation but it does exist in the contract. Microsoft.Win32.Registry (src\Microsoft.Win32.Registry) C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\5.0.0-beta.20201.2\build\Microsoft.DotNet.ApiCompat.targets 82
Error ApiCompat failed for 'C:\git\runtime3\artifacts\bin\Microsoft.Win32.Registry\netcoreapp5.0-Debug\Microsoft.Win32.Registry.dll' Microsoft.Win32.Registry (src\Microsoft.Win32.Registry) C:\Users\vihofer\.nuget\packages\microsoft.dotnet.apicompat\5.0.0-beta.20201.2\build\Microsoft.DotNet.ApiCompat.targets 96
The warnings are expected as net461 references mscorlib which I haven't restored from the repo root. Related: #31844.
The errors though seem to be unexpected. Taking a further look reveals that the output assembly isn't present in the OutDir. ApiCompat should probably fail with a different error here?
Checking the BaseOutputIntermediatePath reveals that the assembly is actually compiled into netcoreapp5.0-Windows_NT-Debug instead of netcoreapp5.0-Debug which seems correct. The intermediate paths (and possibly the output paths as well) are probably broken when building inside VS:
ViktorHofer
changed the title
ApiCompat fails inside VS for Microsoft.Win32.Registry (src)
ApiCompat fails inside VS for Microsoft.Win32.Registry (src) - Intermediate paths broken
Apr 19, 2020
Opening Microsoft.Win32.Registry via
build.cmd -vs Microsoft.Win32.Registry
and building the src project fails with the following errors and warnings:The warnings are expected as net461 references mscorlib which I haven't restored from the repo root. Related: #31844.
The errors though seem to be unexpected. Taking a further look reveals that the output assembly isn't present in the OutDir. ApiCompat should probably fail with a different error here?
Checking the BaseOutputIntermediatePath reveals that the assembly is actually compiled into
netcoreapp5.0-Windows_NT-Debug
instead ofnetcoreapp5.0-Debug
which seems correct. The intermediate paths (and possibly the output paths as well) are probably broken when building inside VS:cc @ericstj @Anipik
The text was updated successfully, but these errors were encountered: