Questions tagged [dotnet-publish]

70 questions
2
votes
1 answer

What is the "MCD" configuration created as a result of the `dotnet publish` command?

When I apply the dotnet publish command I see three folders created in the bin folder: Debug, Release, and MCD. What exactly is the MCD configuration, and what is this configuration for?
usr2020
  • 324
  • 2
  • 8
2
votes
0 answers

Can't get .net Core 3.1 App deployed with dotnet publish nor msbuild

I stumble around a whole day trying to get a .net Core 3.1 App deployed with Jenkins. My solution until today was: dotnet publish "git/%SolutionPath%" -o "%WORKSPACE%/output/" -c Release -r win-x64 --self-contained true Today I had a new app an an…
Klamsi
  • 846
  • 5
  • 16
2
votes
0 answers

DotNet CLI publish command to include packages from other NuGet source

For one of my .Net Core project, I have a BuldProject.cmd CLI which publish the project. CLI Command I used is this dotnet publish --framework %DotNetCoreVersionToTarget% --configuration %ConfigurationModeToUse% --force --verbosity normal Above…
Anil D
  • 1,989
  • 6
  • 29
  • 60
1
vote
0 answers

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, better support... ?! can't answer that from docs. I…
1
vote
1 answer

.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 and with x86 arch use this command: dotnet…
Weiwei
  • 3,674
  • 1
  • 10
  • 13
1
vote
0 answers

Settings PE Header fields / Assembly Info with .NET Publish

Our company has been able to successfully modify the PE Header of our compiled binaries using a third-party tool called Resource Hacker over the last few years. It has been working really well for all C++ and C# binaries after the compilation…
1
vote
1 answer

Nothing to do. None of the projects specified contain packages to restore. dotnet publish

I am getting this message when I executed the dotnet publish command on cmd. "Nothing to do. None of the projects specified contain packages to restore." dotnet publish "/p:PublishProfile=Properties\PublishProfiles\PMIAdmin.pubxml" It is working…
Tolga Cakir
  • 725
  • 1
  • 7
  • 13
1
vote
0 answers

dotnet publish with --no-build broken after dotnet 7 upgrade

In our CI/CD pipeline we're using cake to script our builds. Those scripts have been working fine for years but have broken with the installation of the Visual Studio 17.4 which in turn installed dotnet 7 SDK along with MSBuild 17.4. I'm not sure…
Philippe
  • 1,949
  • 4
  • 31
  • 57
1
vote
1 answer

Exclude css isolation assets from dotnet publish

I'm using RazorPages (on ASP.NET Core 6) and the css isolation feature. The css files are generated at obj/{Debug,Release}/net6.0/scopedcss/Pages/, and are included when performing a dotnet publish. I also use Webpack, so I don't need to publish…
lonix
  • 14,255
  • 23
  • 85
  • 176
1
vote
0 answers

dotnet publish specific project with SolutionDir reference

I'm trying to publish a specific project which is part of a solution. Many of the projects in the solution have settings which depend on the $(SolutionDir) value, but this is not available when the command line only points to the .csproj file…
Andy
  • 3,631
  • 2
  • 23
  • 32
1
vote
1 answer

Unable to run self contained .net core 5.0 application

I have a .NET core 5.0 ASPNET Web API application. This application runs perfectly locally on Visual Studio. Now I am trying to publish the self contained app using following command: dotnet publish -c release testdb.sln --framework net5.0 --runtime…
SharpCoder
  • 18,279
  • 43
  • 153
  • 249
1
vote
1 answer

Asp.Net Core 5.0 Deploy by Plesk Panel issue

I'm trying to deploy my .net 5.0 targeted framework project via plesk panel. When I connect the plesk panel's database in my local system in debug mode the web site works just fine. My migrations sent to database automatically and created the…
AsIndeed
  • 138
  • 1
  • 13
1
vote
1 answer

Dotnet Publish to Same Folder

What is the expected behavior when different, independent .csproj projects are built/published to the same folder using dotnet publish? Imagine that Alpha.csproj might require NuGet package foo at 1.0.0, and that project Bravo.csproj might require…
Brent Arias
  • 29,277
  • 40
  • 133
  • 234
1
vote
1 answer

Cannot Notarize .net core app for macOS usage

I am trying to notarize my .net core application to run in MacOS devices, and when I notarize it I get the error of The executable does not have the hardened runtime enabled if I add the --options=runtime flag to my signing operation my console…
Igal Flegmann
  • 582
  • 1
  • 8
  • 19
1
vote
1 answer

How to skip Target in .csproj when --no-build is passed?

How can I stop commands in tags within a in my .csproj file from running when I run dotnet publish --no-build ...? Can I stop the entire section from being used? Sample:
Justin Harris
  • 1,969
  • 2
  • 23
  • 33