How to find type of project? #3122
Unanswered
soroshsabz
asked this question in
Q&A
Replies: 2 comments 1 reply
-
This has been cross-posted to Stackoverflow and answers there |
Beta Was this translation helpful? Give feedback.
1 reply
-
@soroshsabz You could try to use the var files = GetFiles("./**/*.Tests.dll");
foreach(var file in files)
{
Information("File: {0}", file.FullPath);
if (file.FullPath.Contains("/net461/")
{
// ... Assembly is for .NET 4.6.1
}
else if (file.FullPath.Contains("/netcoreapp2.1/")
{
// ... Assembly is for .NET Core 2.1
}
// etc...
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
ITNOA
I use cake build system to automate building my solution and I want to automate testing my project with cake in our CI,
My NUnit projects have many types such as asp.net dot net framework 4.6.1 or dot net core 2.1 or ...
my problem is when I want to run our unit test with NUnit3 cake dsl we need to know dll path of each project, so I need to know what is type of each project, because for example for dot net core 2.1 dll is under netcoreapp directory and for another project dll is under somewhere else.
for better demonstration please see below image
As you can see in Test Solution Folder we have many test projects with different type framework and ... (for example one of them is
dotnetcore2.1
another one isdot net framework 4.6.1
and etc.)So my question is how to find type of project?
Is there any solution to NUnit3 found dll by self?
my Stack overflow question
thanks
Beta Was this translation helpful? Give feedback.
All reactions