Skip to content

[Bug]: ResolveKeySource is not a dependency of CoreCompile #10306

Open
@jjonescz

Description

@jjonescz

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: dotnet/roslyn#74156

Steps to Reproduce

  1. Clone roslyn at 31e6ba81af842e960aa04850b0e63229874d4f02
  2. Run .\Restore.cmd
  3. Open in VS IntPreview Version 17.11.0 Preview 3.0 [35026.344.main]
  4. Run Build > Build Solution - succeeds
  5. Run Build > Build Solution again - fails - see Can only build Roslyn.sln a single time before building breaks (2) roslyn#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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority:2Work that is important, but not critical for the releasebugtriaged

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions