|
It is. .NET target is also set to 2.0 for the production environment.
|
|
|
|
|
Have you tried to reinstall .NET Framework and run it as administrator ?
|
|
|
|
|
Mmmhhh... interesting thought. No, I haven't. However, I have already 2 machines with some kind of symptom. The production environment is under .NET 2.0 and my machine under 3.5. The project targets specifically 2.0.
Hope this helps
|
|
|
|
|
My developing PC is also .NET 3.5 with VS2008, and the production system is XP with .NET 2.0.
It works great... without any problem.
|
|
|
|
|
It worked for me too at the beginning - that's why I don't think this is the issue.
It sounds like I'll have to create a new project and import my current code until it breaks...
|
|
|
|
|
Hi,
your static Main() method is inside some class; the static constructor of that class, if any, will run first.
As a console app, chances are all/most/large parts of your code are in that class. I suggest you move them out, keep the class containing static Main() as simple as possible, put everything else in another class, either static or instantiated once. That will ease your debugging.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Sounds like a good plan. Yes, I have a few things in the main class. I'll have a look tonight.
Thanks!
|
|
|
|
|
Hi Luc,
In the end, I tried to create a new console project with just an empty Main() and tried to step into it - I can't figure out how to remove more from the main class... I tried to step into Main() and had the same AccessViolationException error about Windows.Forms. So I gave up and am trying to reinstall VisualStudio. It's weird... and I could have a better use of my time then trying to correct M$ errors... I'm under Vista SP2 (well, Windows still thinks that it is under SP1 - the machine is brand new and Windows is having problems since I tried to load SP2). Just hope I won't have to reinstall the whole machine from scratch.
|
|
|
|
|
I would run first outside Visual Studio, and try on a second PC. If it behaves badly outside VS and only on one machine, then I would reinstall the .NET Framework on that machine, rather than reinstalling/fixing VS.
If it runs fine outside VS, or badly on both machines, then I would reinstall VS.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
I tried to reinstall VS but no luck: it is still not able to debug a freshly created console project
I'm frustrated because I just bought a new machine to run as my development machine and VS won't run properly. I've spent a week setting it up and it looks like I'll have to restart the process - and, meanwhile, I can't finish my current project (which is becoming urgent). Why do things have to be so complicated with Windows?!?
|
|
|
|
|
Issue fixed: since I had issues with the Windows updates, I finally had to reinstall the whole machine from scratch - which now works! I'll be able to retake my productive work.
Thanks for your support
Olivier
|
|
|
|
|
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Well, it runs fine on my machine outside the debugger - that's why I suspect VS has an issue. I should know in a few minutes now.
|
|
|
|
|
I am using iTextsharp DLL for generating pdf's in my project. Does this dll need any license.
|
|
|
|
|
the project is in sourceforge, it means : opensource.
|
|
|
|
|
According to the license information in SourceForge, it uses the GNU Lesser Public General License. I'm not an expert on it, but I think that means you can distribute it with your application without including a license text document
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
Thanks
|
|
|
|
|
HI,
I need to code in C# to input a username and password for an authentication dialog box in Windows while trying to access a share in another system. The idea here is to pass the username and password in a function as argument so that this function will automatically enter both (username and password) once the Windows dialog box for Aithentication pop ups while accessing a share in any other system.
Can you please help me out with any API or any other piece of code to work out!
|
|
|
|
|
|
Is there such good tutorial on Windows Messaging that uses WndProc?
|
|
|
|
|
Hi all
I am trying to display the value of a variable in a label.
Easy enough I hear you say, but the variable can be changed by many different methods and functions, (some in dll's,) none of which trigger any specific event that I would normally use to update the label.
I need the label to show the current value of the variable in 'real time.'
public class MyClass
{
public DateTime datStart;
public DateTime datNext; <======== This is the one I'm trying to show
public int intParam1;
public int intParam2;
//Extra fields removed for clarity
}
And then in my form code:
MyClass _myVar = new MyClass();
I have a label called lblInformation that I would like to always show the value of _myVar.datNext.ToString()
I've spent many hours trying to find a solution so any help will be very much appreciated.
Thank you
|
|
|
|
|
Hi,
this is what I do in such situations:
- create a Windows.Forms.Timer that ticks a few times per second, say 10Hz
- in its Tick handler, set Label.Text=latestValue.ToString()
- done
Thay isn't exactly real-time, however it is almost as fast as the human eye can cope with, and it does not waste CPU cycles on updating all the time assuming the variable could actually be changing at a much higher rate.
BTW: by using the right timer, I also avoided cross-thread problems.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Luc
Thank you for a prompt and elegant solution to my problem.
Regards
Martyn
|
|
|
|
|
you're welcome.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Maybe I am understanding the question, so I will tell you what I would do...
Is it the case that this is an existing class that is used in many different places already, so you don't want to change it to much.
If you have access to the code, you can do this...
First change the member variable to private and rename.
private DateTime dateNext;
The add an event.
public event EventHandler datenextChanged;
Then add a property with the existing name.
public DateTime datNext
{
get{return dateNext;}
set
{
if(!datNext.Equals(dateNext) && datenextChanged != null)
datenextChanged(this, EventArgs.Empty);
}
}
Then you just need to subscribe to this event on your object and update the label in the handler.
Maybe this will work for you if I am understanding the problem.
Thanks,
Wendell
|
|
|
|