Assembly Reference in Global.asax.vb

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Assembly Reference in Global.asax.vb

Guest-40

The issue I have I guess is that I am building my project in vb.net. I'm trying to add the assembly reference to the global.asax.vb . I think the problem is the languages are different and the installation instructions are for cs.

 

[assembly: log4net.Config.XmlConfigurator(ConfigFile="log4net.config", Watch=true)]

gives me the error

Global.asax.vb(5): Identifier expected.

Any clues?

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Assembly Reference in Global.asax.vb

Dean Brettle
Administrator
I'm not a VB programmer, but I'm guessing that in VB the attributes syntax might be:

<assembly: log4net.Config.XmlConfigurator(ConfigFile="log4net.config", Watch=true)>

--Dean
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Assembly Reference in Global.asax.vb

Guest-40

Even I assumed that the vb syntax would be like the one mentioned by Admin but it turned out that I had use the following:

<assembly: log4net.Config.XmlConfigurator(ConfigFile:="log4net.config", Watch:=true)>

Note: The subtle change (the colon) from ConfigFile="log4net.config" to ConfigFile:="log4net.config"

Loading...