dotnet / sdk

Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI
https://dot.net/core
MIT License
2.72k stars 1.07k forks source link

how to publish specific platform wpf APP WITH specific nuget package #14162

Open heartacker opened 4 years ago

heartacker commented 4 years ago

Issue Title

Be as descriptive as you can with your title.

General

my app has different reference with different platform. and i can build and debug using VS2019, but i can't publish it using dotnet cli dotnet publish

that is csproj file

  <ItemGroup>
    <PackageReference Include="pythonnet_netstandard_py37_win" Version="2.5.1" Condition="'$(Platform)' == 'x64'"/>
    <PackageReference Include="pythonnet_netstandard_py37_win_x86" Version="2.5.1" Condition="'$(Platform)' == 'x86'"/>
  </ItemGroup>

my cli cmd:

cd /d %~dp0
dotnet publish -o ./TPMS.sln.Release/bin -c Release -r win-x64 --no-self-contained ../ATC.TPMS.GUI/ATC.TPMS.GUI.csproj
dotnet publish -o ./TPMS.sln.Release/bin_x86 -c Release -r win-x86 --no-self-contained ../ATC.TPMS.GUI/ATC.TPMS.GUI.csproj

image

dsplaisted commented 3 years ago

Hi @heartacker,

Could you share a binlog of the failing publish?