visual-studio-2010

WOW64 - running powershell from within Visual Studio

扶醉桌前 提交于 2020-01-05 03:47:06
问题 Can someone please explain, simply, why it is necessary to go through so many hoops in order to run PowerShell (as an external command) from visual studio? I know it has to do with the bit differences but don't get why. The context is a 64 bit Windows 7 OS, 32 bit Visual Studio, and 32 bit powershell from the System32 folder if I remember correctly. A 64 bit OS can run both 32/64 applications without problems, so what is the issue here, and why? By internet searching I believe this has

PropertyGrid mult. controls select, null exception on property set?

﹥>﹥吖頭↗ 提交于 2020-01-05 03:33:11
问题 I have a custom object, ComplexName, that I want to show in the propertygrid (in the VS designer, not at runtime). It all seems to work correctly (with the ExpandableObjectConverter implemented), when I have just one control selected. I can set any\all of the attributes the way I want them to (expanded or via the typeconverter). When I select multiple controls though, the issue starts. At first, When you selected multiple objects with the same property (with the same value), I wanted the text

How can I determine the author of a block of code programmatically in TFS?

早过忘川 提交于 2020-01-05 02:55:07
问题 We are working with Team Foundation Server (Visual Studio 2010). How can I get writer of the specific code block programmatically? 回答1: With TFS API, you may be able to get to that data. Each changeset has a commiter. I would take the code offered up here. From this, you can add: foreach (var change in cs.Changes) { if (change.Item.ServerItem != serverItem) { return; } //Get commiter cs.Committer While this doesn't get you 100% of the way there, it is at least a starting point. 回答2: Fairly

PayPal SOAP API reponses require manual parsing

瘦欲@ 提交于 2020-01-05 02:53:39
问题 I am currently working on a web project that includes implementing PayPal's Express Checkout as payment service. The project is in C#, I am using Visual Studio 2010 and the SOAP version of the PayPal API. The version of the API I am using is 91.0 (tried switching this to other versions but the problem remains) and I am working in the sandbox to do the development. In the SOAP API developer guide I found the WSDL to import the service in my project as web reference. I can do every step of the

Compilation Error: “higher version than referenced assembly ”

拟墨画扇 提交于 2020-01-04 23:07:46
问题 I got error on my view page so I updated my visual studio to mvc4, though I am working on mvc3. I 1st updated using NuGet but it don't works so, I updated through standalone MVC4. so it worked. But when I tried to run MVC3 project it gives me following Error: CS1705: Assembly 'MVC3Project, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System

Visual Studio 2010 Native C++ Code Coverage Coloring Not Working

让人想犯罪 __ 提交于 2020-01-04 15:53:49
问题 I was using Visual Studio 2010 ultimate edition without any service pack to do code coverage test for my native c++ project but Code Coverage Coloring seems not working for me. Are my steps correct? 1) I used the two command line tools vsinstr.exe and vsperfmon.exe to perform instrumentation and code coverage collection on a separate machine without my project directory/source code. I just copied my compiled native .exe file to there. The reason I need to use a separate machine is that my

how to change sql statement to parameterized query?

旧巷老猫 提交于 2020-01-04 15:31:36
问题 I have an sql query that I need change to parameters so I can avoid sql injection. adapter.SelectCommand.CommandText = @"SELECT c.*,(Select Initials FROM users WHERE User_ID = c.CreatedByUser) AS CreatedBy, (SELECT Initials FROM users WHERE User_ID = c.ModifiedByUser) AS ModifiedBy FROM currency c WHERE c.Company_ID = " + Company_ID + " AND c.CurrencyCode = '" + Code.Replace("'", "''") + "' ORDER BY c.Description adapter.SelectCommand.Parameters.Add(new MySqlParameter("company_ID", Company_ID

Duplicate the behaviour of a data driven test

时光总嘲笑我的痴心妄想 提交于 2020-01-04 15:31:14
问题 Right now, if you have a test that looks like this: [TestMethod] [DeploymentItem("DataSource.csv")] [DataSource( Microsoft.VisualStudio.TestTools.DataSource.CSV, "DataSource.csv", "DataSource#csv", DataAccessMethod.Sequential)] public void TestSomething() { string data = TestContext.DataRow["ColumnHeader"].ToString(); /* do something with the data */ } You'll get as many tests runs as you have data values when you execute this test. What I'd like to do is duplicate this kind of behaviour in

Duplicate the behaviour of a data driven test

狂风中的少年 提交于 2020-01-04 15:30:58
问题 Right now, if you have a test that looks like this: [TestMethod] [DeploymentItem("DataSource.csv")] [DataSource( Microsoft.VisualStudio.TestTools.DataSource.CSV, "DataSource.csv", "DataSource#csv", DataAccessMethod.Sequential)] public void TestSomething() { string data = TestContext.DataRow["ColumnHeader"].ToString(); /* do something with the data */ } You'll get as many tests runs as you have data values when you execute this test. What I'd like to do is duplicate this kind of behaviour in

How do I send wide characters using winsock's send() function?

谁说我不能喝 提交于 2020-01-04 14:04:33
问题 It says here that the send function expects const char*. How do I send wide characters? I tried the following: void MyClass::socksend(const wchar_t* wbuffer) { int i; char *buffer = (char *)malloc( MB_CUR_MAX ); wctomb_s(&i,buffer, MB_CUR_MAX, (wchar_t)wbuffer); int buflen = strlen(buffer) + 2; char sendbuf[DEFAULT_BUFLEN]; strcpy_s(sendbuf,buflen,buffer); sendbuf[buflen - 1] = '\n'; int senderror = send(this->m_socket, sendbuf, buflen, 0); // error handling, etc goes here... } This doesn't