Hi everyone,
I'm trying to convert an ASP.NET app that is currently compiled into a JITed
application.
Here's the dilema. I can't figure out how to reference a class or control
(that is also JIT) from another JIT class or control. Let's say I've got a
simple class (testclass.cs) ... this is not compiled into a DLL:
namespace testnamespace
{
public class testclass
{
public static string teststring = "contents of teststring";
public testclass()
{
}
}
}
If I have a page w/o a code behind, I can access this class using:
<%@ Assembly Src="testclass. cs" %>
....
<%
Response.Write( testnamespace.t estclass.testst ring);
%>
All the pages are using code-behinds. Using "using testnamespace;" won't
work -- is there a way to reference and use this assembly from a
code-behind?
Thanks for your help!
Brian 6 1422
This is EXACTLY the problem I'm having. It's been driving me CRAZY. They do all this nice AUTO-compilation stuff for us but then seem to provide no way to do JIT from a code file. ARRRGH. Hey, if you *do* learn the answer to this from anywhere else, could you email me? (al**@maghen.co m). Thanks!
This is EXACTLY the problem I'm having. It's been driving me CRAZY. They do all this nice AUTO-compilation stuff for us but then seem to provide no way to do JIT from a code file. ARRRGH. Hey, if you *do* learn the answer to this from anywhere else, could you email me? (al**@maghen.co m). Thanks!
Brian H
Hi. Well, though we haven't gotten a definite response from the MSFT folks yet, I gotta tell you that I've been banging my head against this for about 48 hours and I think that everything I've read and all the experimentation that I've done indicates the following annoying rule
IF YOU NEED TO ACCESSS THE CODE IN A .CS FILE IN ANY WAY DIRECTLY FROM ANOTHER .CS FILE, THE FIRST .CS FILE **MUST** BE PRE-COMPILED INTO AN ASSEMBLY WITH A NAMESPACE
It seems that ASP.NET itself does you a cool little "favor" when you're referencing code files (such as .CS files) as the code-behind files for .ASPXs or .ASCXs. The favor is that it will auto-compile what it needs to. Sadly, and, in my mind, rather stupidly, there doesn't seem to be any kind of directive to do this BETWEEN .CS code files
I'd *love* it if the folks from MSFT would write in and tell me that I'm an idiot and just don't understand how to do it. But at the moment, I think I may be right about this
Alex
Brian H
Hi. Well, though we haven't gotten a definite response from the MSFT folks yet, I gotta tell you that I've been banging my head against this for about 48 hours and I think that everything I've read and all the experimentation that I've done indicates the following annoying rule
IF YOU NEED TO ACCESSS THE CODE IN A .CS FILE IN ANY WAY DIRECTLY FROM ANOTHER .CS FILE, THE FIRST .CS FILE **MUST** BE PRE-COMPILED INTO AN ASSEMBLY WITH A NAMESPACE
It seems that ASP.NET itself does you a cool little "favor" when you're referencing code files (such as .CS files) as the code-behind files for .ASPXs or .ASCXs. The favor is that it will auto-compile what it needs to. Sadly, and, in my mind, rather stupidly, there doesn't seem to be any kind of directive to do this BETWEEN .CS code files
I'd *love* it if the folks from MSFT would write in and tell me that I'm an idiot and just don't understand how to do it. But at the moment, I think I may be right about this
Alex
I've been banging my head on this one, too. I figured this would be a good
test case (the example I posted), but the real problem for us (and the
company I work for) is that we want to JIT compile our pages and user
controls. It won't be possible if what we are trying to do cannot be done.
I will post if I have a solution -- hopefully microsoft will figure this
out. Perhaps using reflection? Ug. This should be simple :)
-Brian
"Alex Maghen" <al**@maghen.co m> wrote in message
news:63******** *************** ***********@mic rosoft.com... Brian H -
Hi. Well, though we haven't gotten a definite response from the MSFT folks
yet, I gotta tell you that I've been banging my head against this for about
48 hours and I think that everything I've read and all the experimentation
that I've done indicates the following annoying rule: IF YOU NEED TO ACCESSS THE CODE IN A .CS FILE IN ANY WAY DIRECTLY FROM
ANOTHER .CS FILE, THE FIRST .CS FILE **MUST** BE PRE-COMPILED INTO AN
ASSEMBLY WITH A NAMESPACE. It seems that ASP.NET itself does you a cool little "favor" when you're
referencing code files (such as .CS files) as the code-behind files for
..ASPXs or .ASCXs. The favor is that it will auto-compile what it needs to.
Sadly, and, in my mind, rather stupidly, there doesn't seem to be any kind
of directive to do this BETWEEN .CS code files. I'd *love* it if the folks from MSFT would write in and tell me that I'm
an idiot and just don't understand how to do it. But at the moment, I think
I may be right about this. Alex
I've been banging my head on this one, too. I figured this would be a good
test case (the example I posted), but the real problem for us (and the
company I work for) is that we want to JIT compile our pages and user
controls. It won't be possible if what we are trying to do cannot be done.
I will post if I have a solution -- hopefully microsoft will figure this
out. Perhaps using reflection? Ug. This should be simple :)
-Brian
"Alex Maghen" <al**@maghen.co m> wrote in message
news:63******** *************** ***********@mic rosoft.com... Brian H -
Hi. Well, though we haven't gotten a definite response from the MSFT folks
yet, I gotta tell you that I've been banging my head against this for about
48 hours and I think that everything I've read and all the experimentation
that I've done indicates the following annoying rule: IF YOU NEED TO ACCESSS THE CODE IN A .CS FILE IN ANY WAY DIRECTLY FROM
ANOTHER .CS FILE, THE FIRST .CS FILE **MUST** BE PRE-COMPILED INTO AN
ASSEMBLY WITH A NAMESPACE. It seems that ASP.NET itself does you a cool little "favor" when you're
referencing code files (such as .CS files) as the code-behind files for
..ASPXs or .ASCXs. The favor is that it will auto-compile what it needs to.
Sadly, and, in my mind, rather stupidly, there doesn't seem to be any kind
of directive to do this BETWEEN .CS code files. I'd *love* it if the folks from MSFT would write in and tell me that I'm
an idiot and just don't understand how to do it. But at the moment, I think
I may be right about this. Alex This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Tom Dacon |
last post by:
If you're not putting assemblies in the GAC, but are referencing shared code
with copylocal=true into the projects that use them, is there any value to
signing the assemblies?
In the environment I've just begun to work in, there are customer-facing web
sites, internally-accessed maintenance and admin web sites, middle-tier
business logic assemblies, services, and Windows Forms apps that run on the
middle-tier. The policy is to sign the...
|
by: Afaq |
last post by:
Hi,
After adding large number of empty resource files (which will be updated
later), we are not able to compile the project. the following is the output
of the build process. It fails while compiling the Max.UI.Win project with
the following error
Satellite assemblies could not be built because the main project output is
missing.
|
by: Afaq |
last post by:
Hi,
After adding large number of empty resource files (which will be updated
later), we are not able to compile the project. the following is the output
of the build process. It fails while compiling the Max.UI.Win project with
the following error
Satellite assemblies could not be built because the main project output is
missing.
|
by: Claudio Pacciarini |
last post by:
Hi everyone,
I have a question about .NET code sharing and reuse, and also about
application design best practices / guidelines.
Currently, we have many different .NET projects in source depot. Although
they are different, in some of them we share C# code by referencing source
files that are external (not part of the projects) on each project.
For instance, some of our projects have the typical “sources” file with:
|
by: illegal.prime |
last post by:
Hi all, I'm getting unexpected results when trying to preload
assemblies into an AppDomain I'm creating. Upon creation of the
AppDomain - I attach an AssemblyResolve to both my current AppDomain
and the new AppDomain I create.
I copy all the assemblies/dlls into a new directory and then try
loading them all into the new AppDomain using the following:
private void LoadAssembliesFromDirectory(AppDomain appDomain, string
directory)
| |
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |