When using custom $(BaseIntermediateOutputPath) the build still picks files from obj/
See original GitHub issueI like to customize $(BaseIntermediateOutputPath)
on my build servers to a centralized location so that I am very sure to start from fresh (just delete the folder and there you go).
On a development machine, Visual Studio generates files (e.g. AssemblyInfo.cs
) in the default folder, (obj/
, inside the project folder). When trying the build server script, it regenerates those files in the customized $(BaseIntermediateOutputPath)
folder but it stills picks up the default ones that have been generated before for compilation…
My workaround is to add the following property on my projects in the build server script: DefaultItemExcludesInProjectFolder=bin/**;obj/**
. My use case might be a fringe one, but I think these folders should be excluded by default, in a hardcoded way (cf. https://github.com/dotnet/sdk/blob/master/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.DefaultItems.targets#L39).
Using .NET Core 3.0 preview 7.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (4 by maintainers)
This is what Directory.Build.props is now for - making it easy to apply configuration to multiple projects at once without editing a lot.
E.g. a file like this
Would redirect the output of all the project files in subdirectories.
Changing the build infrastructure completely between “inner loop” and CI builds is possible, but I personally don’t think it is a good idea to do so. If the problem arises from the devs running CI scripts locally, then I believe the devs should use a similar setup during development and have an understanding of their setup (>DevOps). Your opinion on this may be different, I’d be interested to hear it.
Can you customize
BaseIntermediateOutputPath
for both the build servers as well as the development machine? That’s what we do in this repo, for example, everything goes in theartifacts
folder at the root of the repo.