Dotnet build and publish don't have parameters for platform
See original GitHub issueSteps to reproduce
Have a csproj file with conditional configs as such:
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
Expected behavior
There’s a configuration parameter (dotnet build -c Debug
) (dotnet publish -c Debug
) that fills in $(Configuration)
so I expect there to be a parameter to fill in $(Platform)
Actual behavior
There is no parameter and specific configuration details don’t get applied because Platform does not get set to x64
Current Work-around
Explicitly setting the Platform EV for the current command prompt using
SET Platform=x64
Issue Analytics
- State:
- Created 5 years ago
- Reactions:8
- Comments:20 (8 by maintainers)
Top Results From Across the Web
dotnet publish command - .NET CLI
Any parameters passed to dotnet publish are passed to MSBuild. The -c and -o parameters map to MSBuild's Configuration and PublishDir properties ...
Read more >dotnet publish commandline with platform parameter value ...
Build parameters are passed to msbuild via the dotnet command using the following syntax: /p:Platform="Any CPU".
Read more >10 commands you don't want to be without in .Net Core
Here's a full list of commands that runs restore implicitly: dotnet new; dotnet build; dotnet build-server; dotnet run; dotnet test; dotnet publish; dotnet...
Read more >.NET | TeamCity On-Premises Documentation
Parameter references are supported. If you have a finished build, you can use the file/directory selector here. Framework. Target framework.
Read more >API - DotNetPublishSettings Class
Gets or sets a value indicating whether to bundle all content when publishing a platform-specific single-file executable. This will extract all files before ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You can pass it using
dotnet build /p:Platform=x64
Shouldn’t that be added to the documentation then?