AppVeyor not detecting .NetStandard / Core project in multi project solution

mvadu's Avatar

mvadu

Mar 08, 2017 @ 01:35 AM

I have a solution with 4 projects. (Seen here: https://github.com/AdysTech/InfluxDB.Client.Net/tree/NetCoreSupport)
1. a classic .Net 4.5 class library
2. netstandard class library targeting 1.6 (using csproj syntax supported by latest dotnet)
3. MS Test project linking to .Net 4.5
4. netcore test project referencing netstandard project. (again csproj file)

I am using dotnet-dev-1.0.0-preview2.1-003177 included with Visual Studio 2017 RC. I am using the appveyor.yml from same branch. For some reason AppVeyor only detects .Net 4.5 part of the solution and works fine. Could you please guide me to enable building both solution projects, and executing both test projects?

  1. 1 Posted by Ilya Finkelshte... on Mar 09, 2017 @ 12:37 AM

    Ilya Finkelshteyn's Avatar

    Hello,

    I enabled Visual Studio 2017 RC build worker image for you and sent PR to configure it. This should help.

    Ilya.

  2. 2 Posted by Ilya Finkelshte... on Mar 09, 2017 @ 12:39 AM

    Ilya Finkelshteyn's Avatar

    Note that you may need to do the same changes in NetCoreSupport branch to test it first.

  3. 3 Posted by mvadu on Mar 09, 2017 @ 03:38 AM

    mvadu's Avatar

    Thank you.. I merged the PR, and have few problems:
    1. Initially it was still using Nuget restore, which made it to fail
    2. Changed it to dotnet restore and it still failed in the build stage as msbuild is not able to compile the core project

    In my dev machine, running the same commands on the solution folder works just fine:

    C:\Users\adars\Source\Repos\InfluxDB.Client.Net>dotnet restore
    
    Welcome to .NET Core!
    ---------------------
    Learn more about .NET Core @ https://aka.ms/dotnet-docs. Use dotnet --help to see available commands or go to https://aka.ms/dotnet-cli-docs.
    
    Telemetry
    --------------
    The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include command-line arguments. The data is collected by Microsoft and shared with the community.
    You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell.
    You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-telemetry.
    
    Configuring...
    -------------------
    A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once.
    Decompressing 100% 7290 ms
    Expanding 100% 114876 ms
      Restoring packages for C:\Users\adars\Source\Repos\InfluxDB.Client.Net\src\AdysTech.InfluxDB.Client.Net.Core\AdysTech.InfluxDB.Client.Net.Core.csproj...
      Restoring packages for C:\Users\adars\Source\Repos\InfluxDB.Client.Net\tests\AdysTech.InfluxDB.Client.Net.Core.Test\AdysTech.InfluxDB.Client.Net.Core.Test.csproj...
      Generating MSBuild file C:\Users\adars\Source\Repos\InfluxDB.Client.Net\src\AdysTech.InfluxDB.Client.Net.Core\obj\AdysTech.InfluxDB.Client.Net.Core.csproj.nuget.g.props.
      Writing lock file to disk. Path: C:\Users\adars\Source\Repos\InfluxDB.Client.Net\src\AdysTech.InfluxDB.Client.Net.Core\obj\project.assets.json
      Restore completed in 1.69 sec for C:\Users\adars\Source\Repos\InfluxDB.Client.Net\src\AdysTech.InfluxDB.Client.Net.Core\AdysTech.InfluxDB.Client.Net.Core.csproj.
      Generating MSBuild file C:\Users\adars\Source\Repos\InfluxDB.Client.Net\tests\AdysTech.InfluxDB.Client.Net.Core.Test\obj\AdysTech.InfluxDB.Client.Net.Core.Test.csproj.nuget.g.props.
      Writing lock file to disk. Path: C:\Users\adars\Source\Repos\InfluxDB.Client.Net\tests\AdysTech.InfluxDB.Client.Net.Core.Test\obj\project.assets.json
      Restore completed in 2.95 sec for C:\Users\adars\Source\Repos\InfluxDB.Client.Net\tests\AdysTech.InfluxDB.Client.Net.Core.Test\AdysTech.InfluxDB.Client.Net.Core.Test.csproj.
    
      NuGet Config files used:
          C:\Users\adars\AppData\Roaming\NuGet\NuGet.Config
          C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.Offline.config
    
      Feeds used:
          https://api.nuget.org/v3/index.json
          C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\
    
    C:\Users\adars\Source\Repos\InfluxDB.Client.Net>dotnet build
    Microsoft (R) Build Engine version 15.1.545.13942
    Copyright (C) Microsoft Corporation. All rights reserved.
    
      AdysTech.InfluxDB.Client.Net.Core -> C:\Users\adars\Source\Repos\InfluxDB.Client.Net\src\AdysTech.InfluxDB.Client.Net.Core\bin\Debug\netstandard1.6\AdysTech.InfluxDB.Client.Net.Core.dll
      AdysTech.InfluxDB.Client.Net -> C:\Users\adars\Source\Repos\InfluxDB.Client.Net\src\AdysTech.InfluxDB.Client.Net\bin\Debug\AdysTech.InfluxDB.Client.Net.dll
      AdysTech.InfluxDB.Client.Net.Test -> C:\Users\adars\Source\Repos\InfluxDB.Client.Net\tests\AdysTech.InfluxDB.Client.Net.Test\bin\Debug\InfluxDB.Client.Test.dll
      AdysTech.InfluxDB.Client.Net.Core.Test -> C:\Users\adars\Source\Repos\InfluxDB.Client.Net\tests\AdysTech.InfluxDB.Client.Net.Core.Test\bin\Debug\netcoreapp1.0\AdysTech.InfluxDB.Client.Net.Core.Test.dll
    
    Build succeeded.
        0 Warning(s)
        0 Error(s)
    
    Time Elapsed 00:00:19.79
    
    C:\Users\adars\Source\Repos\InfluxDB.Client.Net>
    

    How do I force the build to use dotnet build instead of msbuild

  4. 4 Posted by Ilya Finkelshte... on Mar 10, 2017 @ 03:54 AM

    Ilya Finkelshteyn's Avatar

    As I said you need this change in NetCoreSupport branch too. I sent another PR, I hope you get the idea.

    As you can see this build went OK in my fork.

    I would not recommend dotnet build for mixed solution, but if you really want it, you can run any command you like as build_script. Note that automatic build and nuget packaging will not work if you choose build_script. To get right syntax you can set it in UI, and then use Export YAML. But again for your case automatic msbuild should be just fine.

  5. Ilya Finkelshteyn closed this discussion on Aug 25, 2018 @ 02:15 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac