Open CyrusNajmabadi opened 1 week ago
@CyrusNajmabadi is this both cmdline and vs?
no. just VS> i don't use the command line :)
@jjonescz Compile error + Tiger. Would you scout and transition to next Tiger as necessary?
The main error seems to be
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]
Indeed in the binlog I can see the key is not provided to csc.
Adding <PublicSign>False</PublicSign>
to Microsoft.VisualStudio.LanguageServices.CSharp.csproj
is one way to work around the problem (but not sure if it doesn't cause other issues).
It seems the underlying bug is that CoreCompile
target uses the KeyOriginatorFile
property which is set by target ResolveKeySource
but that target is not a dependency of CoreCompile
(although it's a dependency of CoreBuild
and Compile
). Most of the time, the ResolveKeySource
actually runs before CoreCompile
so it works fine, but not in this case (not sure why exactly).
So adding <CoreCompileDependsOn>$(CoreCompileDependsOn);ResolveKeySource</CoreCompileDependsOn>
somewhere works around the problem.
I've opened an issue at MSBuild: https://github.com/dotnet/msbuild/issues/10306 And a workaround here: https://github.com/dotnet/roslyn/pull/74205
Using:
Repro steps.
First time succeeds with:
Second time fails with: