efcore icon indicating copy to clipboard operation
efcore copied to clipboard

EntityFrameworkCore build fails with error "KRB5005: Symbols were set to be included but the project was built using DebugType = full"

Open keeratsingh opened this issue 8 years ago • 9 comments

Hi Team,

I am trying to test SqlClient changes with EF, however EntityFrameworkCore build fails with error "C:\Users\keerat.nuget\packages\internal.aspnetcore.sdk\2.1.0-preview2-15698\build\Common.targets(28,5): error KRB5005: Symbols were set to be included but the project was built using DebugType = full. Set DebugType = portable to include portable pdbs required for symbol publishing or stop including symbols by setting IncludeSymbols=false."

Full error trace

ef -> C:\dotNetCore\EntityFrameworkCore\src\ef\bin\x86\Debug\netcoreapp2.0\ef.x86.dll
C:\Users\keerat\.nuget\packages\internal.aspnetcore.sdk\2.1.0-preview2-15698\build\Common.targets(28,5): error KRB5005: Symbols were set to be included but the project was built using DebugType = full. Set DebugType = portable to include portable pdbs required for symbol publishing or stop including symbols by setting IncludeSymbols=false. [C:\dotNetCore\EntityFrameworkCore\src\EFCore.Attributes\EFCore.Attributes.csproj]
  dotnet-ef.Tests -> C:\dotNetCore\EntityFrameworkCore\test\dotnet-ef.Tests\bin\Debug\netcoreapp2.1\dotnet-ef.Tests.dll
  dotnet-ef.Tests -> C:\dotNetCore\EntityFrameworkCore\test\dotnet-ef.Tests\bin\Debug\netcoreapp2.0\dotnet-ef.Tests.dll

Build FAILED.

C:\Users\keerat\.nuget\packages\internal.aspnetcore.sdk\2.1.0-preview2-15698\build\Common.targets(28,5): error KRB5005: Symbols were set to be included but the project was built using DebugType = full. Set DebugType = portable to include portable pdbs required for symbol publishing or stop including symbols by setting IncludeSymbols=false. [C:\dotNetCore\EntityFrameworkCore\src\EFCore.Attributes\EFCore.Attributes.csproj]
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:02:39.82
dotnet.exe failed with exit code: 1
At C:\Users\keerat\.dotnet\buildtools\korebuild\2.1.0-preview2-15698\scripts\common.psm1:11 char:9
+         throw "$cmdName failed with exit code: $exitCode"
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (dotnet.exe failed with exit code: 1:String) [], RuntimeException
    + FullyQualifiedErrorId : dotnet.exe failed with exit code: 1

Steps to reproduce

  • Clone repository https://github.com/aspnet/EntityFrameworkCore
  • Navigate to base folder
  • Execute command build

Attached logs for the same.

Further technical details

C:\dotNetCore\EntityFrameworkCore>dotnet --info
.NET Command Line Tools (2.1.4)

Product Information:
 Version:            2.1.4
 Commit SHA-1 hash:  5e8add2190

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.16299
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.1.4\

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.5
  Build    : 17373eb129b3b05aa18ece963f8795d65ef8ea54

C:\dotNetCore\EntityFrameworkCore>c:\Users\keerat\.dotnet\x64\dotnet.exe --info
.NET Command Line Tools (2.1.300-preview2-008044)

Product Information:
 Version:            2.1.300-preview2-008044
 Commit SHA-1 hash:  c22f7e29a0

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.16299
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   c:\Users\keerat\.dotnet\x64\sdk\2.1.300-preview2-008044\

Microsoft .NET Core Shared Framework Host

  Version  : 2.1.0-preview2-26130-06
  Build    : b13a0d5c331f374afd35ded57b9a4b4ab128864c

EFCore_build.log

keeratsingh avatar Feb 10 '18 19:02 keeratsingh

Got same issue today, I was able to build solution after changing DebugType in DirectoryBuild.props to portable.

AndrewBoklashko avatar Feb 10 '18 20:02 AndrewBoklashko

@SSkovboiSS Thank you Andrew, as confirmed I was able to build the solution after making changes as per your suggestions.

keeratsingh avatar Feb 11 '18 00:02 keeratsingh

@natemcmaster @pranavkm @ryanbrandenburg Seems like this started failing over the weekend with some new changes to add symbols. Any ideas what might be broken?

ajcvickers avatar Feb 12 '18 21:02 ajcvickers

We added this check in KoreBuild to ensure that .symbols.nupkg files contain portable symbols (DebugType=portable). This was required for the work we're doing to make symbols available for the whole shared runtime.

Looks like we missed this piece because CI only builds Configuration=Release https://github.com/aspnet/EntityFrameworkCore/blob/9754936dc4edb627c442a49457e288bf67254cd6/Directory.Build.props#L19

Do you need full symbols for something?

natemcmaster avatar Feb 12 '18 21:02 natemcmaster

@natemcmaster No idea. :-) @bricelam? @smitpatel?

ajcvickers avatar Feb 12 '18 21:02 ajcvickers

git blame says @AndriySvyryd added this setting a long time ago in https://github.com/aspnet/EntityFrameworkCore/commit/67d2f2e3b7a23d7ff89e9284b09582c2d2598cde.

natemcmaster avatar Feb 12 '18 21:02 natemcmaster

Yes. They help some VS tools. We can probably just skip packing symbols on Debug too

bricelam avatar Feb 12 '18 21:02 bricelam

I think I was debugging on a non-dev machine and this helped. We don't need it anymore.

AndriySvyryd avatar Feb 12 '18 22:02 AndriySvyryd

@bricelam Do you concur with @AndriySvyryd that we can remove this? (And does this mean just deleting this line entirely?)

ajcvickers avatar Feb 12 '18 22:02 ajcvickers