Run xUnit test with MSBuild











up vote
0
down vote

favorite












I've created ASP.NET we app project and then I've created a test class - this class is part of the .NET core.



I need to run the test by the console but I can't use .net core. because the app has to be compiled, etc. with MSBuild, so I have been doing some research about how to run xUnit test inside MSBuild task.



I found this https://xunit.github.io/docs/running-tests-in-msbuild#options.



So I installed xunit.runner.msbuild.net452.dll but I cannot run the test.



error : System.InvalidOperationException: Unknown test framework: could not find xunit.dll (v1) or xunit.execution.*.dll .....


Is .NET framework is compatible with xUnit?










share|improve this question
























  • Seems like a pretty common error with a few environmental causes. What research have you done? You should share that research. At any rate, this is probably a better fit for sqa.stackexchange.com.
    – jdv
    Nov 7 at 16:59










  • i have been reading about xunit.runner.msbuild...but for the moment i am not being able to execute the tests. The last time i've luanched the msbuild command, the output was: AfterBuild: xUnit.net MSBuild Runner v2.4.1 (64-bit Desktop .NET 4.0.30319.42000). However, there is not way that i can know if the tests are done...
    – Miren
    Nov 8 at 8:17












  • Clarification to questions should be done with an edit to the question itself. Comments can be deleted.
    – jdv
    Nov 8 at 15:25















up vote
0
down vote

favorite












I've created ASP.NET we app project and then I've created a test class - this class is part of the .NET core.



I need to run the test by the console but I can't use .net core. because the app has to be compiled, etc. with MSBuild, so I have been doing some research about how to run xUnit test inside MSBuild task.



I found this https://xunit.github.io/docs/running-tests-in-msbuild#options.



So I installed xunit.runner.msbuild.net452.dll but I cannot run the test.



error : System.InvalidOperationException: Unknown test framework: could not find xunit.dll (v1) or xunit.execution.*.dll .....


Is .NET framework is compatible with xUnit?










share|improve this question
























  • Seems like a pretty common error with a few environmental causes. What research have you done? You should share that research. At any rate, this is probably a better fit for sqa.stackexchange.com.
    – jdv
    Nov 7 at 16:59










  • i have been reading about xunit.runner.msbuild...but for the moment i am not being able to execute the tests. The last time i've luanched the msbuild command, the output was: AfterBuild: xUnit.net MSBuild Runner v2.4.1 (64-bit Desktop .NET 4.0.30319.42000). However, there is not way that i can know if the tests are done...
    – Miren
    Nov 8 at 8:17












  • Clarification to questions should be done with an edit to the question itself. Comments can be deleted.
    – jdv
    Nov 8 at 15:25













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I've created ASP.NET we app project and then I've created a test class - this class is part of the .NET core.



I need to run the test by the console but I can't use .net core. because the app has to be compiled, etc. with MSBuild, so I have been doing some research about how to run xUnit test inside MSBuild task.



I found this https://xunit.github.io/docs/running-tests-in-msbuild#options.



So I installed xunit.runner.msbuild.net452.dll but I cannot run the test.



error : System.InvalidOperationException: Unknown test framework: could not find xunit.dll (v1) or xunit.execution.*.dll .....


Is .NET framework is compatible with xUnit?










share|improve this question















I've created ASP.NET we app project and then I've created a test class - this class is part of the .NET core.



I need to run the test by the console but I can't use .net core. because the app has to be compiled, etc. with MSBuild, so I have been doing some research about how to run xUnit test inside MSBuild task.



I found this https://xunit.github.io/docs/running-tests-in-msbuild#options.



So I installed xunit.runner.msbuild.net452.dll but I cannot run the test.



error : System.InvalidOperationException: Unknown test framework: could not find xunit.dll (v1) or xunit.execution.*.dll .....


Is .NET framework is compatible with xUnit?







msbuild xunit






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 7 at 18:50









user6910411

31.9k76692




31.9k76692










asked Nov 7 at 16:34









Miren

93112




93112












  • Seems like a pretty common error with a few environmental causes. What research have you done? You should share that research. At any rate, this is probably a better fit for sqa.stackexchange.com.
    – jdv
    Nov 7 at 16:59










  • i have been reading about xunit.runner.msbuild...but for the moment i am not being able to execute the tests. The last time i've luanched the msbuild command, the output was: AfterBuild: xUnit.net MSBuild Runner v2.4.1 (64-bit Desktop .NET 4.0.30319.42000). However, there is not way that i can know if the tests are done...
    – Miren
    Nov 8 at 8:17












  • Clarification to questions should be done with an edit to the question itself. Comments can be deleted.
    – jdv
    Nov 8 at 15:25


















  • Seems like a pretty common error with a few environmental causes. What research have you done? You should share that research. At any rate, this is probably a better fit for sqa.stackexchange.com.
    – jdv
    Nov 7 at 16:59










  • i have been reading about xunit.runner.msbuild...but for the moment i am not being able to execute the tests. The last time i've luanched the msbuild command, the output was: AfterBuild: xUnit.net MSBuild Runner v2.4.1 (64-bit Desktop .NET 4.0.30319.42000). However, there is not way that i can know if the tests are done...
    – Miren
    Nov 8 at 8:17












  • Clarification to questions should be done with an edit to the question itself. Comments can be deleted.
    – jdv
    Nov 8 at 15:25
















Seems like a pretty common error with a few environmental causes. What research have you done? You should share that research. At any rate, this is probably a better fit for sqa.stackexchange.com.
– jdv
Nov 7 at 16:59




Seems like a pretty common error with a few environmental causes. What research have you done? You should share that research. At any rate, this is probably a better fit for sqa.stackexchange.com.
– jdv
Nov 7 at 16:59












i have been reading about xunit.runner.msbuild...but for the moment i am not being able to execute the tests. The last time i've luanched the msbuild command, the output was: AfterBuild: xUnit.net MSBuild Runner v2.4.1 (64-bit Desktop .NET 4.0.30319.42000). However, there is not way that i can know if the tests are done...
– Miren
Nov 8 at 8:17






i have been reading about xunit.runner.msbuild...but for the moment i am not being able to execute the tests. The last time i've luanched the msbuild command, the output was: AfterBuild: xUnit.net MSBuild Runner v2.4.1 (64-bit Desktop .NET 4.0.30319.42000). However, there is not way that i can know if the tests are done...
– Miren
Nov 8 at 8:17














Clarification to questions should be done with an edit to the question itself. Comments can be deleted.
– jdv
Nov 8 at 15:25




Clarification to questions should be done with an edit to the question itself. Comments can be deleted.
– jdv
Nov 8 at 15:25

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53193821%2frun-xunit-test-with-msbuild%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53193821%2frun-xunit-test-with-msbuild%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







這個網誌中的熱門文章

Academy of Television Arts & Sciences

L'Équipe

1995 France bombings