question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ForwardLabelsNoLeaving throws NullReferenceException after upgrade to dotnet core 3.1.402 SDK

See original GitHub issue

Version Used: dotnet core 3.1.402 SDK

Steps to Reproduce:

run dotnet build --configuration Release --runtime win-x64 But it seems to depend on the code being compiled, as not all my projects fail to build. I can not share the code publicly, as it is property of the company I work for. Is there some private way I can share my code for you to reproduce the issue?

Expected Behavior: Compiles without errors

Actual Behavior: Microsoft ® Build Engine version 16.7.0+7fb82e5b2 for .NET Copyright © Microsoft Corporation. All rights reserved.

Determining projects to restore… All projects are up-to-date for restore. FileSync -> C:\dev\Datafordeler\FileSync\bin\Release\netcoreapp3.1\win-x64\FileSync.dll Datafordeler -> C:\dev\Datafordeler\Datafordeler\bin\Release\netcoreapp2.1\Datafordeler.dll Datafordeler.Tests -> C:\dev\Datafordeler\Datafordeler.Tests\bin\Release\netcoreapp2.1\win-x64\Datafordeler.Tests.dll C:\Program Files\dotnet\sdk\3.1.402\Roslyn\Microsoft.CSharp.Core.targets(70,5): error : Process terminated. System.NullReferenceException: Object reference not set to an instance of an object. [C:\dev\Datafordeler\Datafordeler\Datafordeler.csproj] C:\Program Files\dotnet\sdk\3.1.402\Roslyn\Microsoft.CSharp.Core.targets(70,5): error : at Microsoft.CodeAnalysis.CodeGen.ILBuilder.ForwardLabelsNoLeaving() [C:\dev\Datafordeler\Datafordeler\Datafordeler.csproj] C:\Program Files\dotnet\sdk\3.1.402\Roslyn\Microsoft.CSharp.Core.targets(70,5): error : at Microsoft.CodeAnalysis.CodeGen.ILBuilder.RealizeBlocks() [C:\dev\Datafordeler\Datafordeler\Datafordeler.csproj] C:\Program Files\dotnet\sdk\3.1.402\Roslyn\Microsoft.CSharp.Core.targets(70,5): error : at Microsoft.CodeAnalysis.CodeGen.ILBuilder.Realize() [C:\dev\Datafordeler\Datafordeler\Datafordeler.csproj] C:\Program Files\dotnet\sdk\3.1.402\Roslyn\Microsoft.CSharp.Core.targets(70,5): error : at Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator.GenerateImpl() [C:\dev\Datafordeler\Datafordeler\Datafordeler.csproj]

full output can be seen here: https://gist.github.com/initram/108224804ae6589185fe2b7ee73a8bc9

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
RikkiGibsoncommented, Sep 23, 2020

It should be possible to use a global.json file in your project (which can be generated using the dotnet CLI) to tell it to use an earlier dotnet SDK in the build.

0reactions
initramcommented, Sep 24, 2020

3.1.302 works 3.1.401 fails

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why am I getting a null reference exception for ASP.NET ...
Model Binding Null exception a View Component in Razor Pages Framework : ASP.Net Core 3.1. Razor page. 1) AppView Page -> ApplicantsView.
Read more >
NET Core 3.1 Known Issues
To fix this, update the application to use the System.Data.SqlClient package version 4.8.1. .NET Core 3.1.2 SDK (3.1.102 SDK). Packages ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found