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 appsettings7 Replies
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
@johnkCoz it’s got a COMReference and apparently only .NET framework MSBuild supports that
It builds fine through visual studio
dotnet uses msbuild behind the scenes
maybe try with dotnet msbuild -t publish (or however you call msbuild steps)
-target:Publish
dotnet msbuild command - .NET CLI
The dotnet msbuild command provides access to the MSBuild command line.
dotnet publish command - .NET CLI
The dotnet publish command publishes a .NET project or solution to a directory.
i guess this, huh? https://github.com/dotnet/msbuild/issues/3986
GitHub
Add support for COMReference items on .NET Core · Issue #3986 · dot...
Steps to reproduce The following COM sample doesn't build from the dotnet command. It only builds from within Visual Studio. Command line dotnet build ExcelDemo.csproj Expected behavior The...
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