Skip to content

TargetFramework doesn't appended when using arguments /p:Outdir="absolutePath" #4630

@alexey-gusarov

Description

@alexey-gusarov

Steps to reproduce

Example of a project sample:

Project file

<Project Sdk="Microsoft.NET.Sdk">


  <PropertyGroup>
    <TargetFrameworks>netstandard1.0;net35</TargetFrameworks>

    <RootNamespace>MyNamespace</RootNamespace>
    <AssemblyName>MyNamespace.Interfaces</AssemblyName>

  </PropertyGroup>


</Project>

Directory contents:

/
- IInterface.cs

Command line

msbuild interfaces\Interfaces.csproj /p:Outdir=c:\build\out  /p:GenerateProjectSpecificOutputFolder=True

Expected behavior

c:\build\out contains folder Interfaces with next structure:

C:\build\out\Interfaces>dir /s
 Volume in drive C has no label.
 Volume Serial Number is F685-B403

 Directory of C:\build\out\Interfaces

19.08.2019  01:30    <DIR>          .
19.08.2019  01:30    <DIR>          ..
19.08.2019  01:30    <DIR>          net35
19.08.2019  01:30    <DIR>          netstandard1.0
               0 File(s)              0 bytes

 Directory of C:\build\out\Interfaces\net35

19.08.2019  01:30    <DIR>          .
19.08.2019  01:30    <DIR>          ..
19.08.2019  01:18             3 584 MyNamespace.Interfaces.dll
19.08.2019  01:18               232 MyNamespace.Interfaces.pdb
               2 File(s)          3 816 bytes

 Directory of C:\build\out\Interfaces\netstandard1.0

19.08.2019  01:30    <DIR>          .
19.08.2019  01:30    <DIR>          ..
19.08.2019  01:18            14 914 MyNamespace.Interfaces.deps.json
19.08.2019  01:18             4 096 MyNamespace.Interfaces.dll
19.08.2019  01:18               232 MyNamespace.Interfaces.pdb
               3 File(s)         19 242 bytes

     Total Files Listed:
               5 File(s)         23 058 bytes
               8 Dir(s)  22 367 154 176 bytes free

Actual behavior

All files move to Interfaces directory:

C:\build\out\Interfaces>dir /s
 Volume in drive C has no label.
 Volume Serial Number is F685-B403

 Directory of C:\build\out\Interfaces

19.08.2019  01:31    <DIR>          .
19.08.2019  01:31    <DIR>          ..
19.08.2019  01:31            14 914 MyNamespace.Interfaces.deps.json
19.08.2019  01:18             3 584 MyNamespace.Interfaces.dll
19.08.2019  01:18               232 MyNamespace.Interfaces.pdb
               3 File(s)         18 730 bytes

     Total Files Listed:
               3 File(s)         18 730 bytes
               2 Dir(s)  22 367 391 744 bytes free

Environment data

msbuild /version output:

Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

15.9.21.664

and

Microsoft (R) Build Engine version 16.3.0-preview-19377-01+dd8019d9e for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

16.300.19.37701

interfaces.zip

OS info:
C:\build\out\Interfaces>ver

Microsoft Windows [Version 10.0.17763.615]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions