问题
In DevOps you can create a dotnet build
task where "Path to project(s)" can be set to **/*.csproj
to build all the projects.
This works just fine, but it (obviously) also builds my *.Test.csproj
projects.
I found some posts mentioning exclude patterns, so I tried doing the same as in those posts and tried the following combinations:
**/*.csproj;-**/*.Test.csproj
**/*.csproj;!**/*.Test.csproj
**/*.csproj;-:**/*.Test.csproj
**/*.csproj;!:**/*.Test.csproj
For all attempts I get the following error in the DevOps log:
Project file(s) matching the specified pattern were not found.
So, how can I create a dotnet build
task to build all my projects except the *.Test.csproj
projects?
回答1:
here's what I've been using to run all tests except for some of them:
Test/**/*.csproj
!**/*.Billing.Test.csproj
!**/*.Queues.Test.csproj
!**/*.WidgetDataProvider.Test.csproj
so by the same token you need to use:
**/*.csproj
!**/*.Test.csproj
as far as I understand, order matter, so this will not work:
!**/*.Test.csproj
**/*.csproj
来源:https://stackoverflow.com/questions/56614548/build-all-csproj-files-except-test-projects