Below you will find pages that utilize the taxonomy term “dotnet”
Posts
Issues and corresponding solutions of dotnet razor
Seperate view dll issues Put views (cshtml) into the main web project
'RazorTargetAssemblyInfo.cs' could not be found GenerateAssemblyVersionAttribute is set to true : af file MyProject.RazorTargetAssemblyInfo.cs is generated
<Project Sdk="Microsoft.NET.Sdk.Razor"> <PropertyGroup> <TargetFramework>netcoreapp3.1</TargetFramework> <GenerateAssemblyVersionAttribute>true</GenerateAssemblyVersionAttribute> </PropertyGroup> https://github.com/dotnet/aspnetcore/issues/37795#issue-1034241118
The namespace 'Razor' already contains a definition for 'Template' https://stackoverflow.com/a/58140724/1101691
Duplicate 'Microsoft.AspNetCore.Razor.Hosting.RazorLanguageVersionAttribute' attribute How to decompile/extract(cshtml--(razor view)) from dll https://stackoverflow.com/a/69951824/1101691
Posts
decompling dotnet assemblies
I used dotpeek for a while to decompile dotnet assembly. Only yesterday I finally found a way to export project from dotnet assembly. The picture below is the menu to do that in dotpeek. However the version I used doesn’t perfectly decompile lambda expression. The decompiled code of lambda expressions are very hard to understand.
Ilspy is one of decompiler that can decompile lambda in a understandble way.
Posts
Set timezone in asp.net 6.0 in linux container
According to many articles one the web, the way to set timezone is as following:
cp /usr/share/zoneinfo/Asia/Singapore /etc/localtime echo 'Asia/Singapore' > /etc/timezone You can indeed get the correct time if you run it in dotnet core 5 docker linux containers. However you couldn’t get the correct local time in dotnet 6.0. I found the issue About time incorrect of docker image about aspnet-6 #62545. After I tried serveral combinations mentioned in the issue, finally I got a working solution.