|
Change the version number in the installer properties and VS will remind you to change the product code. Then you might want to flick on the "Remove previous versions" property, to make the upgrade less painful.
|
|
|
|
|
As I browse the forums, I keep finding one problem. Someone posted a fix for .NET framework 2.0 or 3.0 and the people asking only have 1.1. I have two questions:
1: Why do people still use old versions of the framework, especially 1.1?
2: What is the difference between the versions.
Just for the record, I looked on Google, but I came here looking for an explanation in relatively plain English.
|
|
|
|
|
Answer to your first question why people still use version 1.1
There are many reasons for that
1.most of the time people don't want to come out from comfort level with
existing version
2.and majorly for supporting existing project which is in older version
(1.1)
|
|
|
|
|
1. There are many reasons.
Some don't want to use it as it might break stuff, this is a valid reason for a while but they should put the effort in to test stuff.
Some employers are too cheap to upgrade to the new version of Visual Studio. I once knew of an employer so cheap they made the developers use the shareware version of http://www.editplus.com/[^] rather than pay for a proper IDE. As a side note if you ever go for a job interview an they're using an old or unsuitable IDE for no good reason ask your self if it's because the company isn't profitable enough or they don't value the developers.
Some don't want the extra download requirements of the new frameworks. In many countries 20 meg can still be a considerable chunk on dial up internet.
2.
Whats new in .Net 2.0[^]
.Net 3.0 home page[^]
|
|
|
|
|
originSH wrote: Some employers are too cheap to upgrade to the new version of Visual Studio. I once knew of an employer so cheap they made the developers use the shareware version of http://www.editplus.com/[^] rather than pay for a proper IDE.
That is better. At least half a dozen companies in a random sampling of 50 in Chennai can be booked for illegal software. Microsoft and NASSCOM has to do something to 'check' menace.
|
|
|
|
|
Hi,
I'm activating software installations on a network but in a very manual way. First pinging the network for active computers, compare actives computers with an installation list then executing a bat on the computer. I thought it should be easy to automate the process and started reading up on the System.Net.NetworkInformation library but the problem is that I don't know how to extract the computer name from the pingReply object.
It only returns the IP address and since the DNS lookup table isn't up to date I can't use that.
Is there another way to get a computers name from the IP address
|
|
|
|
|
The short answer is "no".
Phil
|
|
|
|
|
the longer answer is Yes .
I had once a similar problem an found that NetWkstaGetInfo [^] worked quite well. You can provide the IP address as input and get the (BIOS-)name of the machine (and other stuff) back.
If I remember correctly I've had had some security issues with workstation configurations (domain worked well). The following c# 2.0 code is all that's needed.
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using System.Globalization;
using NetScan.Contract;
using System.Diagnostics;
namespace NetScan.Service
{
static class NetBios
{
#region public
public class Info
{
private Info()
{
}
internal Info(PlatformId platformId, Version version, string computerName, string lanGroup)
{
this.PlatformId = platformId;
this.Version = version;
this.ComputerName = computerName;
this.LanGroup = lanGroup;
}
public readonly PlatformId PlatformId;
public readonly Version Version;
public readonly string ComputerName;
public readonly string LanGroup;
public string Comment;
public ServerType ServerType;
public override string ToString()
{
return string.Format(CultureInfo.CurrentCulture, "{0} - {1} - {2}", Version, ComputerName, LanGroup);
}
}
public static Info GetInfo(string serverName)
{
Info retVal = null;
System.IntPtr x;
uint lret = NativeMethods.NetWkstaGetInfo(serverName, 100, out x);
if (lret != 0 || x == System.IntPtr.Zero)
{
return null;
}
NativeMethods.WKSTA_INFO_100 wi = (NativeMethods.WKSTA_INFO_100)Marshal.PtrToStructure(x, typeof(NativeMethods.WKSTA_INFO_100));
retVal = new Info((PlatformId)wi.wki100_platform_id, new Version(wi.wki100_ver_major, wi.wki100_ver_minor), Marshal.PtrToStringUni(wi.wki100_computername), Marshal.PtrToStringUni(wi.wki100_langroup));
NativeMethods.NetApiBufferFree(x);
lret = NativeMethods.NetServerGetInfo(serverName, 101, out x);
if (lret == 0 && x != System.IntPtr.Zero)
{
NativeMethods.SERVER_INFO_101 si = (NativeMethods.SERVER_INFO_101)Marshal.PtrToStructure(x, typeof(NativeMethods.SERVER_INFO_101));
retVal.Comment = Marshal.PtrToStringUni(si.sv101_comment);
retVal.ServerType = (ServerType)si.sv101_type;
NativeMethods.NetApiBufferFree(x);
}
return retVal;
}
#endregion
private static class NativeMethods
{
internal enum PlatformId : int
{
PLATFORM_ID_DOS = 300,
PLATFORM_ID_OS2 = 400,
PLATFORM_ID_NT = 500,
PLATFORM_ID_OSF = 600,
PLATFORM_ID_VMS = 700,
}
[Flags]
internal enum SVType : uint
{
SV_TYPE_WORKSTATION = 0x00000001,
SV_TYPE_SERVER = 0x00000002,
SV_TYPE_SQLSERVER = 0x00000004,
SV_TYPE_DOMAIN_CTRL = 0x00000008,
SV_TYPE_DOMAIN_BAKCTRL = 0x00000010,
SV_TYPE_TIME_SOURCE = 0x00000020,
SV_TYPE_AFP = 0x00000040,
SV_TYPE_NOVELL = 0x00000080,
SV_TYPE_DOMAIN_MEMBER = 0x00000100,
SV_TYPE_PRINTQ_SERVER = 0x00000200,
SV_TYPE_DIALIN_SERVER = 0x00000400,
SV_TYPE_XENIX_SERVER = 0x00000800,
SV_TYPE_SERVER_UNIX = SV_TYPE_XENIX_SERVER,
SV_TYPE_NT = 0x00001000,
SV_TYPE_WFW = 0x00002000,
SV_TYPE_SERVER_MFPN = 0x00004000,
SV_TYPE_SERVER_NT = 0x00008000,
SV_TYPE_POTENTIAL_BROWSER = 0x00010000,
SV_TYPE_BACKUP_BROWSER = 0x00020000,
SV_TYPE_MASTER_BROWSER = 0x00040000,
SV_TYPE_DOMAIN_MASTER = 0x00080000,
SV_TYPE_SERVER_OSF = 0x00100000,
SV_TYPE_SERVER_VMS = 0x00200000,
SV_TYPE_WINDOWS = 0x00400000,
SV_TYPE_DFS = 0x00800000,
SV_TYPE_CLUSTER_NT = 0x01000000,
SV_TYPE_TERMINALSERVER = 0x02000000,
SV_TYPE_CLUSTER_VS_NT = 0x04000000,
SV_TYPE_DCE = 0x10000000,
SV_TYPE_ALTERNATE_XPORT = 0x20000000,
SV_TYPE_LOCAL_LIST_ONLY = 0x40000000,
SV_TYPE_DOMAIN_ENUM = 0x80000000,
SV_TYPE_ALL = 0xFFFFFFFF,
}
[StructLayout(LayoutKind.Sequential)]
internal struct WKSTA_INFO_100
{
public PlatformId wki100_platform_id;
public IntPtr wki100_computername;
public IntPtr wki100_langroup;
public int wki100_ver_major;
public int wki100_ver_minor;
}
[StructLayout(LayoutKind.Sequential)]
public struct WKSTA_INFO_101
{
public PlatformId wki101_platform_id;
public IntPtr wki101_computername;
public IntPtr wki101_langroup;
public int wki101_ver_major;
public int wki101_ver_minor;
public IntPtr wki101_lanroot;
}
[StructLayout(LayoutKind.Sequential)]
public struct SERVER_INFO_100
{
public PlatformId sv100_platform_id;
public IntPtr sv100_name;
}
[StructLayout(LayoutKind.Sequential)]
public struct SERVER_INFO_101
{
public PlatformId sv101_platform_id;
public IntPtr sv101_name;
public uint sv101_version_major;
public uint sv101_version_minor;
public SVType sv101_type;
public IntPtr sv101_comment;
}
[DllImport("netapi32.dll", CharSet = CharSet.Auto, SetLastError = true)]
internal static extern int NetApiBufferFree(System.IntPtr pBuffer);
[DllImport("netapi32.dll", CharSet = CharSet.Auto, SetLastError = true)]
internal static extern uint NetServerGetInfo([MarshalAs(UnmanagedType.LPWStr)] string serverName, int level, out IntPtr Buffer);
[DllImport("netapi32.dll", CharSet = CharSet.Auto, SetLastError = true)]
internal static extern uint NetWkstaGetInfo([MarshalAs(UnmanagedType.LPWStr)] string serverName, int level, out IntPtr Buffer);
}
}
}
|
|
|
|
|
ups
just realized that the enums PlatformId and ServerType are defined in another file.
public enum PlatformId
{
Unknown = 0,
DOS = 300,
OS2 = 400,
NT = 500,
OSF = 600,
VMS = 700,
}
[Flags]
public enum ServerType
{
Workstation = 0x00000001,
Server = 0x00000002,
SqlServer = 0x00000004,
DomainController = 0x00000008,
DomainBackupController = 0x00000010,
TimeSource = 0x00000020,
Afp = 0x00000040,
Novell = 0x00000080,
DomainMember = 0x00000100,
PrintQueueServer = 0x00000200,
DialinServer = 0x00000400,
XenixServer = 0x00000800,
ServerUnix = XenixServer,
NT = 0x00001000,
Wfw = 0x00002000,
ServerMFPN = 0x00004000,
ServerNT = 0x00008000,
PotentialBrowser = 0x00010000,
BackupBrowser = 0x00020000,
MasterBrowser = 0x00040000,
DomainMaster = 0x00080000,
ServerOSF = 0x00100000,
ServerVMS = 0x00200000,
Windows = 0x00400000,
DFS = 0x00800000,
ClusterNT = 0x01000000,
TerminalServer = 0x02000000,
ClusterVsNT = 0x04000000,
Dce = 0x10000000,
}
|
|
|
|
|
Hi friends,
How can i switch from http to https and vice versa using c# and .net?
Thanks and Rgds
Nithin
|
|
|
|
|
CP holds articles on that. Search them !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/AllLanguages/General
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
|
Hello to you all,
I was wandering what is the usage percentage of the .Net Framework 1 and 2. Does Microsoft have a statistic regarding this? I know that Adobe has one on Flash Player.
Thank you for your time,
Mihaiu Alexandru
Media Division
|
|
|
|
|
I'm also wondering this, extending to .NET 3.0
We are keen on using WPF but I doubt many people have .NET 3.0 or Vista still. Will it ever be a mandatory update on XP? Is 2.0 mandatory yet? Is there such a thing as a mandtory Windows Update?
Thanks...
|
|
|
|
|
If your customers don't have .Net 3 installed, you can include the runtime as a dependency in the installer so that it is installed.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Yeah or you can check and install it manually. However it takes a good 10 minutes or more to install and sometimes this can be a concern.
|
|
|
|
|
The thing to do is to ask your customers if they are OK with having new .NET 3 functionality. Perhaps explain the benefits of whatever it is you want to do with WPF?
Kevin
|
|
|
|
|
Hi Experts,
The Application is built in .Net Frmework 2.0. And It is a web application. Application has so many links but now and then some of those[random] gives an error. We have implemented custom error message in web.config file.
If I go to that particular aspx file and rename it and revert back it starts working and same with web.config too. So, It seems this issue due to file unaccessible to the application.
since it throws a custom error message so I can not get actual error message. In other hand If I remove custom error message in web.config file that also slove problem due to againg saving web.config file. I do not keep off custom error of long time as it is in production environment.
Any one could please suggest me.
Regards,
Anmol Gupta
|
|
|
|
|
|
Hi to All,
I have got a project developed in .Net 2.0 framework. My machine has .Net 1.0 framework installed on it. To view and run the above mentioned project i have to upgrade my machine to .Net framework 2.0.
Now, i want to know that will it be possible for me to run and view my older projects developed in .Net framework 1.0 after upgrading my machine to .Net framework 2.0 or will it give some compatibility error while opening old projects developed in .Net 1.0 framework.
Anybody can help me please...
Pravin
|
|
|
|
|
.Net runs with Side by side versioning, so it is perfectly possible to have the two co-existing on the same machine quite happily.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi,
what is the non-blocking mechanism to redirect native DLL printf output to file within .NET console exe?
I tried below option:
Start the child process.
Process p = new Process();
// Redirect the output stream of the child process.
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
The disadvantage with this is the Console EXE's window is no longer visible. But I wanted to keep the console window also visible while the printf outputs are redirected to file.
Thank you & Regards, Renuka
|
|
|
|
|
i have stored full paths of pictures in sql server through browse file button. i want to display these pictures on windows form,am using c#
i'have tried the following two codes..but dont understand what's wrong with them
> pictureBox1.Image = Image.FromFile(dr1.GetString(0));
>Bitmap bp = new Bitmap(dr1.GetString(0));
pictureBox1.Image = bp;
i even tried dr1.getstring(0) in double quotations
software student
|
|
|
|
|
Add a watch to your var dr1.getstring(0) and check what's it showing. Its might not returning the correct path.
--------------------------------
txtSignature
|
|
|
|
|
You should never look at intermediate values once you determined the code
does not run properly; chances are they are wrong too.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/AllLanguages/General
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|