Aspnetcorevb
The example "ASP.Net Core Web Application" ported from C# to Visual Basic
Install / Use
/learn @mevdschee/AspnetcorevbREADME
ASP.Net Core Web Application in Visual Basic
I ported the example "ASP.Net Core Web Application" from C# to VB.net. It is (successfully) using Razor .cshtml files in a VB project. I have ensured it is compatible with ASP.Net Core 2.1.
When you run this code using 'dotnet run' you will encounter:
fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1]
An unhandled exception has occurred while executing the request.
Microsoft.AspNetCore.Mvc.Razor.Compilation.CompilationFailedException: One or more compilation failures occurred:
wjrfi1bi.4iy(1,1): error CS8301: Invalid name for a preprocessing symbol; ',NETCOREAPP,NETCOREAPP2_1' is not a valid identifier
at Microsoft.AspNetCore.Mvc.Razor.Internal.RazorViewCompiler.CompileAndEmit(RazorCodeDocument codeDocument, String generatedCode)
at Microsoft.AspNetCore.Mvc.Razor.Internal.RazorViewCompiler.CompileAndEmit(String relativePath)
at Microsoft.AspNetCore.Mvc.Razor.Internal.RazorViewCompiler.OnCacheMiss(String normalizedPath)
--- End of stack trace from previous location where exception was thrown ---
Due to the file 'bin/Debug/netcoreapp2.1/App.deps.json' having:
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v2.1",
"signature": "8d19439ef22c432fe18f0eac697c8789fe30c00a"
},
"compilationOptions": {
"defines": [
",NETCOREAPP,NETCOREAPP2_1"
Remove ,NETCOREAPP, (including the commas) in the last line and run again with 'dotnet run'.
Other than that it seems to work with cshtml, as there seems to be no vbhtml support yet.
Related Skills
node-connect
347.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
