Skip to content

When using custom $(BaseIntermediateOutputPath) the build still picks files from obj/ #3485

Closed
@mcartoixa

Description

@mcartoixa

I 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions