问题描述
这是我的代码:
Imports Microsoft.Owin.Hosting
Imports System
Module Program
Sub Main(args As String())
Const url As String = "http://localhost:9001"
Using WebApp.Start(url)
Console.WriteLine("Server started at:" & url)
Console.ReadLine()
End Using
End Sub
End Module
发生异常
解决方法
您的Using
语句语法错误。它应该类似于变量声明:
Imports Microsoft.Owin.Hosting
Imports System
Module Program
Sub Main(args As String())
Const url As String = "http://localhost:9001"
Using wa As New WebApp
wa.Start(url)
Console.WriteLine("Server started at:" & url)
Console.ReadLine()
End Using
End Sub
End Module
更多信息here。