Skip to content

.NET Core 3.0 Preview behaviour for --output differs #12486

Closed

Description

@mohag

--output is relative to the current working directory instead of the .csproj file. This does not seem to be documented here or under What's New


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Activity

  1. Thraka commented on May 22, 2019

    @Thraka
    Contributor

    Thank you for reporting this. I've confirmed the behavior.

  2. Thraka commented on May 22, 2019

    @Thraka
    Contributor

    Assigning to @mairaw as part of the CLI updates.

  3. added this to the Backlog milestone on May 22, 2019
  4. gzinger commented on Aug 19, 2019

    @gzinger

    if output folder is specified for a solution all the outputs get dumped into that single folder. Previously, it would do each project into separate folder.

  5. mohag commented on Aug 20, 2019

    @mohag
    Author

    @gzinger I was kind of wondering about that... Haven't tested that, we mostly build the .csprojs directly...

  6. Thraka commented on Aug 20, 2019

    @Thraka
    Contributor

    @gzinger Please file a bug on the CLI code repo: https://github.com/dotnet/cli

    Not a bug but a breaking change.

  7. 46 remaining items

  8. tdykstra commented on Apr 8, 2020

    @tdykstra
    Contributor

    I'm not seeing that behavior. What SDK version are you using?

  9. the-vampiire commented on Apr 8, 2020

    @the-vampiire

    @tdykstra

    $ dotnet --info
    
    .NET Core SDK (reflecting any global.json):
     Version:   3.1.102
     Commit:    573d158fea
    
    Runtime Environment:
     OS Name:     Mac OS X
     OS Version:  10.14
     OS Platform: Darwin
     RID:         osx.10.14-x64
     Base Path:   /usr/local/share/dotnet/sdk/3.1.102/
    
    Host (useful for support):
      Version: 3.1.2
      Commit:  916b5cba26
    
    .NET Core SDKs installed:
      3.1.102 [/usr/local/share/dotnet/sdk]
    
    .NET Core runtimes installed:
      Microsoft.AspNetCore.App 3.1.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
      Microsoft.NETCore.App 2.1.16 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
      Microsoft.NETCore.App 3.1.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  10. dasMulli commented on Apr 9, 2020

    @dasMulli
    Contributor

    @the-vampiire that's exactly what i explained above. you will see this behavior when publishing to a directory next to the csproj.
    To resolve this issue, publish to a directory outside your project directory.

    @tdykstra this happens with most web projects that mark json (and other) files as content for publishing. Once content was published into the directory of the csproj file, it will pick them up again during the next run.

  11. dasMulli commented on Apr 9, 2020

    @dasMulli
    Contributor

    Sdk issue: dotnet/sdk#8786

    Alternative is to exclude the directory in the csproj file as metioned in dotnet/sdk#8786 (comment)

  12. tdykstra commented on Apr 9, 2020

    @tdykstra
    Contributor

    @dasMulli Thank you for the explanation! Do you have any idea why I'm not able to repro the behavior? Does it depend on a certain setting in .csproj? If I can clearly describe the criteria for making it happen, I can add a warning/explanation in the dotnet publish documentation.

  13. dasMulli commented on Apr 9, 2020

    @dasMulli
    Contributor

    It should repro with:

    dotnet new web -o testweb
    cd testweb
    dotnet publish -o myoutput
    dotnet publish -o myoutput

    And observe that there will be nested myouptut folders (b/c the build logic thinks the existing myoutput folder is part of your project on subsequent runs).

    It should happen for all projects using web SDKs (so Worker, Web - not sure about Razor library SDK)

  14. tdykstra commented on Apr 9, 2020

    @tdykstra
    Contributor

    Thanks, I didn't realize it had to be a web project. I'll reopen this issue and add mention of this behavior to the documentation.

  15. dasMulli commented on Apr 9, 2020

    @dasMulli
    Contributor

    Maybe create a new issue, that's current behavior since 1.0 i think :)

  16. the-vampiire commented on Apr 10, 2020

    @the-vampiire

    thanks @dasMulli i missed your message from before. that was definitely the issue.

    and thanks @tdykstra for adding a warning. i was really confused because this wasnt documented anywhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions