You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
.NET Core 3.0 Preview behaviour for --output differs #12486
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.
Reacted by Gert van den Berg, Ger Murphy, rcollina and Will Meade
@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.
@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.
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)
Activity
Thraka commentedon May 22, 2019
Thank you for reporting this. I've confirmed the behavior.
Thraka commentedon May 22, 2019
Assigning to @mairaw as part of the CLI updates.
gzinger commentedon Aug 19, 2019
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.
mohag commentedon Aug 20, 2019
@gzinger I was kind of wondering about that... Haven't tested that, we mostly build the
.csprojs directly...Thraka commentedon Aug 20, 2019
@gzinger Please file a bug on the CLI code repo: https://github.com/dotnet/cliNot a bug but a breaking change.
46 remaining items
tdykstra commentedon Apr 8, 2020
I'm not seeing that behavior. What SDK version are you using?
the-vampiire commentedon Apr 8, 2020
@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]dasMulli commentedon Apr 9, 2020
@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.
dasMulli commentedon Apr 9, 2020
Sdk issue: dotnet/sdk#8786
Alternative is to exclude the directory in the csproj file as metioned in dotnet/sdk#8786 (comment)
tdykstra commentedon Apr 9, 2020
@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.
dasMulli commentedon Apr 9, 2020
It should repro with:
dotnet new web -o testweb cd testweb dotnet publish -o myoutput dotnet publish -o myoutputAnd 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)
tdykstra commentedon Apr 9, 2020
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.
dasMulli commentedon Apr 9, 2020
Maybe create a new issue, that's current behavior since 1.0 i think :)
the-vampiire commentedon Apr 10, 2020
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