473,471 Members | 2,053 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

JIT assemblies

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.testclass.teststring) ;
%>

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
Nov 18 '05 #1
6 1402
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.com). Thanks!
Nov 18 '05 #2
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.com). Thanks!
Nov 18 '05 #3
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
Nov 18 '05 #4
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
Nov 18 '05 #5
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.com> wrote in message
news:63**********************************@microsof t.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

Nov 18 '05 #6
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.com> wrote in message
news:63**********************************@microsof t.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

Nov 18 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
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...
1
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...
1
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...
3
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...
4
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...
0
marktang
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
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...
1
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.