Re: asp.net assembly best practices question...
- From: "jojobar" <jojobar@xxxxxxxxxxxxx>
- Date: Thu, 27 Oct 2005 19:25:02 -0700
Thanks again for your response. I will try this project type when we get the
new release.
--
-jojobar
"Steven Cheng[MSFT]" wrote:
> Thanks for your response Jojobar,
>
> I've also consult Scott Guthrie regarding on the questions and here are
> some of his comments:
>
> ===================
> We are coming out with a new deployment project on November 7th (the same
> day as VS 2005 launch) that should help this customer automate building
> user control assemblies. It is called the "VS 2005 Web Deployment Project"
> and can be added to their solution containing the web project. It provides
> several build customization options. One option it supports is to set a
> version string explicitly. By default, if a version string isn't set in
> the tool it will be picked up by any AssemblyInfo.cs file stored in the
> app_code directory of their web project.
> ===================
>
> However, for components and other helper classes, I still recommend you
> keep them in separate class lib projects since that'll make redistribute
> and versioning controls/components only more convenient.
>
> Thanks,
>
> Steven Cheng
> Microsoft Online Support
>
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
>
>
> --------------------
> | Thread-Topic: asp.net assembly best practices question...
> | thread-index: AcXa+SnlZT4gjv89RRK/q10X52ZJWA==
> | X-WBNR-Posting-Host: 66.32.181.251
> | From: "=?Utf-8?B?am9qb2Jhcg==?=" <jojobar@xxxxxxxxxxxxx>
> | References: <97B8A889-DAF0-4858-B4E5-B6D5317F9C58@xxxxxxxxxxxxx>
> <Q#2P8fh2FHA.1144@xxxxxxxxxxxxxxxxxxxxx>
> <5F33A4E4-E06A-4F7C-8318-1F4BA26E2CEA@xxxxxxxxxxxxx>
> <ldfvl1dq4tdhuh5o6q8fvbsbon5hr8cs64@xxxxxxx>
> <ED0B7ED8-FFEB-4CCB-B041-A7A8FD357402@xxxxxxxxxxxxx>
> <3B2AE1E6-C894-427E-9ED7-716E5C09C9EC@xxxxxxxxxxxxx>
> <7A$hNCt2FHA.1172@xxxxxxxxxxxxxxxxxxxxx>
> | Subject: Re: asp.net assembly best practices question...
> | Date: Thu, 27 Oct 2005 06:20:13 -0700
> | Lines: 247
> | Message-ID: <07389713-4A3B-4689-AD45-C0B541767918@xxxxxxxxxxxxx>
> | MIME-Version: 1.0
> | Content-Type: text/plain;
> | charset="Utf-8"
> | Content-Transfer-Encoding: 7bit
> | X-Newsreader: Microsoft CDO for Windows 2000
> | Content-Class: urn:content-classes:message
> | Importance: normal
> | Priority: normal
> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> | Newsgroups: microsoft.public.dotnet.framework.aspnet
> | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
> | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
> | Xref: TK2MSFTNGXA01.phx.gbl
> microsoft.public.dotnet.framework.aspnet:134227
> | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
> |
> | I thought that another advantage of webresource.axd is it can cache the
> | javascript file and automatically refresh them in the next build. Keeping
> js
> | files in static folder tends to cache them the first time they are used
> and
> | the browser keep using the cached file even when the original file is
> | changed(unless you change the file name ofcourse or clear the cache). I
> was
> | trying to cache the js files in another c# project and use the resource
> in
> | the web project (using the namespace).
> |
> | So far no success, maybe I am doing something wrong!
> |
> | >For such scenario, I think the best choice should be still separating
> the
> | >components/controls and helper classes in external class library so as
> to
> | >explictily version them or apply other assembly level attributes. Also,
> | >compile the website won't compile the code which is not in App_Code or
> | >codebehind files.
> |
> | This is a bit of restriction. but we can live with it! :-)
> |
> | Thanks again
> | jojobar
> |
> | --
> | -jojobar
> |
> |
> | "Steven Cheng[MSFT]" wrote:
> |
> | > Thanks for your response Jojobar,
> | >
> | > Here are some of my understanding and suggestions regarding on the
> | > questions you mentioned:
> | >
> | > 1. If I cannot have assembly info, how can I version the assemblies? I
> | > checked up in the .net temp directory where the assemblies are created
> and
> | > it
> | > shows the version as 0.0.0.0. Is there any way we can version these
> | > assemblies so that we can keep track of things when they go to the
> client
> | > site?
> | > =======================================
> | > I'm afraid currently for the dynamic compiled assembly we can not
> version
> | > them as class library or other precompiled ones.
> | >
> | >
> | > 2. I also plan to use assemblyinfo to define things so that I can embed
> | > javascript files in the assembly (using webresource.axd). I figured out
> how
> | > to do this in assemblyinfo but do not know how to do it otherwise.
> | > =======================================
> | > As for embeded webresource, the ASP.NET 2.0 project dosn't quite
> support
> | > it, you can find that the image or other resource files in the asp.net
> | > project does not contain the "Build Action" to let dynamic compilation
> | > embeded them. So the [assembly:WebResource(...)] dosn't make sense in
> | > asp.net 2.0 web project. Actually, this is not necessary because
> dynamic
> | > resource emitting is mainly target webcontrol developing, since
> webcontrol
> | > provider can not deliver physical files to web application developers
> and
> | > let them put in web dir. However, for asp.net app developing, since we
> can
> | > diretory manage the website's dir and files, we can just put those
> static
> | > resoures file in application's sub dirs so as to accessing them
> directly
> | > (instead of the through the webresource.axd). static files request will
> | > have much more improved performance than handling by webresource.axd.
> | >
> | >
> | > 3. Also, putting things in APP_Code is difficult for me. I do
> understand
> | > what it does, but our current projects also has a lot of C# helper
> files
> | > (in
> | > addition to aspx.cs and ascx.cs files), I understand they will need
> | > explicit
> | > compilation if I do not put them in the APP_code and keep them in their
> | > respective directories. Will compiling the web site compile these files
> | > automatically (if they are not in APP_Code directory but in normal
> folders)?
> | > =======================================
> | > For such scenario, I think the best choice should be still separating
> the
> | > components/controls and helper classes in external class library so as
> to
> | > explictily version them or apply other assembly level attributes.
> Also,
> | > compile the website won't compile the code which is not in App_Code or
> | > codebehind files.
> | >
> | >
> | > 4.If I put an assembly info file in APP_Code folder, then an assembly
> is
> | > created in the .net temporary folder called App_Code.rnuvm4pf.dll,
> which
> | > picked up the assembly version correctly. However, if it is kept
> outside
> | > the
> | > App_code, the code compiles and runs fine but the assemblyinfo is not
> | > picked
> | > up correctly in the dll (it always shows 0.0.0.0).
> | > =======================================
> | > yes, we can manually put a source code file (not necessarily named as
> | > "AssemblyInfo") and put [assembly:XXX(...)] attributes in it so as to
> | > embeded in the dynamic generated assemblies. However, the dynamic
> | > compilation of the source code in App_Code do not gurantee that the
> file
> | > which contains those assembly level attributes will be compiled into a
> | > fixed assembly ( e.g. always together with other source files in the
> | > App_Code). In other words, the source code files in the App_code
> folder
> | > maybe dynamically compiled into multi assemblies, and we can not make
> sure
> | > which assembly actually contains the assembly version info.
> | >
> | > Thanks,
> | >
> | > Steven Cheng
> | > Microsoft Online Support
> | >
> | > Get Secure! www.microsoft.com/security
> | > (This posting is provided "AS IS", with no warranties, and confers no
> | > rights.)
> | >
> | >
> | >
> | >
> | >
> | >
> | >
> | >
> | >
> | > --------------------
> | > | Thread-Topic: asp.net assembly best practices question...
> | > | thread-index: AcXaZeTkcv8kMaHPQSyHovYFJeJngA==
> | > | X-WBNR-Posting-Host: 66.32.181.251
> | > | From: "=?Utf-8?B?am9qb2Jhcg==?=" <jojobar@xxxxxxxxxxxxx>
> | > | References: <97B8A889-DAF0-4858-B4E5-B6D5317F9C58@xxxxxxxxxxxxx>
> | > <Q#2P8fh2FHA.1144@xxxxxxxxxxxxxxxxxxxxx>
> | > <5F33A4E4-E06A-4F7C-8318-1F4BA26E2CEA@xxxxxxxxxxxxx>
> | > <ldfvl1dq4tdhuh5o6q8fvbsbon5hr8cs64@xxxxxxx>
> | > <ED0B7ED8-FFEB-4CCB-B041-A7A8FD357402@xxxxxxxxxxxxx>
> | > | Subject: Re: asp.net assembly best practices question...
> | > | Date: Wed, 26 Oct 2005 12:46:01 -0700
> | > | Lines: 82
> | > | Message-ID: <3B2AE1E6-C894-427E-9ED7-716E5C09C9EC@xxxxxxxxxxxxx>
> | > | MIME-Version: 1.0
> | > | Content-Type: text/plain;
> | > | charset="Utf-8"
> | > | Content-Transfer-Encoding: 7bit
> | > | X-Newsreader: Microsoft CDO for Windows 2000
> | > | Content-Class: urn:content-classes:message
> | > | Importance: normal
> | > | Priority: normal
> | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> | > | Newsgroups: microsoft.public.dotnet.framework.aspnet
> | > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
> | > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
> | > | Xref: TK2MSFTNGXA01.phx.gbl
> | > microsoft.public.dotnet.framework.aspnet:134088
> | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
> | > |
> | > | Okay I found another thing which looks interesting.
> | > |
> | > | If I put an assembly info file in APP_Code folder, then an assembly
> is
> | > | created in the .net temporary folder called App_Code.rnuvm4pf.dll,
> which
> | > | picked up the assembly version correctly. However, if it is kept
> outside
> | > the
> | > | App_code, the code compiles and runs fine but the assemblyinfo is not
> | > picked
> | > | up correctly in the dll (it always shows 0.0.0.0).
> | > |
> | > | Thanks
> | > | --
> | > | -jojobar
> | > |
> | > |
> | > | "jojobar" wrote:
> | > |
> | > | > Hello Scott,
> | > | >
> | > | > Thanks for replying. I read in scottgu's blog that MS is trying to
> | > combine
> | > | > the assemblies in folders in a website. That will be great!
> | > | >
> | > | > From your reply I gather that if I have xxx.aspx, xxx.aspx.cs and
> | > support.cs
> | > | > (where support.cs only has support functions for the xxx.aspx.cs)
> in a
> | > folder
> | > | > and compile the web site, it will not compile it correctly.
> However, if
> | > I
> | > | > copy support.cs in APP_Code it will!
> | > | >
> | > | > I have not tested it yet, but my understanding was that putting in
> | > APP_Code
> | > | > will compile it automatically, but you still have an option to
> compile
> | > it
> | > | > yourself elsewhere (in the web site) if you want to. Putting things
> in
> | > | > APP_Code is not a big deal, but I am trying to find if this is
> forced
> | > or an
> | > | > option.
> | > | >
> | > | > Also, I was wondering how to put the .js files into assembly (using
> | > .axd) in
> | > | > a web site, if there is no way to define attributes for the
> assembly
> | > (usually
> | > | > you define this in the assemblyinfo.cs file).
> | > | >
> | > | > Thanks
> | > | > --
> | > | > -jojobar
> | > | >
> | > | >
> | > | > "Scott Allen" wrote:
> | > | >
> | > | > > On Wed, 26 Oct 2005 06:51:04 -0700, "jojobar"
> <jojobar@xxxxxxxxxxxxx>
> | > | > > wrote:
> | > | > >
.
- References:
- RE: asp.net assembly best practices question...
- From: Steven Cheng[MSFT]
- Re: asp.net assembly best practices question...
- From: Steven Cheng[MSFT]
- RE: asp.net assembly best practices question...
- Prev by Date: Re: ASP.NET Not LIsted as User in File Security Property
- Next by Date: RE: webresource not working in asp.net 2.0 beta
- Previous by thread: Re: asp.net assembly best practices question...
- Next by thread: how to find a file by its name?
- Index(es):
Relevant Pages
|
Loading