https://github.com/mevdschee/aspnetcorevb
The example "ASP.Net Core Web Application" ported from C# to Visual Basic
https://github.com/mevdschee/aspnetcorevb
Last synced: 4 months ago
JSON representation
The example "ASP.Net Core Web Application" ported from C# to Visual Basic
- Host: GitHub
- URL: https://github.com/mevdschee/aspnetcorevb
- Owner: mevdschee
- License: mit
- Created: 2017-08-19T12:13:11.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-19T18:20:22.000Z (over 7 years ago)
- Last Synced: 2025-05-08T04:12:36.578Z (8 months ago)
- Language: C#
- Homepage:
- Size: 752 KB
- Stars: 7
- Watchers: 6
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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.