|
Yeah i have the same problem. I think the problem got worse when my project became bigger and bigger. But still, it isn't nice, and it is really slowing me down aswell.
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick
|
|
|
|
|
One thing you could try is splitting your project into parts and building the ones you're sure are working right in release mode. I've never done it in .net so I can't be more specific about how. IF you're trying to debug the processor intensive portion though you're more or less stuck unfortunately.
|
|
|
|
|
That sounds like a good idea, but i've got a lot of internal classes and stuff. If i split it up, i've got to make a lot public or re-do many things all over again. (Bad design , i know )
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick
|
|
|
|
|
Is there any chance you turned on native debugging also? I've seen that slow down debugging to a crawl.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hello,
this might not be your problem at all:
I noticed slow debugging whenever a specific software firewall was running in the background on my system. Seems like component control of the firewall wanted to block some data exchange between Visual Studio and the app process. This slowed down debugging significantly and no firewall setting helped.
I solved this problem by going back to an older firewall version.
FTrader
|
|
|
|
|
How do I generate a GUID for a file and also include the GUID in the same file?
|
|
|
|
|
'The new guid
Dim g As Guid = Guid.NewGuid()
'For writing to a textfile
Dim textw As IO.StreamWriter = IO.File.CreateText("C:\SomeFile.txt")
textw.WriteLine(g.ToString)
textw.Close()
'For writing to a binary file
Dim binw As IO.FileStream = IO.File.Create("C:\SomeFile.dat")
binw.Write(g.ToByteArray(), 0, 16)
binw.Close()
Something like that.
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick
|
|
|
|
|
I execute the following command, but want to see if it successfully created the xml file:
cmd = "bcp ""select * from dbName..tableName where StudyNo = " & SN & """ queryout c:\tResultQue.xml -c -S servername -U uname -P pwd"
Shell(cmd)
I tried the following, but it won't work as it executes before the file is created:
If File.Exists("c:\tResultQue.xml") Then
'success
Else
'failed
End If
Thank you for any help!
|
|
|
|
|
Rather than using Shell, you should create a Process object to run the command. The Process class allows you to wait for a return code that signals the execution has terminated.
|
|
|
|
|
|
Good afternoon
XmlTextReader behaves very strange: I have the following
encoding-definition in my (valid) XML-File:
encoding="ISO-8859-1"
If I open the File:
fileStream = new StreamReader (xmlFile);<br />
xmlReader = new XmlTextReader(fileStream);
an read some values, I can see that the Encoding is set
to "UTF-16" and I don't get all data: XmlTextReader
absorbs non UTF-16 characters.
If I explicit define the Stream-Encoding to:
fileStream = new StreamReader(xmlFile, <br />
Encoding.GetEncoding("ISO-8859-1"));
then XmlTextReader works perfect.
Is it wrong to except that XmlTextReader relates it's encoding
to the XML-Definition and not to the stream encoding?
Or: Do I really have to open the xml-file to check the
encoding-property and then to open the xml-file
again using the right stream - encoding?
Thanks a lot for any hint in advance,
kind regards,
thomas
People who wait until the eleventh hour to call on Jesus die at 10:30.
|
|
|
|
|
Hi,
I have a form containing just a Microsoft WebBrowser Object. Im using it to view Excel files in my app (workaround for no OLE support). Only problem is, the controls take a long time to load, so I'm trying to get them to initialize in another thread when the app begins. There are two stages to the init of one such form: the constructor, where the activex control is inited, and the View() command, which causes the control to navigate to the specified file.
I've found that if I call View() straight after calling the constructor, the control freezes and Excel shows an "Out of memory" error box. However, if I move the View() call to when a user presses a button, for example, it works perfectly. It's somewhat strange, and i cant find any events that tell me when the control is finished initing. Can anyone help me please?
Thanks in advance
Mankeyrabbit
|
|
|
|
|
Hi,
I have created an dll Using .NET framework 2 (Beta 2) with CLR option off
(as my underlying implementation is C++).
1. Now when I am trying to deploy this on a machine which has just .NET framework 2 redistributable on it. I get error while registering this dll there.
I have kept Manifest generation and embed manifest options ON.
2. When I switch them (Manifest) OFF : It works fine, gets registered on that machine.
But on system with .NET framework 2 intalled and having XP, it fails to register...
Any suggestion why this must be happening..
thanks & regards
ajay
|
|
|
|
|
i have confusion that About CLR Memory Allocation / De-Allocation:
That if an managed class written in VC++.Net:
For e.g:
__gc class Client1
{
public:
Client1()
{
}
~Client1()
{
}
static double Square (double value )
{
value = value * value;
Console::WriteLine("Client1 Returning {0}",__box(value));
return value;
}
};
and i try to allocate it's instance as:
(1): Client1 * cl1 = new Client1();
and do not explictly delete it , then is it posssible that this instance will automatically be deleted by <CLR> of .Net?
-----------------------------------------------------------------------------
(2): An other confusion i have is that if i allocate an array of
<Client1> type objects such as:
Client1 * cl[] = new Client1 * [3];
will this instance will automatically be deleted by CLR or it also have to
explicitly destroyed using syntax < delete []cl; >
-----------------------------------------------------------------------------
(3): I create an delegate in VC++.Net
__delegate double Square(double);
use it in <_tmain> as:
Square * sq1 = new Square(0,&Client1::Square);
sq1->Invoke(3);
will the instance of this <sq1> delegate type object will be
deleted automatically by CLR or not?
|
|
|
|
|
in Managed code GC control all of these de-allocations automatically
,actually GC check them periodically and collect everyone of them that
ain't used.
.Net Developer
|
|
|
|
|
Hi everybody I hope somebody can find a suggestion for this problem
I wrote store proc that work correctly in QueryAnalyzer but when I
call it from my project it make error "system error"
look at it:
CREATE PROCEDURE spSer_contact
@contactGroupID uniqueidentifier,
@countryID uniqueidentifier,
@contactName varchar(100),
@city varchar(50),
@phoneNumber varchar(100)
AS
declare @SqlString varchar(2000)
set @SqlString = 'SELECT contact.contactName,
contactgroup.contactGroupName,
country.countryName, contact.city,
contact.street, contact.zipCode,
contact.phoneNumber, contact.faxNumber,
contact.telex, contact.email,
contact.webSite, contact.comments,
contact.attachment,contact.contactID,
contact.contactGroupID, contact.countryID
FROM contact INNER JOIN contactgroup
ON contact.contactGroupID = contactgroup.contactGroupID
INNER JOIN country
ON contact.countryID = country.countryID
WHERE'
if (len(cast(@contactGroupID as varchar(38))) != 0)
set @SqlString=@SqlString+' contact.contactGroupID='''+cast (@contactGroupID as varchar(38))+''''
if (len(cast(@countryID as varchar(38))) != 0)
if (SubString(@SqlString, len(@SqlString) - 4, 5) = 'where')
set @SqlString = @SqlString + ' contact.countryID = '''+cast(@countryID as varchar(38))+''''
else
set @SqlString = @SqlString + ' and contact.countryID = '''+cast(@countryID as varchar(38))+''''
if (len(@contactName) != 0)
if (SubString(@SqlString, len(@SqlString) - 4, 5) = 'where')
set @SqlString=@SqlString+' dbo.contact.contactName='''+ @contactName+''''
else
set @SqlString=@SqlString+' and dbo.contact.countryID= '''+ @contactName+''''
if (len(@city) != 0)
if (SubString(@SqlString, len(@SqlString) - 4, 5) = 'where')
set @SqlString = @SqlString + ' dbo.contact.city = '''+@city+''''
else
set @SqlString = @SqlString + ' and dbo.contact.city = '''+@city+''''
if (len(@phoneNumber) != 0)
if (SubString(@SqlString, len(@SqlString) - 4, 5) = 'where')
set @SqlString=@SqlString+' dbo.contact.phoneNumber= '''+ @phoneNumber+''''
else
set @SqlString=@SqlString+' and dbo.contact.phoneNumber= '''+ @phoneNumber+''''
exec (@SqlString)
GO
====================
//sample code for retriving data by store proc
SqlConnection cn = new SqlConnection(connectionString);
SqlCommand cm = new SqlCommand("[spSer_contact]",cn);
cm.CommandType = CommandType.StoredProcedure;
SqlParameter pm = new SqlParameter("@contactGroupID",SqlDbType.UniqueIdentifier,16,"contactGroupID");
pm.Value = listBox1.SelectedValue;
cm.Parameters.Add(pm);
SqlDataAdapter da = new SqlDataAdapter(cm);
DataSet ds = new DataSet();
da.Fill(ds,"contact");//this have problem error message is (system error)
dataGrid1.DataSource = ds.Tables["contact"];
if somebody find a solution for this problem please send it
thanx
|
|
|
|
|
how can i export .Net Native data types such as for e.g [string]
to a calling C# program ?
|
|
|
|
|
4 of the (essentially) same questions all in a row...was it really necessary?
|
|
|
|
|
how can i export .Net Native data types such as for e.g <string>
to a calling C# program ?
|
|
|
|
|
|
Is there any proper way of returning string from a function in a DLL ,
written in VC++.Net to the calling C# program.
plz i need this solution urgently....................
|
|
|
|
|
C# strings are unicode, so perhaps you need to return a BSTR ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
What is the proper way of calling code written in VC.Net from C#
|
|
|
|
|
As You know in vc.net you can write managed and unmanaged code
Unmanage Code:
if you want to use unmanaged code use platform invoke
P/Invoke to call function you have in dll
Managed Code:
you can compile your code and reference this assembly from your project
MCAD
|
|
|
|
|
Don't know if this is right to chip into your current topic or should I start a new one BUT....
There are functions in C++ like
"CVideoModes:CurrentVideoMode(CurrentMode)" that do not exist ( or I can't find them!)in C# in the .NET framework.
Where can I read more about imbedding C++ code in a C# program?
Wej Parry
|
|
|
|