-
-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detect test projects without build #110
Comments
Thanks for the PR! I'm assuming that addresses this method of checking for test projects?
No, not currently. I'm not even totally sure what that would look like - Buildalyzer gets it's data by hooking the logging that MSBuild performs during a build. I'd need some other mechanism to get the props file and it would have to be cross-platform and have a reasonable fallback if the project weren't built yet. There may be another easier way. In searching for We could either expose something similar or, given that I'm not sure I want to bake this in since it's not exactly authoritative, you could do a similar check for |
Yup, thanks for merging.
I think there is somewhere, something available that should make this visible without a build(). But I'm not sure where to look for the msbuild properties/analyzer results for the designtime build that is produced. |
👍 I'll leave this issue open as a feature request and we can add more support if anyone figures out what to look at. |
Hi I'm working on new feature in Stryker.Net that will allow to execute it without building projects (see stryker-mutator/stryker-net#466). We currently calling it to examine properties of testing project (like Is it posiible to prevent to clear output directory or implement this feature (getting |
When loading a solution, I'ld like to differentiate between "normal" projects and "test" projects without compiling the project.
It seems that Buildalyzer doesn't surface the properties that shows these details.
I could look at PackageReferences, but these are not parsed in the
ProjectFile
class. It only shows if there are any references.This would be a small change and can help if the person analyzing a solution knows which test framework is used for a certain project.
There is also a more generic and robust way.
As far as I can determine, Visual Studio looks at the
IsTestProject
property that is inserted byNuGet packages like
xunit.core
orMicrosoft.NET.Test.Sdk
using a.props
file like this:For example, removing the last package reference containing this property from a project will immediately change the icon of a project in Visual Studio.
Currently, only the AnalyzeResults show this property after calling the expensive Build() method.
Is there a way to access the loaded .props using Buildalyzer?
The text was updated successfully, but these errors were encountered: