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 6 1204
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.
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.
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]" <wa****@online.microsoft.com> a écrit dans le message
de news: yf*************@TK2MSFTNGXA01.phx.gbl... 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.
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.
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]" <wa****@online.microsoft.com> a écrit dans le message
de news: oH**************@TK2MSFTNGXA01.phx.gbl... 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.
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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: David Lindgren |
last post by:
Hi.
I'm using automatic increase on the assembly build number. Only problem is
it's doesn't increase. Anyone know what might cause this?
In AssemblyInfo.cs:
Thanks!
|
by: Aamir Mahmood |
last post by:
Hi all,
How can I set the version information (major, minor) in my assembly.
And also how can I easily get it at runtime?
-
AM
|
by: jez123456 |
last post by:
Hi, I'm trying to add the product, title and version number to my main form
with the following code. I've tried using this code in the public class
FrmMain section but I get the error thisAsm'...
|
by: e_zverev |
last post by:
Hi
The question concerns the ways ASP.NET loads required assemblies into it's
app domain.
I know of a deprecated feature of clr assembly detection in which the use of
environment variable...
|
by: Praveen Ramesh |
last post by:
Hi,
Is there any way to add the @Assembly reference to the aspx files
programmatically from inside a custom control (when it gets dropped on to
the page from the toolbox)?
I have a custom...
|
by: Phil Galey |
last post by:
I created an About box and am able to get all the assembly information from the program to show up in the About box except the Version.
I created the About box as a separate Windows application,...
|
by: Jim Shank |
last post by:
I am attempting to embed a text resource in my assembly and following MSDN
article...
|
by: Andrew |
last post by:
In ASP.NET 1.1 I used to retreive the version of my code-behind assembly
using following syntax:
Assembly.GetExecutingAssembly().GetName().Version
The version was defined in AssemblyInfo.cs using...
|
by: puzzlecracker |
last post by:
is there a way to create a library (assembly/dll) where I can only
export few class? I don't want client to use or know about other
internal classes in the assembly.
Thanks
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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...
|
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,...
|
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...
|
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,...
| |