msbuild
msbuild copied to clipboard
[Bug]: `ResolveKeySource` is not a dependency of `CoreCompile`
Issue Description
CoreCompile
target calls Csc
with KeyFile="$(KeyOriginatorFile)"
.
This KeyOriginatorFile
property is set by the ResolveKeySource
target.
ResolveKeySource
target is not a dependency of CoreCompile
(although it is a dependency of e.g., Compile
and CoreBuild
)
Most of the time it seems the ResolveKeySource
target is actually executed before CoreCompile
so everything works fine - but sometimes it doesn't: https://github.com/dotnet/roslyn/issues/74156
Steps to Reproduce
- Clone roslyn at 31e6ba81af842e960aa04850b0e63229874d4f02
- Run
.\Restore.cmd
- Open in VS IntPreview Version 17.11.0 Preview 3.0 [35026.344.main]
- Run Build > Build Solution - succeeds
- Run Build > Build Solution again - fails - see https://github.com/dotnet/roslyn/issues/74156
Creating a minimal repro would be complicated, I don't know the exact conditions needed to get the buggy ordering of targets.
Here's the binlog (from a VS build) where I saw the issue: vs.binlog.zip
Expected Behavior
Build succeeds the second time.
Actual Behavior
CSC error CS8102: Public signing was specified and requires a public key, but no public key was specified. [D:\roslyn-D\src\VisualStudio\CSharp\Impl\Microsoft.VisualStudio.LanguageServices.CSharp.csproj]
Analysis
No response
Versions & Configurations
No response