sdk
sdk copied to clipboard
The build failed. Please fix the build errors and run again.
Hi, @dotnet
It does work with dotnet run
in my VM/Debian 9. But It can be running with docker run -v /example/mysource/:/source etc... microsoft/aspnetcore-build:1.0-2.0 ...
with the docker image microsoft/aspnetcore-build:1.0-2.0
.
The command dotnet build -f netcoreapp2.0
works well without any output. However the command dotnet run -f netcoreapp2.0
run with an error message The build failed. Please fix the build errors and run again.
. It was confuse to me, What's the problem?
error
$ dotnet build -f netcoreapp2.0
$ dotnet run -f netcoreapp2.0
The build failed. Please fix the build errors and run again.
$
environment
$ dotnet --info
.NET Command Line Tools (2.0.2)
Product Information:
Version: 2.0.2
Commit SHA-1 hash: a04b4bf512
Runtime Environment:
OS Name: debian
OS Version: 9
OS Platform: Linux
RID: linux-x64
Base Path: /usr/share/dotnet/sdk/2.0.2/
Microsoft .NET Core Shared Framework Host
Version : 2.0.0
Build : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d
$ uname -a
Linux far-seer-01 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u5 (2017-09-19) x86_64 GNU/Linux
P.S The dotnet run
works well with a simple console application.
$ dotnet new console -o hwapp
Getting ready...
The template "Console Application" was created successfully.
Processing post-creation actions...
Running 'dotnet restore' on hwapp/hwapp.csproj...
Restoring packages for /tmp/hwapp/hwapp.csproj...
Generating MSBuild file /tmp/hwapp/obj/hwapp.csproj.nuget.g.props.
Generating MSBuild file /tmp/hwapp/obj/hwapp.csproj.nuget.g.targets.
Restore completed in 162.78 ms for /tmp/hwapp/hwapp.csproj.
Restore succeeded.
$ cd hwapp/
$ dotnet run
Hello World!
I am so sorry for the late reply, is this still happening to you?
Could you provide us with a repro project or repro steps? Or at least some logs for the failed case?
This happening to me right now, but I not able to find out any logs or details about the message described above.
I have the same problem on Debian 9 VM: I tried to run:
dotnet new webapi
dotnet add package Selenium.WebDriver -n
dotnet build
dotnet run
It looks like dotnet build
didn't build anything and then dotnet run tries to build first and fails with
The build failed. Please fix the build errors and run again.
Here is my environment info:
user@env:~/test$ dotnet --info
.NET Command Line Tools (2.0.0)
Product Information:
Version: 2.0.0
Commit SHA-1 hash: cdcd1928c9
Runtime Environment:
OS Name: debian
OS Version: 9
OS Platform: Linux
RID: linux-x64
Base Path: /usr/share/dotnet/sdk/2.0.0/
Microsoft .NET Core Shared Framework Host
Version : 2.0.0
Build : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d
Happened to me on Linux when the tmp storage device was full.
I closed down VS Code, and then reopened my program folder. It worked. I think my the program was stuck in a loop. ;/
Your solution worked. Also needed to select .sln project on the pallet prompt. Seems it was confused between my API and .sln project.
It is happening to me too... Someone should help.
@KelechiDivine Try closing and restarting VS Code? It worked for me last year.
@geekboyisonnow still failed.
@KelechiDivine I don't know why I am getting an email about your comment 6 months late, but the only other suggestion I would have for this issue is to update VS Code, and restart. For the past 18 months I have been working with Java 8, Spring, Struts 2, and using IntelliJ IDE. Good luck for anyone that experiences this issue in the future!
I am facing the same issue on Windows10. Using the samples in the sdk. dotnet build MSBuild version 17.3.2+561848881 for .NET Determining projects to restore... All projects are up-to-date for restore. SymmetricKeySample -> C:\Projects\Azure\azure-iot-sdk-csharp\provisioning\device\samples\how to guides\SymmetricKeySample\bin\Debug\net6.0\SymmetricKeySample.dll
Build succeeded. 0 Warning(s) 0 Error(s)
Time Elapsed 00:00:00.87
FinchMik@4K6J3B3 MINGW64 /c/Projects/Azure/azure-iot-sdk-csharp/provisioning/device/samples/how to guides/SymmetricKeySample (main) $ dotnet run -i <IDScope> -r <registrationID> -p <primary_key>
The build failed. Fix the build errors and run again.