|
I have an application in which is made in .NEt 2008 in c#.
I want to set up wizard for this application.
I am faceing litle problem to make it.
I want to check some prerequisite in the client machine while installing this project.If this prerequisite does not evaluated true the installation program will be automaticaly stoped with throwing proper error message.
For my application prerequistes in client machine are
1. AutoCAD 2008 or higher version
2. .Net framework for 2008 or higher version
3. windos XP,windows 2000
Can any one guide me how to check these 3 prerequisite in client machine
with regards
|
|
|
|
|
|
Hi. I have installed .NET Framework 4.0 in my computer.
I have created 3 .NET Applications of versions 2.0, 3.5 and 4.0. When I tried to run all three, only the 4.0 version ran successfully, the other two(2.0 and 3.5) show an error.
Does this mean, for a computer without .NET framework installed, that I have to install the .NET Framework 2.0 and 3.5 and not just 4.0?
Thanks.
|
|
|
|
|
Rue Leonheart wrote: install the .NET Framework 2.0 and 3.5 and not just 4.0
Have a look at the Application Compatibility section here.
You need to specify the supportedruntime version in a config file.
|
|
|
|
|
What config file, original one or the application config file. It can't run programs older than version 4.0.
Do you mean, I have to recompile those older programs to target 4.0? What if I'm not the one who made those programs?
|
|
|
|
|
If you are running an exe called myApp.exe, you will need to create an application config file called myApp.exe.config. This config file will then contain the supportedruntime tag.
For more information on the supportedruntime tag see here. For information on configuration file schemas see here.
|
|
|
|
|
So even if I'm not the one who made the exe, all I need to do is make the config file with the same name? Do I need to put it on the same folder as the exe. Thanks a lot.
|
|
|
|
|
Yes, the config file should have the same name, and it should be in the same folder.
|
|
|
|
|
Thanks a lot. That totally helped.
|
|
|
|
|
Hi Guys
I need an urgent help on the below content. I highly appreciate for the help provided, if any.
I am using VS 2008, I am using System.Data.Common namespace to connect to the database server.
I am trying to connect Postgre Database Server.
KINDLY HELP.
It gives me the below error while trying to connect.
System.InvalidOperationException: The 'System.Data.OleDb' provider is not registered on the local machine.
at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper)
at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.OleDb.OleDbConnection.Open()
at DataAccessLayer.IHTPLDataAccess.OpenConnection() in C:\Documents and Settings\sunpa\Desktop\ProjectTesting\CL\ErrorMessage-24042010\DataAccessLayer\classes\IHTPLDataAccess.cs:line 159
The code is below:-
DbConnectionStringBuilder connectionStringBuilder = new DbConnectionStringBuilder();
connectionStringBuilder.Add("User Id", _userID);
connectionStringBuilder.Add("Password", _password);
connectionStringBuilder.Add("Provider", "System.Data.OleDb");
connectionStringBuilder.Add("location", _dataBase);
connectionStringBuilder.Add("Data Source", _serverName);
connectionStringBuilder.Add("timeout", "1000");
DbConnection _connectionObject = null;
DbProviderFactory factoryObject = null;
factoryObject = DbProviderFactories.GetFactory(_DBProvider);
_connectionObject = factoryObject.CreateConnection();
_connectionObject.ConnectionString = connectionStringBuilder.ToString();
_connectionObject.Open(); // This give me error as below
System.InvalidOperationException: The 'System.Data.OleDb' provider is not registered on the local machine.
at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper)
at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.OleDb.OleDbConnection.Open()
at DataAccessLayer.IHTPLDataAccess.OpenConnection() in C:\Documents and Settings\sunpa\Desktop\ProjectTesting\CL\ErrorMessage-24042010\DataAccessLayer\classes\IHTPLDataAccess.cs:line 159
Pradeep Sen
Senior Developer
Mumbai
India
modified on Saturday, April 24, 2010 3:16 AM
|
|
|
|
|
You old the OleDb Connection object that the Data Provider was "System.Data.OleDb". That's not a data provider. That's a namespace in the .NET Framework.
I think the provider your looking for is called "PostgreSQL OLE DB Provider". I've never used PostGre before, so I don't know for sure.
|
|
|
|
|
Hi Dave
Thanks for your input.
Actually I am trying to make a data connection class independent of database vendors.
Now If the Provider is not System.Data.OleDb and something like "PostgreSQL OLE DB Provider", then how can I make it generic which the developer will like to use only System.Data.OleDb to connected to other databases like DB2 or Oracle (thou we have a namespace in .Net for oracle, still u can use System.Data.OleDb)
Thanks for you valuable time.
ANY ONE ELSE THERE WHO CAN HELP OUT
Regards
PS
Pradeep Sen
Project Manager
Kunming
China
|
|
|
|
|
You'd have to let the developer supply you with the DataProvider name or supply the connection object to your code.
Pradeep Sen wrote: thou we have a namespace in .Net for oracle, still u can use System.Data.OleDb
Yep, and by using OleDb, you also lose any optimizations specifice to that provider costing you speed and flexibility.
If it were me, I'd probably supply data layers for specific databases, like Oracle, SQL Server, and Access, then let the developer write their own data layer classes using the interfaces you provide to do so.
|
|
|
|
|
Hi Dave
Thanks for your suggestions.
I was looking to avoid writing different datalayers.
Is there anyway, I can use Postgre using the system.data.common?
Else, I have to take up the layered scope.
Thanks in advance
Regards
Ps
Pradeep Sen
Project Manager
Kunming
China
|
|
|
|
|
The classes found in Common are for writing your own DataProviders. You can read a bit on the subject here [^] (registration is free).
|
|
|
|
|
Does anyone know if it's possible program with .net 4.0 from Visual Studio 2008?
If so, how?
I've already installed .net 4.0 on my computer, but when I when to set the target framework under the project's properties, I can only go up to 3.5. Upgrading to Visual Studio 2010 is out of the question because this is a team porject on multiple machines, and we would have to get licences for all the machines the team is using when we already have licences for 2008.
|
|
|
|
|
You can't target .NET 4 from Visual Studio 2008. What you could do is code your application up in VS2008 and then compile it manually using the .NET 4 compiler directly.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Visual Studio 2008 can only target .NET Framework 3.5, 3.0, or 2.0. Visual Studio 2010 can target 2.0, 3.0, 3.5, 3.5 Client Profile, 4.0, or 4.0 Client Profile and includes an ability to target additional framework releases in the future.
You can install Visual Studio 2010 side-by-side with Visual Studio 2008.
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
Which makes me think it may be possible to hack VS 2008 to use .net 4. (Not that I want to, other than as an exercise, mind you.)
|
|
|
|
|
I think it is a hard-coded list, which would mean it's not possible. In VS2010, when you click the link for "more Frameworks" it simply takes you to the download page for the .NET Framework.
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
Yes, but I had some minor success in trying to trick VS 2008 into thinking that v4 is actually v3.5. It looks like it's mostly a matter of configuring MSbuild.
|
|
|
|
|
No, it's not. You can either use VS2010 or the command line compilers without Visual Studio.
|
|
|
|
|
fct2004 wrote: Does anyone know if it's possible program with .net 4.0 from Visual Studio 2008?
Nope.
You cannot run Silverlight 4 either.
|
|
|
|
|
And you only get the new version of GACUTIL by installing VS 2010.
|
|
|
|
|
Hi, I've been trying to figure out how to send commands for a printer installed in a USB port. Previously I could do this with the LPT1 port by calling kernel32.dll CreateFile method (DLLImport) and sending the commands this way. But with USB ports this doesn't work.
So does anybody know how to do that? Or at least have any article on that matter, I couldn't find anything (sorry if its easy to find, I just suck at finding stuff).
So my requirement is, cycle through USB ports to check if there is any device attached. If there is a device attached, send a command to ask the device to identify itself.
So basically I'll need two things, learn to dynamically cycle through USB port, send commands to it and read the responses.
All of that using C# and .Net Framework 2.0.
Any ideas?
Thanks in advance for any help. Regards,
Fábio
modified on Saturday, April 24, 2010 9:44 AM
|
|
|
|