Questions tagged [dotnet-publish]
The dotnet-publish tag has no usage guidance.
dotnet-publish
76
questions
0
votes
1
answer
54
views
How do I run npm build as part of dotnet publish
I have an ASP.NET Core 8 web project, where the client source code lives in a client folder.
I also have an npm run build that will compile those client files, and copy the output to the wwwroot ...
0
votes
0
answers
40
views
dotnet publish command takes too long to execute for a console application
I am working on two source code file (say, file A.cs and B.cs) console application, where file A has some common classes and a main method, which calls a method in file B. I have a basic .csproj file,
...
0
votes
1
answer
43
views
.NET Publish in Azure Pipelines overwrites first publish on second run
I have the following code in azure-pipelines.yml to publish 2 projects:
trigger:
branches:
include:
- main
pool:
vmImage: 'windows-latest'
steps:
- task: UseDotNet@2
displayName: '...
0
votes
0
answers
25
views
How to remove the extra runtimes created by the .NET SDK CLI publish command
I am learning .NET SDK CLI tools for building dotnet software written in C#.
Here i am using .NET SDK CLI x64 running on .NET 8 on Windows 10
I have created a simple console command line project ...
0
votes
1
answer
22
views
How to write batch files correctly for publication Adding different precompiled macros during .NET programming?
I have the following code:
#if PC
var rootPath = Path.Combine("dist");
#else
var rootPath = Path.Combine(@"/bin/bash");
#endif
I want to write different batch files when ...
0
votes
1
answer
435
views
Publish WinUi 3 application as single file does not work for unpacked application?
I have a WinUi 3 (c#)solution that contains 3 projects: A, B, C.
A: main application(exe) depends on B,C.
B: dll project depends on C.
c: dll project.
Now I like to build the solution as a unpacked ...
0
votes
2
answers
394
views
Trouble escaping double quotes in Azure pipelines DotNetCoreCLI task
I'm trying to publish my .NET web app using the somewhat new built-in container support for the .NET SDK. In order to set the container image tags I need to pass a parameter in the arguments. This ...
1
vote
1
answer
380
views
In .NET 8, trying to build a CLI program with dotnet publish
I’m using dotnet publish to build a CLI program called showperms. It runs, but not if I copy the executable by itself to somewhere else, such as to /usr/local/bin/. It needs one or more other files ...
0
votes
0
answers
57
views
Error Publishing with /p:PublishSingleFile=true Flag with .NET Core 3.1 WPF project
I have a .NET Core 3.1 WPF Project.
I get this error - what does the "with the same BundleRelativePath" mean?
C:\Program Files\dotnet\sdk\7.0.300-preview.23122.5\Sdks\Microsoft.NET.Sdk\...
3
votes
1
answer
336
views
Publish a nuget in Github Packages using an Application Installation Token
I am trying to publish a Nuget package for an organization in Github using dotnet publish.
We are planning publish packages from a Github actions from a repository in one organisation to the packages ...
2
votes
2
answers
3k
views
Dockerise ASP.NET Core app with Alpine image
I want my dockerised ASP.NET Core 7 app based on Alpine (not ASP.NET Core Runtime).
MyApp.csproj contains:
<PublishSingleFile>true</PublishSingleFile>
<RuntimeIdentifier>linux-musl-...
0
votes
1
answer
349
views
Azure Pipelines with dotnet publish fails finding apphost.exe
While publishing an application on azure pipelines, I encounter the following problem.
/opt/hostedtoolcache/dotnet/sdk/6.0.412/Microsoft.Common.CurrentVersion.targets(5097,5): error MSB3030: Could not ...
1
vote
0
answers
52
views
What is the difference in publishing dotnet apps for ubuntu using specific ubuntu RIDs instead of non-distribution specific linux-x64?
What difference does it make, if any, publishing a dotnet application for ubuntu using, say,
dotnet publish [...] -r ubuntu.20.04
instead of
dotnet publish [...] -r linux-x64
Performance tweaks, ...
1
vote
1
answer
251
views
.NET 6.0 x86 app doesn't set registry key successful
We want to set the OnlyUseLatestCLR registry key with a .NET 6.0 app. This app will run on both x86 and x64 machines and the machines won't have .NET 6 installed. So we publish this app as single file ...
1
vote
0
answers
147
views
Using a .NET7 project how to pass in ContainerEnvironmentVariable parameter via command line for the donet publish command?
With .NET7 we can use the dotnet publish command to build a docker container. How do you pass in environment variables via the command line?
You can use the following to build the container and ...