|
patelmayur wrote: If, by commenting this line in (Text On A Path in WPF Downloaded Application)
Assuming this refers to an article here on CodeProject, you can use the forum at the end of the article to contact the author.
|
|
|
|
|
Hi everyone,
I am a programer and work with visual studio 2010 and do some c#.
The company provided me a hp proBook 5310m, win7 pro 32-bits laptop with wich I could do my job first using vs 2005 and for something like one year now vs 2010.
Since this laptop is getting old They bought me a new one. A HP EliteBook i7-2920xm, win7 pro 32-bits, a great horse...
The configuration of the OS seems to be similar between each laptop as both have the same OS and are fully up to date. For VS 2010 I exported/imported the settings from the IDE.
So I downloaded the code from the source safe to the new laptop and tried to complete the necessary compiling of the referenced projects before I can start working with the one I am on.
That's where the problem began to start.
The programs in the solution I am developping are mainly targeting the framework 2.
As we are using WCF WebServices we need to reference some dll that come from the framework 3.5 as for instance:
'System.Runtime.Serialization.dll' or 'System.ServiceModel.dll' and a few other ones.
First of all I noticed that I have to re-reference those 3.5 targeting dlls. At this point I get an warning message box saying this dlls are targeting a framework higher than the projects and I should target a higher framework.
I searched the net and found that the solution spreaded around is the one that consist of unloading
the project, edit it and place the tag <<specificverion>>'True'<<specificversion>>' for these referenced dlls.
This solution seems to work but then all other referencing programs must be adapted this way and as the solution contains at least 50 programs and references programs in other solutions and so on it is not realistic to unload and modify all this projects settings at least as I do not have the rights to perform this kind of setting.
Can someone explain me why everything works fine on a laptop and not on another that has the same configuration.
It is driving me mad and I cannot use the new laptop.
|
|
|
|
|
I think changing the the FrameWork to which the project is targeted from IDE may be easier than doing it in the code.
To change from IDE, right click on Project concerned in the Solution Explorer, select Properties menu option, in the opened form, select the Application tab page and in that select the required FrameWork in the Target Framework combo box.
|
|
|
|
|
This method can definitly not be applied as I do not have the rights and there is no way I can convince the team leader to re-target the more than 200 projects splitted in tenth of solutions to framwork 4.
And as the first laptop has the same configuration than the second on wich things do not compile there must be a way to configure the second to work as the first.
In fact this the point of my thread.
Even when the project targets a framework 2 or 3 it seems the framework 4 has a final hand on VS 2010.
Maybe the solution would be to target the laptop itself to use another framework than the 4.0 but I don't know wether is this possible or not.
But thank you for your answer.
|
|
|
|
|
If you are using assemblies from either the 3.0 framework or 3.5 framework, than you should target that specific framework. Why?
Because the target-machine still needs those assemblies that you referenced to be available. Yes, you can add them using a setup, but then you'd be installing "half" of the 3.0 framework.
If the chief doesn't want to move, ask him how he's going to solve these problems
Bastard Programmer from Hell
|
|
|
|
|
Yes maybe but why does laptop1 win7 pro 32 bits works great and the same code on laptop2 win7 pro 32 bits doesn't work?
Is there a machine configuration that can do the trick?
There must be something to configure else where than in the project option.
The error on the laptop2 is raised by the framework 4 at compile time. Maybe the laptop1 doesn't use the framework 4 to compile but I do not have a clue about settings that would tell the compiler to use another framework than the 4.0.

|
|
|
|
|
Stop mixing frameworks a if they were interchangeable. The configuration-trick is to develop against the framework that is installed.
Bastard Programmer from Hell
|
|
|
|
|
Appropriate advice mate and I will carry it to higher levels but why laptop1 works and laptop2 does not?
|
|
|
|
|
AstroBod427 wrote: Appropriate advice mate and I will carry it to higher levels but why laptop1 works and laptop2 does not?
They're both the same environment, as you stated; both Win7, 32 bit. Both will have the .NET 4 framework. Did you install the same things?
There is a difference between the machines. No, not a clue what it might be.
Bastard Programmer from Hell
|
|
|
|
|
Both laptops are of the same brand with win 7 pro 32 bits and with all updates from microsoft.
The only difference that comes to my mind is that laptop1 has VS 2005 wich laptop2 does not have.
|
|
|
|
|
Ej, that would install the .NET 2.0 framework, along with any service packs
The other Win7 machine will probably only have .NET 4.
Bastard Programmer from Hell
|
|
|
|
|
AstroBod427 wrote: Can someone explain me why everything works fine on a laptop and not on another that has the same configuration.
Simple to test really.
Create a NEW project/dll and target it for Net 2. Call it D2.
Create a NEW project/dll and target it for Net 3. Call it D3.
1. Create a NEW application targeting it for Net 2.
a. Use D2
b. Use D3
2. Create a NEW application targeting it for Net 3.
a. Use D2
b. Use D3
Myself, not having tried it, I would suspect 1a, 2a, 2b all are possible. 1b is not.
If that is true, then you can be sure that whatever the difference you are seeing it fits into one of the above. On both machines.
|
|
|
|
|
I had a similar problem with my HP notebook.
The problem was that HP defines an environment variable:PLATFORM=HPD.
I just removed it and now everything works fine.
You can google on it.
regards,
Groover.
|
|
|
|
|
That's a true WTF!
Shame on HP.
|
|
|
|
|
Unfortunatly this has not worked with the case I am struggling in.
The Platform variable was set to anyCPU...
|
|
|
|
|
Unexpectedly this procedure revealed positive for both laptops... 
|
|
|
|
|
Do you know what are the steps to implement ETW in C# application. Gone through various links but didn't get any start to end solution.
Below are few question 1. How to create data set controller?
2. How can I create trace as LogMan does?
3. How to create listener?
4. How to interact with listner?
Please suggest.
Thanks in Advance, Sapan
|
|
|
|
|
Why don't you just use a third party dll like log4net to do the tracing for you?
This would help you avoid implementing tracing from scratch.
|
|
|
|
|
hello friends,
I have an one console application w.r.t delegates but while executing am facing 2 errors, here is the code . .
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Delegates
{
delegate string StrMod(string str);
class DelegateTest
{
// replace spaces with hypens
static string ReplacesSpaces(string s)
{
Console.WriteLine("raplacing spaces with hypens.");
return s.Replace(' ','-');
}
//reomve spaces
static string RemoveSpaces(string s)
{
string temp="";
int i;
Console.WriteLine("Removing spaces.");
for(i=0;i<s.Length;i++)
{
if (s[i] != ' ')
{
temp = temp + s[i];
return temp;
}
}
}
//reverse a string
static string Reverse(string s)
{
string temp = "";
int i, j;
Console.WriteLine("Reversing string.");
for(j=0;i=s.Length-1;i--,j++)
{
if(i>=0)
{
temp=temp+s[i];
}
return temp;
}
}
static void Main(string[] args)
{
// construct a delegate
StrMod strOp = new StrMod(ReplacesSpaces);
string str;
//call method through delegate
str = strOp("This is a test.");
Console.WriteLine("Resulting string:" + str);
Console.WriteLine();
strOp = new StrMod(RemoveSpaces);
str = strOp("This is a test.");
Console.WriteLine("Resulting string:" + str);
Console.WriteLine();
strOp = new StrMod(Reverse);
str = strOp("This is a test.");
Console.WriteLine("Resulting string:" + str);
Console.WriteLine();
}
}
}
error:
Error 1 'Delegates.DelegateTest.RemoveSpaces(string)': not all code paths return a value C:\Users\Praveen\Documents\Visual Studio 2008\Projects\Delegates\Delegates\Program.cs 20 23 Delegates
Error 2 Cannot implicitly convert type 'int' to 'bool' C:\Users\Praveen\Documents\Visual Studio 2008\Projects\Delegates\Delegates\Program.cs 43 21 Delegates
As with concept wise delegates calling methods is right but am facing some problem in returning the value and in the for loop i.e, int to bool as both error shows
So plz concern this basic errors and give ur valuable feeds . .
Thanks,
praveen bellary
|
|
|
|
|
praveengb wrote: Error 1 'Delegates.DelegateTest.RemoveSpaces(string)': not all code paths return a value
static string RemoveSpaces(string s)
{
string temp="";
int i;
Console.WriteLine("Removing spaces.");
for(i=0;i<s.Length;i++)
{
if (s[i] != ' ')
{
temp = temp + s[i];
return temp;
}
}
}
This method does not return anything if the if-case is never true. This leads to 'not every possible scenario' is returning a string as expected. Add a return statement after 'for ' ends to correct it. If nothing else, return an empty string.
praveengb wrote: Error 2 Cannot implicitly convert type 'int' to 'bool'
Your checking condition in for loop here:
for (j = 0; i = s.Length - 1; i--, j++)
It should be a boolean true-false condition. Try:
i <= s.Length -1
|
|
|
|
|
Hi All,
is it possible to install an sql server 2008 with my c# windows application setup.
Please help me if it can.
thanks alot.
|
|
|
|
|
|
Hi,
Thanks you for your reply, but when i add the sql server as a prerequisites to my setup there is no way to set the instance name for the sql server that must installed.
do you know how to do that.
and do you know how to add custom dialog with different controls such as 2 radiobuttons and 2 textboxes.
Thanks alot for your help.
|
|
|
|
|
|
You should NOT be doing that.
SQL Server should be installed seperately by the user, if at all. Your application installer should ask the user for the SQL Server connection details, like servername, IP address, port, instance name, username and password to use to install/attach your database.
If the user already has SQL Server installed, they can use that, as well as putting the database on a seperate machine from the one your app is installed on.
By putting the SQL Server installation inside your own setup, you are limiting the choices the user has to install your app.
|
|
|
|