cparsons's Q&A profile
Visual Basic Error in Creating a Serializer, is it my code?
Here is a small code example that will consistently create a run time error in my VB .Net environment. I am curious if others will have similar results. Imports System Imports System.Xml Imports System.Xml.Serialization Public Class Group Public DataSet As Integer Public DataSetSpecified As Integer End Class Public Class Run Shared Sub Main() Dim myMapping As XmlTypeMapping = (New SoapReflectionImporter().ImportTypeMapping(GetType(Group))) Dim mySerializer As XmlSeri ...Show All
Visual Studio Team System Unit tests for web pages (ala NUnit ASP)
Hello, I'm writing a small web app to give Beta 2 a full spin. I want to create unit tests for the pages in the app, i.e., to test the Login page, sign up page, etc. A while ago, I used NUnit ASP, which allows me to directly interact with the controls on the page. For instance, one could do something like this (psuedo): loginBox.Text = "myusername"; passBox.Text = "123"; loginButton.Click(); Assert(errorLabel.Text == "Invalid login."); I've heard that the VSTS testing tools have some magic that allows them into the page and can give me this same kind of experience via a Unit Test. However, I'm unable to create Unit Tests for the web ...Show All
.NET Development SerialPort Problem - Possible Encoding problem?
Hi, we are using the SerialPort class and cannot seem to get it to receive any data. We don't receive any exceptions when starting up, just no data events. We have written a very simple test application to verify that there is indeed a problem. When using an application such as Hyperterminal or the old MSComm control, data is received just fine. We are using the release version of the 2.0 framework (not a beta) The serial port is a typical serial port in the back of a desktop PC (it's not a USB to serial or anything). The data coming across the wire is binary data - not text. Is there any sort of way to figure out what is going on This ...Show All
Windows Forms Graphics question
Ok my problem is with Graphics class //------------------------------------------------------------------------------------------------ private void Form1_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; g.DrawLine(new Pen(Color.Black), new Point(30, 30), new Point(30, 100)); g.Dispose(); } you see i declare Graphics g=e.Graphics where 'e' is the PaintEventArgs and then draw a line //---------------------------------------------------------------------------------------------- private void button1_Click_1(object sender, EventArgs e) { Graphics g = CreateGraphics(); g.DrawLine ...Show All
Visual C++ iostream and wchar_t
Hi, I would like to use the C++ iostreams. Especially ifstream and ofstream. But the require a filename of type char. But I would like to use wchar_t. BYTE* Load( wchar_t * filename) { ifstream is(filename); // error, "char" required :::::::::::::::::::::::: :::::::::::::::::::::::: return NULL; }; How can I tell the compiler, that I want to mix char and wchar_t. Are there other libraries that allow me to use wchar_t instead of char for the filename. If yes, will the stream be char or wchar_t. What I want to do is to do all my programming using wchar_t, but of course the content of the file might be still of typ ...Show All
Visual Studio Team System Question about binding and executing once per record in the data source
Hi, all. I have a question about how binding to a database works in web tests. I have a set of SQL Server tables that I use to bind my web tests to a data source. If I set my web test to execute once per record in the data source and I bind my web test to several tables, will it execute once per number of records in the first table or will it actually execute once per combination of each record. Here's an example. Let's say, my web test has two steps: Step1 and Step2. Step1 has some post parameters bound to fields in Table1. Step2 has some post parameters bound to fields in Table2. If both tables (Table1 and Table2) have two rows each, ...Show All
Visual Studio Team System Error TF50604 during Installation
I've got a problem during the installation of the TFS 2005 RC. First I've set up a brand new PC with Windows 2003 Standard, Active Domain Controller (= ADC; and new DNS; the new domain is addc.mydomain, mydomain is an existing NT-domain, but I used "New Tree", so this shouldn't be the problem...) After that I created three new accounts on the ADC-computer (TFSSetup, TFSService, TFSReports), TFSSetup is a Domain Admin, the two others are Domain Users. On the other computer ready for the TFS (SingleServer) I did everything according to the chm-file (TFSInstall.chm), which includes installing hotfixes, sql server 2005 standard, and so ...Show All
Software Development for Windows Vista Another Windows SDK installation issue
I am installing the January Windows SDK on my laptop which has VS2005 Standard (from the best of launch event). It does not have .NET CF 2.0 installed, yet I am getting the .NET CF 2.0 installation error others have reported here. I am using the virtual DVD drive to install the SDK. Here is the end of the log: 11:36:58 PM Saturday, January 28, 2006: [SDKSetup:Error] Config_Products_Configure: Configuration of Product Microsoft .NET Compact Framework 2.0 (failed): Fatal error during installation. 11:36:58 PM Saturday, January 28, 2006: [SDKSetup:Info] Config_Products_Configure: End configuration of product: Microsoft .NET Compact Framework ...Show All
Visual Studio Team System One problem in security setting
TFS : Beta3_refresh VS 2005: Visual Studio 2005 Team edition for software developers I create a team project called "TestTeamProject". There is a file in this team project. Its path is $/TestTeamProject/Test/test1.txt. I also create a Team Foundation Group called [TestTeamProject]/TestGroup. and add user (domain\ABC) to the group. Grant the read and check out permission to this group. domain\ABC connect to TFS, and he can check out and undo check out $/TestTeamProject/Test/test1.txt. I remove user(domain\ABC) from the [TestTeamProject]/TestGroup. domain\ABC restart his machine and connect to TFS again. he still can ...Show All
SQL Server Cannot view actual report
Hi, I am using the reportviewer control the following way <% @ Page Language ="C#" AutoEventWireup ="true" CodeFile ="RenderReport.aspx.cs" Inherits ="pages_RenderReport" Title ="View Report" %> <% @ Register Assembly ="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace ="Microsoft.Reporting.WebForms" TagPrefix ="rsweb" %> < html runat ="server"> < head runat =server></ head > < body > < form runat =server ...Show All
Visual Studio Team System Problem with Tests after renaming project
Hi, We ended up having to rename both the project under test as well as the associated unit test project. The unit test project used to create a binary called TestContext_UT.DLL. It now creates a binary called UnitTestTest.dll. When you attempt to run a unit test, however, the test continues to look for TestContext_UT.DLL as the storage for the test. Where to you change that information One more question, why can't I delete a test from the test list. I can disable it, there is a CUT in the menu, but it doesn't do anything As I was adding and removing tests, the test list continued to contain items that no longer existed. Thanks. ...Show All
.NET Development AccessViolationException when client is terminated
Hi, We have just migrated our client/server application to .Net 2.0. After that we constant get an unhandled AccessViolationException in the server program when the client program is terminated! The only stack trace I can get is: at System.Net.UnsafeNclNativeMethods.OSSOCK.WSAGetOverlappedResult(SafeCloseSocket socketHandle, IntPtr overlapped, UInt32& bytesTransferred, Boolean wait, IntPtr ignored) at System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped) at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt ...Show All
Visual Studio Team System Changesets, Merges, and atomic cherries.
I've been having a look at the capabilities of changesets and merges, in particular I was interested in the following: * Cherry-pick merges -- you can merge specific file change to another branch without merging the changes that were included in previous versions of those files. Thus, if you've got 2 bug fixes which touch the same file, you can merge the second one without merging the first. So, I conducted the following simple experiment, involving a single file, and merge from a parent branch $/Test/Main to a child $/Test/Main-branch . I added a file A.txt into $/Test/Main, with a single line of text, Original Code. History ...Show All
Visual C++ C# to C++
using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; namespace Map_Maker_Worker { /// <summary> /// Dialog for a useless application that runs a checksum on multiple maps. /// </summary> public class frmSigner : System.Windows.Forms.Form { private System.Windows.Forms.Button btnSelectMaps; private System.Windows.Forms.Button btnRemove; private System.Windows.Forms.Button btnSign; private System.Windows.Forms.ListBox lbx; private System.Windows.Forms.OpenF ...Show All
Visual Studio Tools for Office How to start and stop Excel from WinForm app?
I have a WinForm app. I use Excel to print a report. Different from within a VSTO project, I do not have access to an Excel process. I have to start Excel explicitly. Now I am using the following code to start and stop Excel. public class ExcelInterface { private static Microsoft.Office.Interop.Excel.ApplicationClass excelApp = null; public void StartExcel() { if( this.excelApp == null ) { this.excelApp = new Microsoft.Office.Interop.Excel.ApplicationClass(); } } public void StopExcel() { if( this.excelApp != null ) { Process[] pProcess; pProcess = System.Diagnostics.Process.GetProcessesByNa ...Show All
