G
Guest
1. We have a web project that has a support dll that uses the following
command: HttpContext.Current.Application["key...."].ToString();
2. In our environment we must use a build process that runs from the
command line to get things into production, not the IDE.
The problem. When we compile the project in the IDE everything works great,
the application works the support DLL gets the current context stuff and
everything is just fine. However when we run the project through the CSC
compiler everything compiles and looks good but when we run the application
it blows up on the line of code for the HTTPContext stuff. Now if I change
it to ConfigurationSettings and try to pull from web.config it works fine.
So the problem is what is the IDE doing differently. We know everything is
getting compiled correctly as it works upto that one point in the support
dll.
Here are the base options we use on the command line since we use a RSP file.
/target:library
/optimize+
/warn:4
/r:System.dll
/r:System.Drawing.dll
/r:System.Data.dll
/r:System.Web.dll
/r:System.XML.dll
/r:OurDLLGoesHere.dll
<fileList for compilation>
There is not much to do here but it looks like there is something that the
IDE is injecting into the DLL as it is also 4 K smaller when we compile on
the command line.
Anybody ever run into this before? We do need to keep it as the HTTPContext
if possible so we need to figure out why it won't link in for some unknown
reason....
Thanks.
command: HttpContext.Current.Application["key...."].ToString();
2. In our environment we must use a build process that runs from the
command line to get things into production, not the IDE.
The problem. When we compile the project in the IDE everything works great,
the application works the support DLL gets the current context stuff and
everything is just fine. However when we run the project through the CSC
compiler everything compiles and looks good but when we run the application
it blows up on the line of code for the HTTPContext stuff. Now if I change
it to ConfigurationSettings and try to pull from web.config it works fine.
So the problem is what is the IDE doing differently. We know everything is
getting compiled correctly as it works upto that one point in the support
dll.
Here are the base options we use on the command line since we use a RSP file.
/target:library
/optimize+
/warn:4
/r:System.dll
/r:System.Drawing.dll
/r:System.Data.dll
/r:System.Web.dll
/r:System.XML.dll
/r:OurDLLGoesHere.dll
<fileList for compilation>
There is not much to do here but it looks like there is something that the
IDE is injecting into the DLL as it is also 4 K smaller when we compile on
the command line.
Anybody ever run into this before? We do need to keep it as the HTTPContext
if possible so we need to figure out why it won't link in for some unknown
reason....
Thanks.