Null ref error while publishing with Runtime identifier set as win7-x64
See original GitHub issueCall stack:
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.NETCore.Build.Tasks.LockFileExtensions.IsPortable(LockFileTarget lockFileTarget)
at Microsoft.NETCore.Build.Tasks.ResolvePublishAssemblies.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
Done executing task "ResolvePublishAssemblies" -- FAILED.
Log attached: Publish_RID_NullRef.txt
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Breaking change: Automatic RuntimeIdentifier - .NET
Learn about a breaking change in the .NET 7 SDK where a RuntimeIdentifier is automatically added to projects that use certain publish ......
Read more >Architecture in a .net core app - Elements
Hi, If I create a .net core library and set the architecture to something other than anycpu what does it do ? Also...
Read more >c# - Troubleshooting BadImageFormatException
I have Win7 64 bit, 32-bit Oracle Client, and have my MVC 5 project set to run on x86 platform because of the...
Read more >Cannot debug net6.0-macos Apps - Developer Community
When I hit debug, the following error is shown in the Terminal: Possible reasons for this include: * You misspelled a built-in dotnet...
Read more >Configuration
At runtime, the CLI verifies that only one of the specified values was used, or fails with an error message. minValues. integer? (format:...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Calling restore from another target inside of MSBuild doesn’t work. Calling restore will can bring down different .props/.targets files. These .props/.targets files won’t be loaded by MSBuild because it has already imported all the .props/.targets files.
One thing you could do is define $(RuntimeIdentifier) or $(RuntimeIdentifiers) in your project. Then when restore is run, it will automatically restore for those RIDs, since those properties are set.
@rainersigwald @AndyGerlicher @emgarten @rrelyea @nguerrera
Can we call the restore target directly and pass the RID?