Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Broken compatibility for assembly GetNAme() in 2.0

Reply
Thread Tools

Broken compatibility for assembly GetNAme() in 2.0

 
 
WT
Guest
Posts: n/a
 
      05-13-2006
Hello,


We have a license system that checks the assembly name and version using
..NETLicenseManager API (Cf Nikhil K. book on server controls) , using a
deployment project we are able to set the assmbly name and version for
resulting dll, and it works ok.
string assemblyPart = type.Assembly.GetName().Name;

string versionPart = type.Assembly.GetName().Version.ToString();


But in dev phase, our assembly name is automatically generated without
possibility of control and it is very uneasyto work with, solution should be
to put #if everywere the license is tested or the assembly name is get from
..net, but this practice doesn't allow real testing.

So what to do: something has been broken here going from 1.1 to 2.0.
What to do ?
Any idea welcome.

CS


 
Reply With Quote
 
 
 
 
Walter Wang [MSFT]
Guest
Posts: n/a
 
      05-15-2006
Hi MT,

Thank you for posting!

Regarding the code:

string assemblyPart = type.Assembly.GetName().Name;

Can you tell me where is the 'type' from? Is it from a Page class?

And I'm not quite clear about your question about "something has been
broken here going from 1.1 to 2.0". Have you tried the suggestion provided
by Ken Cox in your other post regarding this issue? BTW, the Web
Application Projects 1.0 is released just a few days ago. This new model is
ideal for web site developers who are converting a Visual Studio .Net 2003
web project to Visual Studio 2005.


Regards,

Walter Wang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

 
Reply With Quote
 
 
 
 
Walter Wang [MSFT]
Guest
Posts: n/a
 
      05-15-2006
Hi CS,

Sorry for the typo in your name in previous post.

Regards,

Walter Wang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

 
Reply With Quote
 
WT
Guest
Posts: n/a
 
      05-15-2006
Hello Walter,

No pb with typo.
Concerning the Ken Cox answer, I don't see it, I will refresh my outlook
subscription to this newsgroup.
My project is now converted to 2.0.
type is an instance of a class that resides in the App_Code folder, when I
run my web application under VS2005 debuger , I get in assemblyPart a name
like App_dzk23, each new run gives a different name.
So it is uneasy to test something.

Regards
CS

"Walter Wang [MSFT]" <> a écrit dans le message
de news: ...
> Hi MT,
>
> Thank you for posting!
>
> Regarding the code:
>
> string assemblyPart = type.Assembly.GetName().Name;
>
> Can you tell me where is the 'type' from? Is it from a Page class?
>
> And I'm not quite clear about your question about "something has been
> broken here going from 1.1 to 2.0". Have you tried the suggestion provided
> by Ken Cox in your other post regarding this issue? BTW, the Web
> Application Projects 1.0 is released just a few days ago. This new model
> is
> ideal for web site developers who are converting a Visual Studio .Net 2003
> web project to Visual Studio 2005.
>
>
> Regards,
>
> Walter Wang
> Microsoft Online Community Support
>
> ==================================================
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>



 
Reply With Quote
 
Walter Wang [MSFT]
Guest
Posts: n/a
 
      05-18-2006
Hi CS,

Have you tried the Web Application Projects addin? Would you mind letting
me know the result of the suggestions? If you need further assistance, feel
free to let me know. I will be more than happy to be of assistance.

Have a great day!

Regards,

Walter Wang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

 
Reply With Quote
 
WT
Guest
Posts: n/a
 
      05-18-2006
Hi Walter,

Yes it solved it for final project, but in dev phase, assembly name is lost.
That's a reat problem.

CS
"Walter Wang [MSFT]" <> a écrit dans le message
de news: ...
> Hi CS,
>
> Have you tried the Web Application Projects addin? Would you mind letting
> me know the result of the suggestions? If you need further assistance,
> feel
> free to let me know. I will be more than happy to be of assistance.
>
> Have a great day!
>
> Regards,
>
> Walter Wang
> Microsoft Online Community Support
>
> ==================================================
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>



 
Reply With Quote
 
Walter Wang [MSFT]
Guest
Posts: n/a
 
      05-18-2006
Thank you for your quick response.

I've done some test using Web Application Projects add-in, but was unable
to reproduce the problem. Here's the steps I used to test it:

1) Create a new Visual C# "ASP.NET Web Application"
2) Create a new class Class1
3) In Default.aspx.cs, Page_Load:

Class c1 = new Class1();
Response.Write(c1.GetType().Assembly.GetName());

The result shows correctly the Project's assembly name.

If I use following code in Page_Load:

Response.Write(this.GetType().Assembly.GetName());

It does show an assembly name which is dynamic, but I think it's the same
behavior with ASP.NET 1.1 which is expected.

If there is anything I misunderstood, please feel free to post reply here.


Regards,

Walter Wang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assembly's manifest definition does not match the assembly reference. Horatiu Margavan via .NET 247 ASP .Net 0 08-30-2004 04:14 PM
ASP.NET 2.0: What is the namespace and assembly name of generated assembly SA ASP .Net 0 08-09-2004 05:09 PM
Assembly version compatibility issue Bob ASP .Net 2 06-02-2004 04:58 PM
Referencing assembly from GAC using @assembly fails Brent ASP .Net 1 01-23-2004 08:23 PM
can a strongly named assembly reference a regular assembly? Prasanna Padmanabhan ASP .Net 1 11-19-2003 06:21 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57