dotnet / dotnet/machinelearning-samples
Stop using version macros in sample projects
- Dominant language
- PowerShell
- Stars
- 4.7k
- Forks
- 2.7k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 1
Description
I am seeing [this pattern](https://github.com/dotnet/machinelearning-samples/blob/master/samples/csharp/getting-started/Ranking_Web/WebRanking/WebRanking.csproj#L9) in sample projects. I consider it an anti-pattern. You cannot just copy these samples and use them. We don't use this pattern elsewhere.
```csharp
```
The macros are defined in the root of the samples directory in [Directory.Build.props](https://github.com/dotnet/machinelearning-samples/blob/master/samples/Directory.Build.props).
I also found examples where it is [done wrong](https://github.com/dotnet/machinelearning-samples/blob/master/samples/csharp/getting-started/Regression_AutoML/TaxiFarePrediction/TaxiFarePrediction.csproj#L14):
```csharp
```
I made a [PR to add dependabot support for this project](https://github.com/dotnet/machinelearning-samples/pull/621). The dependabot model is a much better user experience than using these macros. The downside is that it will create a lot of PRs that need to be managed, but that's just a function of the number of samples provided.
Contributor guide
Assessment
This issue has not been assessed yet.