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.

MsBuild.Sdk.Extras fails to compile with Azure 2019 and 3.0.100-preview-010184

See original GitHub issue

Hi,

I spoke to @onovotny (the author of MsBuild.Sdk.Extras) and he suggested opening a ticket here.

At the moment I am trying to update ReactiveUI’s build scripts to use the new Azure Devops VS2019 image. This is not an issue with running locally with .NET Core 3.0 SDK installed globally.

My build script first uses the install ‘dotnet 3.0 sdk’ and then tries to compile. The dotnet sdk gets installed into the tools cache directory on the hosted azure host.

- task: DotNetCoreInstaller@0
    displayName: Install Dot Net Core v3.0.100-preview-010184
    inputs:
        version: '3.0.100-preview-010184'

I have the following global.json file (and tried with and without the sdk version)

{
    "sdk": {
        "version": "3.0.100-preview-010184"
    },
    "msbuild-sdks": {
        "MSBuild.Sdk.Extras": "2.0.0-preview.21"
    }
}

I get the following build errors:

Building Splat.csproj
Microsoft (R) Build Engine version 16.0.360-preview+g9781d96883 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

D:\a\1\s\src\Splat\Splat.csproj : error : C:\hostedtoolcache\windows\dncs\3.0.100-preview-010184\x64\sdk\3.0.100-preview-010184\Sdks\MSBuild.Sdk.Extras\Sdk not found. Check that a recent enough .NET Core SDK is installed and/or increase the version specified in global.json.
D:\a\1\s\src\Splat\Splat.csproj : error : C:\hostedtoolcache\windows\dncs\3.0.100-preview-010184\x64\sdk\3.0.100-preview-010184\Sdks\MSBuild.Sdk.Extras\Sdk not found. Check that a recent enough .NET Core SDK is installed and/or increase the version specified in global.json.
D:\a\1\s\src\Splat\Splat.csproj : error MSB4236: The SDK 'MSBuild.Sdk.Extras' specified could not be found.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
clairernovotnycommented, Feb 23, 2019

Here’s a workaround for now:

With PowerShell, either inline or as a task

iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/onovotny/UpdateVsOnAgent/master/Fix-VisualStudioPreviewNuGetSdk.ps1'))
- powershell: iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/onovotny/UpdateVsOnAgent/master/Fix-VisualStudioPreviewNuGetSdk.ps1'))
  displayName: VS Preview workaround

1reaction
clairernovotnycommented, Feb 23, 2019

This is from the binlog:

Failed to parse "d:\a\1\s\Rx.NET\Source\global.json". Could not load file or assembly 'Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.
Read more comments on GitHub >

github_iconTop Results From Across the Web

MsBuild.Sdk.Extras fails to compile with Azure 2019 and ...
This is not an issue with running locally with .NET Core 3.0 SDK installed globally. My build script first uses the install 'dotnet...
Read more >
NETSDK1045: The current .NET SDK does not support ...
This error occurs when the build tools can't find the version of the .NET SDK that's needed to build a project. This is...
Read more >
The SDK 'Microsoft.NET.Sdk' specified could not be found - ...
I encountered this error after playing around with .Net Core 2.0 installation and seemingly messing it up. I would get this same error...
Read more >
Incompatible versions of Mono MSBuild and .NET Core ...
NET Core SDK are incompatible on Linux and macOS. If you use such combinations, it will be impossible to build your project in...
Read more >
VS 2022 unable to open MonoGame.Framework. ...
One workaround is that I can edit and build the source (for UWP) using VS 2019 and successfully use the output DLL in...
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