dotnet publish not working

Cezary Piątek's Avatar

Cezary Piątek

12 Apr, 2017 11:16 PM

Hi
I'm trying to publish my application using the following command

dotnet publish .\src\Dashboard\Dashboard.csproj -c Release -o .\bin\xxx --framework net46

the output looks as follows

C:\Program Files\dotnet\sdk\1.0.2\Microsoft.Common.CurrentVersion.targets(737,5): error : The OutputPath property is not set for project 'MvcPages.csproj'.  Please check to make sure that you have specified a valid combination of Configuration and Platform for this project.  Configuration='Release'  Platform='Any CPU'.  You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project. [C:\projects\maintainableselenium\src\MvcPages\MvcPages.csproj]
C:\Program Files\dotnet\sdk\1.0.2\Microsoft.Common.CurrentVersion.targets(737,5): error : The OutputPath property is not set for project 'VisualAssertions.csproj'.  Please check to make sure that you have specified a valid combination of Configuration and Platform for this project.  Configuration='Release'  Platform='Any CPU'.  You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project. [C:\projects\maintainableselenium\src\VisualAssertions\VisualAssertions.csproj]
C:\Program Files\dotnet\sdk\1.0.2\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.targets(92,5): error : Cannot find project info for 'C:\projects\maintainableselenium\src\MvcPages\MvcPages.csproj'. This can indicate a missing project reference. [C:\projects\maintainableselenium\src\Dashboard\Dashboard.csproj]

The same command work pretty well on my machine. How can I make dotnet publish work on AppVeyor?

P.S.
My application is available on github https://github.com/cezarypiatek/Tellurium/tree/SelfhostedDashboard

  1. Support Staff 1 Posted by Ilya Finkelshte... on 12 Apr, 2017 11:45 PM

    Ilya Finkelshteyn's Avatar

    It is hard to help with this amount of information.

    • What is specific version of dotnet tooling is installed on your machine where it works?
    • What is specific version of Visual Studio is installed on your machine where it works?
    • What build worker image are you using in AppVeyor?
    • Please send us link to your AppVeyor build.
    • Please send us your build configuration in YAML format (you can use Export YAML, as it seems you are using UI).

    Ilya.

  2. 2 Posted by Cezary Piątek on 13 Apr, 2017 05:25 AM

    Cezary Piątek's Avatar

    .NET version on my machine

    c:\SVN\Github\MaintainableSelenium\Src>dotnet
    
    Microsoft .NET Core Shared Framework Host
    
      Version  : 1.1.0
      Build    : 928f77c4bc3f49d892459992fb6e1d5542cb5e86
    

    I'm using Visual Studio 2017 (local and on AppVeyor as well)
    Failed build is available here https://ci.appveyor.com/project/cezarypiatek/maintainableselenium/b...

    ... and my config looks as follows

    version: 1.0.3.32{build}
    pull_requests:
      do_not_increment_build_number: true
    image: Visual Studio 2017
    configuration: Release
    platform: Any CPU
    assembly_info:
      patch: true
      file: '**\AssemblyInfo.*'
      assembly_version: '{version}'
      assembly_file_version: '{version}'
      assembly_informational_version: '{version}'
    before_build:
    - cmd: >-
        dotnet restore src
    
        cd .\Src\Dashboard\
    
        npm install
    
        cd ../../
    build:
      publish_wap: true
      verbosity: minimal
    before_package:
    - cmd: dotnet publish .\src\Dashboard\Dashboard.csproj -c Release -o .\bin\xxx --framework net462
    after_build:
    - ps: >-
        $version = "$($env:APPVEYOR_BUILD_VERSION)"
    
        $config="Release"
    
    
    
        .\Nuget\nuget pack .\Src\MvcPages\MvcPages.csproj.nuspec -NoPackageAnalysis -verbosity detailed -o ./ -Version $version -p Configuration=$config
    
        nuget pack .\Src\VisualAssertions\VisualAssertions.csproj.nuspec -NoPackageAnalysis -verbosity detailed -o ./ -Version $version -p Configuration=$config
    artifacts:
    - path: ./Tellurium.MvcPages.*.nupkg
    - path: ./Tellurium.VisualAssertions.*.nupkg
    
  3. Support Staff 3 Posted by Ilya Finkelshte... on 14 Apr, 2017 01:11 AM

    Ilya Finkelshteyn's Avatar

    Removing platform: Any CPU fixed that in my fork. This seems to be connected to historical discrepancy between Any CPU for solution and AnyCPU for project and manifest itself here as you call this command against .csproj file.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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