Skip to content

CLI should support building a VS solution that includes non .NET Core projects #7622

Closed as not planned

Description

@dazhao-msft

If a VS solution contains both .NET Core projects and non .NET Core projects, CLI commands such as 'dotnet restore', 'dotnet publish' won't work against the solution, since the CLI doesn't have necessary MSBuild targets to build those non .NET Core projects.

CLI should be able to detect which projects are .NET Core and only execute commands against them . We can keep the current behavior as default and introduce a new flag the enable this 'partial build' behavior.

Activity

  1. TheRealPiotrP commented on Jan 30, 2017

    @TheRealPiotrP

    @dazhao-msft yea, we really wanted to do something with this for 1.0.0 but there wasn't enough time. In the future we'd actually like to allow the Windows CLI to carry a copy of Desktop MSBuild + targets to fully light up this scenario. Moving to 2.0.0, for now, however.

  2. JamesNK commented on Feb 11, 2017

    @JamesNK
    Member

    This is useful for me. With project.json I could compile PCL and net20 assemblies from dotnet CLI. Now my build script requires VS2017 to be installed so I can use its msbuild to restore/build/pack my csproj. And I have the additional challenge to file the path to VS2017's msbuild. Very annoying compared to just using the CLI.

  3. JamesNK commented on Mar 16, 2017

    @JamesNK
    Member

    When is 2.0 expected to be out? This feature is the one thing blocking me from adopting dotnet cli completely with Newtonsoft.Json.

  4. eerhardt commented on Mar 30, 2017

    @eerhardt
    Member

    @JamesNK - which type of projects are blocking you from adopting dotnet cli completely? Is it only Docker? Or is it a different type of SDK that isn't available?

  5. JamesNK commented on Mar 30, 2017

    @JamesNK
    Member

    I have Portable class library targets I want to compile on my build server with CLI. Right now they aren't supported.

  6. JamesNK commented on Apr 2, 2017

    @JamesNK
    Member

    More info:

    I want to be able to compile all of this project with CLI - https://github.com/JamesNK/Newtonsoft.Json/blob/aa5f28c09732db5fb3e316433547ea7cdecd8804/Src/Newtonsoft.Json/Newtonsoft.Json.Roslyn.csproj

    Today I have to set DotnetOnly to true when compiling with CLI to avoid errors when building PCL targets.

    <TargetFrameworks Condition="'$(DotnetOnly)'==''">net45;net40;net35;net20;netstandard1.0;netstandard1.3;portable-net45+win8+wpa81+wp8;portable-net40+win8+wpa81+wp8+sl5</TargetFrameworks>
    <TargetFrameworks Condition="'$(DotnetOnly)'=='true'">netstandard1.0;netstandard1.3</TargetFrameworks>
    

    But not compiling everything means I can't use new CLI features like building a NuGet package from a csproj.

  7. clairernovotny commented on Apr 2, 2017

    @clairernovotny

    Somehow I doubt the old portable targets and reference assemblies will ever make it into the SDK builds, at least not until there's an acquisition story around SDK's that aren't in-box.

  8. clairernovotny commented on Apr 2, 2017

    @clairernovotny

    And your build server can do it all, including build a nupkg, but you need VS 2017 installed on it (possibly just the VS 2017 build tools, but haven't checked what's in them...)

    Then just run msbuild /t:restore Newtonsoft.Json.Roslyn.csproj, msbuild /t:pack Newtonsoft.Json.Roslyn.csproj and it'll restore, build and pack it.

  9. transferred this issue fromdotnet/clion Jan 31, 2020
  10. added this to the Backlog milestone on Jan 31, 2020
  11. github-actions commented on Apr 25, 2024

    @github-actions
    Contributor

    Due to lack of recent activity, this issue has been labeled as 'stale'. It will be closed if no further activity occurs within 30 more days. Any new comment will remove the label.

  12. github-actions commented on May 26, 2024

    @github-actions
    Contributor

    This issue will now be closed since it has been labeled 'stale' without activity for 30 days.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions