I have this code where it’s calling a code in dotvvm project.
<Assembly: OwinStartup(GetType(Startup))>
Public Class Startup
Public Sub Configuration(app As IAppBuilder)
Dim dotvvmAppLocation = Path.GetFullPath(Path.Combine(HostingEnvironment.ApplicationPhysicalPath, ConfigurationManager.AppSettings("dotvvm:AppLocation")))
'AppBuilderUseExtensions.Use(app, Function(context, [next])
' ' Depending on the handler the request gets mapped to, session might not be enabled. Force it on.
' Dim httpContext As HttpContextBase = context.[Get](Of HttpContextBase)(GetType(HttpContextBase).FullName)
' httpContext.SetSessionStateBehavior(SessionStateBehavior.Required)
' Return [next]()
' End Function)
'app.UseStageMarker(PipelineStage.MapHandler)
' For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=316888
app.CreatePerOwinContext(AddressOf ApplicationDbContext.Create)
app.CreatePerOwinContext(Of ApplicationUserManager)(AddressOf ApplicationUserManager.Create)
'app.CreatePerOwinContext(Of ApplicationSignInManager)(AddressOf ApplicationSignInManager.Create)
app.CreatePerOwinContext(AddressOf DotVVMApplicationDbContext.Create)
app.CreatePerOwinContext(Of DotVVMApplicationUserManager)(AddressOf DotVVMApplicationUserManager.Create)
app.UseCookieAuthentication(New CookieAuthenticationOptions() With {
.AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
.LoginPath = New PathString("/Account/Login.aspx")
})
'register DotVVM in the pipeline
app.UseDotVVM(Of DotvvmStartup)(dotvvmAppLocation)
'Dim a = New CoRSafe.DotVVM.Startup()
'a.Configuration(app)
'app.UseDotVVM(a, dotvvmAppLocation)
End Sub
End Class
It was running okay locally. but when deploying in azure devops pipeline, it was having an issue
D:\a\1\s\CoRSafe\App_Code\Startup1.vb(32): error BC30451: ‘DotVVMApplicationDbContext’ is not declared. It may be inaccessible due to its protection level. [D:\a\1\s\CoRSafe.metaproj]
D:\a\1\s\CoRSafe\App_Code\Startup1.vb(32): error BC30518: Overload resolution failed because no accessible ‘CreatePerOwinContext’ can be called with these arguments: [D:\a\1\s\CoRSafe.metaproj]
D:\a\1\s\CoRSafe\App_Code\Startup1.vb(33): error BC30002: Type ‘DotVVMApplicationUserManager’ is not defined. [D:\a\1\s\CoRSafe.metaproj]
D:\a\1\s\CoRSafe\App_Code\Startup1.vb(33): error BC30451: ‘DotVVMApplicationUserManager’ is not declared. It may be inaccessible due to its protection level. [D:\a\1\s\CoRSafe.metaproj]
D:\a\1\s\CoRSafe\App_Code\Startup1.vb(41): error BC30002: Type ‘DotvvmStartup’ is not defined. [D:\a\1\s\CoRSafe.metaproj]