Click here to Skip to main content
15,439,290 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Rest API always return 401 status code Pin
Mou_kol10-Aug-22 5:08
MemberMou_kol10-Aug-22 5:08 
QuestionASP.NET Core MVC: How to secure token when passing with url Pin
Mou_kol9-Aug-22 4:23
MemberMou_kol9-Aug-22 4:23 
AnswerRe: ASP.NET Core MVC: How to secure token when passing with url Pin
Richard Deeming9-Aug-22 5:12
mveRichard Deeming9-Aug-22 5:12 
GeneralRe: ASP.NET Core MVC: How to secure token when passing with url Pin
Mou_kol10-Aug-22 0:58
MemberMou_kol10-Aug-22 0:58 
QuestionGet this error when returning view Pin
pkfox3-Aug-22 22:41
professionalpkfox3-Aug-22 22:41 
AnswerRe: Get this error when returning view Pin
Richard Deeming3-Aug-22 23:25
mveRichard Deeming3-Aug-22 23:25 
GeneralRe: Get this error when returning view Pin
pkfox3-Aug-22 23:40
professionalpkfox3-Aug-22 23:40 
QuestionWhat's the difference between dotnet publish -c Release vs -c Debug? Pin
DeltaOrionis29-Jul-22 11:47
MemberDeltaOrionis29-Jul-22 11:47 
Hi everyone,

I'm building my personal web site using ASP.Net and recently noticed something curious.
When publishing my project, it doesn't seem to matter if I use:
dotnet publish -c Release -o out
or
dotnet publish -c Debug -o out
Both commands will output (as far as I can tell) exactly the same binary. However shouldn't the release output be smaller/optimized?

Unfortunately I can't find much documentation regarding this config flag and as far as I can tell, the dotnet command is just passing it along to MSBuild which then select the proper configuration (profile?).

Does anyone know if it's supposed to work like that or am I doing something dumb?

PS: My csproj has nothing special in it as far as I can tell:
<Project Sdk="Microsoft.NET.Sdk.Web">

	<PropertyGroup>
		<TargetFramework>net6.0</TargetFramework>
		<ImplicitUsings>enable</ImplicitUsings>
	</PropertyGroup>

	<ItemGroup>
		<PackageReference Include="BuildBundlerMinifier" Version="3.2.449" />
		<PackageReference Include="Markdig" Version="0.30.2" />
		<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="6.0.7" />
		<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.7" />
		<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.7" />
		<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.7" />
		<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.7" />
		<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.7">
			<PrivateAssets>all</PrivateAssets>
			<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
		</PackageReference>
		<PackageReference Include="Microsoft.Extensions.Hosting.Systemd" Version="6.0.0" />
		<PackageReference Include="Microsoft.FeatureManagement.AspNetCore" Version="2.5.1" />
		<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.7" />
		<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.5" />
		<PackageReference Include="Serilog" Version="2.11.0" />
		<PackageReference Include="Serilog.AspNetCore" Version="6.0.1" />
		<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" />
		<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
	</ItemGroup>

</Project>

AnswerRe: What's the difference between dotnet publish -c Release vs -c Debug? Pin
Dave Kreskowiak31-Jul-22 12:53
mveDave Kreskowiak31-Jul-22 12:53 
GeneralRe: What's the difference between dotnet publish -c Release vs -c Debug? Pin
DeltaOrionis1-Aug-22 7:59
MemberDeltaOrionis1-Aug-22 7:59 
GeneralRe: What's the difference between dotnet publish -c Release vs -c Debug? Pin
Dave Kreskowiak1-Aug-22 8:31
mveDave Kreskowiak1-Aug-22 8:31 
GeneralRe: What's the difference between dotnet publish -c Release vs -c Debug? Pin
DeltaOrionis2-Aug-22 14:49
MemberDeltaOrionis2-Aug-22 14:49 
QuestionVb.Net and .Net Core 6 Books Pin
crmfghtr14-Jul-22 13:27
Membercrmfghtr14-Jul-22 13:27 
GeneralRe: Vb.Net and .Net Core 6 Books Pin
Richard MacCutchan14-Jul-22 21:13
mveRichard MacCutchan14-Jul-22 21:13 
AnswerRe: Vb.Net and .Net Core 6 Books Pin
Dave Kreskowiak15-Jul-22 8:11
mveDave Kreskowiak15-Jul-22 8:11 
AnswerRe: Vb.Net and .Net Core 6 Books Pin
Consuelo R. Bills3-Aug-22 23:57
MemberConsuelo R. Bills3-Aug-22 23:57 
QuestionHow to use BETWEEN in ASP.NET CORE EF? Pin
Khaled Mohamed Eissa7-Jul-22 3:07
MemberKhaled Mohamed Eissa7-Jul-22 3:07 
AnswerRe: How to use BETWEEN in ASP.NET CORE EF? Pin
Pete O'Hanlon7-Jul-22 3:29
mvaPete O'Hanlon7-Jul-22 3:29 
AnswerRe: How to use BETWEEN in ASP.NET CORE EF? Pin
jsc428-Jul-22 1:06
professionaljsc428-Jul-22 1:06 
QuestionAsp.net display numbers from loop on page Pin
KingRoyaltea7-Jun-22 2:24
MemberKingRoyaltea7-Jun-22 2:24 
Rant[REPOST] Asp.net display numbers from loop on page Pin
Richard Deeming7-Jun-22 3:16
mveRichard Deeming7-Jun-22 3:16 
QuestionAsp.net display numbers from loop on page Pin
KingRoyaltea6-Jun-22 4:12
MemberKingRoyaltea6-Jun-22 4:12 
AnswerRe: Asp.net display numbers from loop on page Pin
Richard MacCutchan6-Jun-22 4:21
mveRichard MacCutchan6-Jun-22 4:21 
AnswerRe: Asp.net display numbers from loop on page Pin
Dave Kreskowiak7-Jun-22 7:47
mveDave Kreskowiak7-Jun-22 7:47 
Question.NET SDK that provides side by side comparison and navigation in document pages Pin
Member 1564342420-May-22 2:57
MemberMember 1564342420-May-22 2:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.