2.1-preview1 dotnet restore fails with "Microsoft.NET.Sdk.Web/Sdk/Sdk.props could not be loaded."
See original GitHub issueSteps to reproduce
Inside of an ASP.NET Core 2.1 Preview 1 project run the following command:
$ docker run --rm -v $(pwd):/root/code microsoft/aspnetcore-build:2.1.300-preview1 dotnet restore
Expected behavior
This should spin up a microsoft/aspnetcore-build
container with the latest 2.1-preview
.NET SDK and restore the current project’s dependencies.
Actual behavior
Container is created and an error is immediately thrown upon attempting to restore:
/root/code/App.csproj : error MSB4024: The imported project file "/usr/share/dotnet/sdk/2.1.300-preview1-008174/Sdks/Microsoft.NET.Sdk.Web/Sdk/Sdk.props" could not be loaded. Data at the root level is invalid. Line 1, position 1.
It should be noted that this same $ dotnet restore
command works just fine on my local mac running the same version of the SDK. It is crucial for the same command to work inside Docker as we use containers for local dev as well as production deployments.
Environment data
Running:
docker run --rm -v $(pwd):/root/code microsoft/aspnetcore-build:2.1.300-preview1 dotnet --info
Produces:
.NET Command Line Tools (2.1.300-preview1-008174)
Product Information:
Version: 2.1.300-preview1-008174
Commit SHA-1 hash: b8df89a54f
Runtime Environment:
OS Name: debian
OS Version: 9
OS Platform: Linux
RID: linux-x64
Base Path: /usr/share/dotnet/sdk/2.1.300-preview1-008174/
Microsoft .NET Core Shared Framework Host
Version : 2.1.0-preview1-26216-03
Build : f2c3216183d20416568a4bbf5bb7d153e826f153
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
No results found
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
Ok. Given that this seems like a transient docker issue, I am closing this issue.
If some new development happens though, feel free to comment and we can re-activate.
@peterhuene huh, that’s weird. so i figured it must have something to do with Docker itself and now that command works once I reset my Docker virtual disk image.