C
C#2y ago
john

How do i publish an asp.net Core application

I can't use dotnet publish as i use COM references, but i need a release build of my aspnetcore project with the Production appsettings
7 Replies
Cisien
Cisien2y ago
why can't you use dotnet publish? you probably need to set a runtime identifier. <RuntimeIdentifier>win-x64</RuntimeIdentifier> in your csproj, then dotnet publish -c Release -r win-x64 and maybe --self-contained or whatever else you want @johnk
john
john2y ago
Coz it’s got a COMReference and apparently only .NET framework MSBuild supports that It builds fine through visual studio
Cisien
Cisien2y ago
dotnet uses msbuild behind the scenes maybe try with dotnet msbuild -t publish (or however you call msbuild steps) -target:Publish
Cisien
Cisien2y ago
dotnet msbuild command - .NET CLI
The dotnet msbuild command provides access to the MSBuild command line.
Cisien
Cisien2y ago
dotnet publish command - .NET CLI
The dotnet publish command publishes a .NET project or solution to a directory.
Cisien
Cisien2y ago
GitHub
Add support for COMReference items on .NET Core · Issue #3986 · dot...
Steps to reproduce The following COM sample doesn&#39;t build from the dotnet command. It only builds from within Visual Studio. Command line dotnet build ExcelDemo.csproj Expected behavior The...
Cisien
Cisien2y ago
seems the solution is to use msbuild directly, and not through the dotnet cli one comment says msbuild /property:GenerateFullPaths=true /t:build /consoleloggerparameters:NoSummary worked for them you can probably target publish, or anything else you need
Want results from more Discord servers?
Add your server
More Posts