Not able to build .NET Core Console Application in Linux
up vote
0
down vote
favorite
I have this spec file which is trying to run a script which will run the dotnet cli program:
require 'spec_helper'
RSpec.describe 'Integration test', type: :aruba do
let(:command) { run "dotnet-test" }
it "test" do
command.write("testn")
stop_all_commands
expect(command.output).to end_with("successn")
end
end
dotnet-test
script:
dotnet run --project ../SomeProject/src/SomeProject.Console/SomeProject.Console.csproj -- $1
But I get the error :
Failure/Error: expect(command.output).to end_with("successn")
expected "MSBUILD : error MSB1009: Project file does not exist.nSwitch: ../SomeProject/src/SomeProject.Console/SomeProject.Console.csprojnnThe build failed. Please fix the build errors and run again.n" to end with "successn"
But if I run the script from that directory then program runs fine. Cannot figure out what could be the difference between the two. Help is really appreciated.
ruby ubuntu rspec .net-core aruba
add a comment |
up vote
0
down vote
favorite
I have this spec file which is trying to run a script which will run the dotnet cli program:
require 'spec_helper'
RSpec.describe 'Integration test', type: :aruba do
let(:command) { run "dotnet-test" }
it "test" do
command.write("testn")
stop_all_commands
expect(command.output).to end_with("successn")
end
end
dotnet-test
script:
dotnet run --project ../SomeProject/src/SomeProject.Console/SomeProject.Console.csproj -- $1
But I get the error :
Failure/Error: expect(command.output).to end_with("successn")
expected "MSBUILD : error MSB1009: Project file does not exist.nSwitch: ../SomeProject/src/SomeProject.Console/SomeProject.Console.csprojnnThe build failed. Please fix the build errors and run again.n" to end with "successn"
But if I run the script from that directory then program runs fine. Cannot figure out what could be the difference between the two. Help is really appreciated.
ruby ubuntu rspec .net-core aruba
1
when you say "run the script from that directory" what exactly are you running and is that script ruby?
– lacostenycoder
Nov 10 at 12:39
@lacostenycoder by that I mean when I just run thedotnet-test
script from the terminal from the directory it runs fine but when the same script is executed from Aruba then it throws that error. Hope that explains it.
– lbrahim
Nov 10 at 13:03
can you post the code you have indotnet-test
?
– lacostenycoder
Nov 10 at 14:10
dotnet run --project ../SomeProject/src/SomeProject.Console/SomeProject.Console.csproj -- $1
– lbrahim
Nov 10 at 14:17
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have this spec file which is trying to run a script which will run the dotnet cli program:
require 'spec_helper'
RSpec.describe 'Integration test', type: :aruba do
let(:command) { run "dotnet-test" }
it "test" do
command.write("testn")
stop_all_commands
expect(command.output).to end_with("successn")
end
end
dotnet-test
script:
dotnet run --project ../SomeProject/src/SomeProject.Console/SomeProject.Console.csproj -- $1
But I get the error :
Failure/Error: expect(command.output).to end_with("successn")
expected "MSBUILD : error MSB1009: Project file does not exist.nSwitch: ../SomeProject/src/SomeProject.Console/SomeProject.Console.csprojnnThe build failed. Please fix the build errors and run again.n" to end with "successn"
But if I run the script from that directory then program runs fine. Cannot figure out what could be the difference between the two. Help is really appreciated.
ruby ubuntu rspec .net-core aruba
I have this spec file which is trying to run a script which will run the dotnet cli program:
require 'spec_helper'
RSpec.describe 'Integration test', type: :aruba do
let(:command) { run "dotnet-test" }
it "test" do
command.write("testn")
stop_all_commands
expect(command.output).to end_with("successn")
end
end
dotnet-test
script:
dotnet run --project ../SomeProject/src/SomeProject.Console/SomeProject.Console.csproj -- $1
But I get the error :
Failure/Error: expect(command.output).to end_with("successn")
expected "MSBUILD : error MSB1009: Project file does not exist.nSwitch: ../SomeProject/src/SomeProject.Console/SomeProject.Console.csprojnnThe build failed. Please fix the build errors and run again.n" to end with "successn"
But if I run the script from that directory then program runs fine. Cannot figure out what could be the difference between the two. Help is really appreciated.
ruby ubuntu rspec .net-core aruba
ruby ubuntu rspec .net-core aruba
asked Nov 10 at 12:28
lbrahim
2,23373467
2,23373467
1
when you say "run the script from that directory" what exactly are you running and is that script ruby?
– lacostenycoder
Nov 10 at 12:39
@lacostenycoder by that I mean when I just run thedotnet-test
script from the terminal from the directory it runs fine but when the same script is executed from Aruba then it throws that error. Hope that explains it.
– lbrahim
Nov 10 at 13:03
can you post the code you have indotnet-test
?
– lacostenycoder
Nov 10 at 14:10
dotnet run --project ../SomeProject/src/SomeProject.Console/SomeProject.Console.csproj -- $1
– lbrahim
Nov 10 at 14:17
add a comment |
1
when you say "run the script from that directory" what exactly are you running and is that script ruby?
– lacostenycoder
Nov 10 at 12:39
@lacostenycoder by that I mean when I just run thedotnet-test
script from the terminal from the directory it runs fine but when the same script is executed from Aruba then it throws that error. Hope that explains it.
– lbrahim
Nov 10 at 13:03
can you post the code you have indotnet-test
?
– lacostenycoder
Nov 10 at 14:10
dotnet run --project ../SomeProject/src/SomeProject.Console/SomeProject.Console.csproj -- $1
– lbrahim
Nov 10 at 14:17
1
1
when you say "run the script from that directory" what exactly are you running and is that script ruby?
– lacostenycoder
Nov 10 at 12:39
when you say "run the script from that directory" what exactly are you running and is that script ruby?
– lacostenycoder
Nov 10 at 12:39
@lacostenycoder by that I mean when I just run the
dotnet-test
script from the terminal from the directory it runs fine but when the same script is executed from Aruba then it throws that error. Hope that explains it.– lbrahim
Nov 10 at 13:03
@lacostenycoder by that I mean when I just run the
dotnet-test
script from the terminal from the directory it runs fine but when the same script is executed from Aruba then it throws that error. Hope that explains it.– lbrahim
Nov 10 at 13:03
can you post the code you have in
dotnet-test
?– lacostenycoder
Nov 10 at 14:10
can you post the code you have in
dotnet-test
?– lacostenycoder
Nov 10 at 14:10
dotnet run --project ../SomeProject/src/SomeProject.Console/SomeProject.Console.csproj -- $1
– lbrahim
Nov 10 at 14:17
dotnet run --project ../SomeProject/src/SomeProject.Console/SomeProject.Console.csproj -- $1
– lbrahim
Nov 10 at 14:17
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
It sounds like the script you're trying to run relies on a relative path to execute correctly. In that case you may need to cd
within your spec.
See https://relishapp.com/cucumber/aruba/docs/filesystem/change-current-working-directory
Try to use the absolute path of the file instead of
../SomeProject/src/SomeProject.Console/SomeProject.Console.csproj
Can you put the full path, something like:
/Users/yourusername/pathtosomeproject/SomeProject/src/SomeProject.Console/SomeProject.Console.csproj
Obviously you'll need to replace pathtosomeproject
to where it is actually located.
I tried changing it to : codeshare.io/a3Nd4m but now I get the error thatlet
is not allowed within describe
– lbrahim
Nov 10 at 13:26
let's see your updated spec
– lacostenycoder
Nov 10 at 13:28
I am no linux user but maybe I can change how the path to the project file is referenced?
– lbrahim
Nov 10 at 13:56
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
It sounds like the script you're trying to run relies on a relative path to execute correctly. In that case you may need to cd
within your spec.
See https://relishapp.com/cucumber/aruba/docs/filesystem/change-current-working-directory
Try to use the absolute path of the file instead of
../SomeProject/src/SomeProject.Console/SomeProject.Console.csproj
Can you put the full path, something like:
/Users/yourusername/pathtosomeproject/SomeProject/src/SomeProject.Console/SomeProject.Console.csproj
Obviously you'll need to replace pathtosomeproject
to where it is actually located.
I tried changing it to : codeshare.io/a3Nd4m but now I get the error thatlet
is not allowed within describe
– lbrahim
Nov 10 at 13:26
let's see your updated spec
– lacostenycoder
Nov 10 at 13:28
I am no linux user but maybe I can change how the path to the project file is referenced?
– lbrahim
Nov 10 at 13:56
add a comment |
up vote
1
down vote
It sounds like the script you're trying to run relies on a relative path to execute correctly. In that case you may need to cd
within your spec.
See https://relishapp.com/cucumber/aruba/docs/filesystem/change-current-working-directory
Try to use the absolute path of the file instead of
../SomeProject/src/SomeProject.Console/SomeProject.Console.csproj
Can you put the full path, something like:
/Users/yourusername/pathtosomeproject/SomeProject/src/SomeProject.Console/SomeProject.Console.csproj
Obviously you'll need to replace pathtosomeproject
to where it is actually located.
I tried changing it to : codeshare.io/a3Nd4m but now I get the error thatlet
is not allowed within describe
– lbrahim
Nov 10 at 13:26
let's see your updated spec
– lacostenycoder
Nov 10 at 13:28
I am no linux user but maybe I can change how the path to the project file is referenced?
– lbrahim
Nov 10 at 13:56
add a comment |
up vote
1
down vote
up vote
1
down vote
It sounds like the script you're trying to run relies on a relative path to execute correctly. In that case you may need to cd
within your spec.
See https://relishapp.com/cucumber/aruba/docs/filesystem/change-current-working-directory
Try to use the absolute path of the file instead of
../SomeProject/src/SomeProject.Console/SomeProject.Console.csproj
Can you put the full path, something like:
/Users/yourusername/pathtosomeproject/SomeProject/src/SomeProject.Console/SomeProject.Console.csproj
Obviously you'll need to replace pathtosomeproject
to where it is actually located.
It sounds like the script you're trying to run relies on a relative path to execute correctly. In that case you may need to cd
within your spec.
See https://relishapp.com/cucumber/aruba/docs/filesystem/change-current-working-directory
Try to use the absolute path of the file instead of
../SomeProject/src/SomeProject.Console/SomeProject.Console.csproj
Can you put the full path, something like:
/Users/yourusername/pathtosomeproject/SomeProject/src/SomeProject.Console/SomeProject.Console.csproj
Obviously you'll need to replace pathtosomeproject
to where it is actually located.
edited Nov 10 at 19:26
answered Nov 10 at 12:44
lacostenycoder
3,42411226
3,42411226
I tried changing it to : codeshare.io/a3Nd4m but now I get the error thatlet
is not allowed within describe
– lbrahim
Nov 10 at 13:26
let's see your updated spec
– lacostenycoder
Nov 10 at 13:28
I am no linux user but maybe I can change how the path to the project file is referenced?
– lbrahim
Nov 10 at 13:56
add a comment |
I tried changing it to : codeshare.io/a3Nd4m but now I get the error thatlet
is not allowed within describe
– lbrahim
Nov 10 at 13:26
let's see your updated spec
– lacostenycoder
Nov 10 at 13:28
I am no linux user but maybe I can change how the path to the project file is referenced?
– lbrahim
Nov 10 at 13:56
I tried changing it to : codeshare.io/a3Nd4m but now I get the error that
let
is not allowed within describe– lbrahim
Nov 10 at 13:26
I tried changing it to : codeshare.io/a3Nd4m but now I get the error that
let
is not allowed within describe– lbrahim
Nov 10 at 13:26
let's see your updated spec
– lacostenycoder
Nov 10 at 13:28
let's see your updated spec
– lacostenycoder
Nov 10 at 13:28
I am no linux user but maybe I can change how the path to the project file is referenced?
– lbrahim
Nov 10 at 13:56
I am no linux user but maybe I can change how the path to the project file is referenced?
– lbrahim
Nov 10 at 13:56
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53238950%2fnot-able-to-build-net-core-console-application-in-linux%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
when you say "run the script from that directory" what exactly are you running and is that script ruby?
– lacostenycoder
Nov 10 at 12:39
@lacostenycoder by that I mean when I just run the
dotnet-test
script from the terminal from the directory it runs fine but when the same script is executed from Aruba then it throws that error. Hope that explains it.– lbrahim
Nov 10 at 13:03
can you post the code you have in
dotnet-test
?– lacostenycoder
Nov 10 at 14:10
dotnet run --project ../SomeProject/src/SomeProject.Console/SomeProject.Console.csproj -- $1
– lbrahim
Nov 10 at 14:17