-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Incremental build(?) gets in the way of Compile directive #1990
Comments
Ok so here it is https://github.com/NinoFloris/MSBuildIssue1990/tree/master |
fyi I've had success reducing build times by doing the entire workflow from MSBuild using a project file as build script: https://gist.github.com/dasMulli/69f5303aa79a8cd4060e44891c90fd2d (invoked via |
You didn't account for the exclusions of the From a diag log of your repro:
Leading to the double-definition of attributes errors. You can probably accomplish what you want with <Compile Include="../Tests/**/*.cs" Exclude="../**/bin/**;../**/obj/**" /> |
@dasMulli Nice, I'll try that some time. For us this solution actually solves another issue as well, which is something of our own making. @rainersigwald Quick response, that might just be the thing I need 😄, great! |
Tested and confirmed, thank you for your great reply @rainersigwald ^_^ |
Because of the slow msbuild times https://github.com/dotnet/cli/issues/5918, and because there is no up to date check in the project system yet dotnet/project-system#62 I'm trying to optimize our CI times in other creative ways.
In project.json times and until I got tired of it in msbuild times we just did as many
dotnet test projpath
as there were test projects, however currently this pointlessly rebuilds before everydotnet build/test/run/whatever
invocation. (even though incrementally built already msbuild still takes 2 seconds per project)This is why I've created a
Tests.All
project that, with some glue work and tricks, imports all code from our other test projects into one project so we can run justdotnet test Tests.All
saving heaps of time every test run.The build of
Tests.All
fails if any of the project's code that is included viaCompile Include
(so not a project reference) has been built before as part of its own project.It works if
Tests.All
is the 'first' project to be built (or after cleaning the obj/ folders of the compile included projects).I'll have a small repro up in a sec
What of course should happen is that this information is ignored if we are just including a project's code
The text was updated successfully, but these errors were encountered: