visual-studio-2010

Why don't I get code coverage results for C++/CLI project in Visual Studio 2010?

馋奶兔 提交于 2020-01-06 16:22:02
问题 I've recently upgrade my solution to Visual Studio 2010. I have 4 projects I want to cover using unit tests - 3 C# and 1 C++/CLI. I get coverage for the C# projects but not for the C++/CLI project. I did get for all of them in Visual Studio 2008. I've configured the assemblies using testrunconfig -> Data and Diagnostics -> Code Coverage -> Configure. Why don't I get code coverage result for the C++/CLI project? 回答1: I've found out what was wrong. It appears that the upgrade from Visual Studio

Expected database model is inconsistent in real-time

こ雲淡風輕ζ 提交于 2020-01-06 14:20:42
问题 In this question, I was facing an issue where I was writing an update for a deployed application to bring the database up to date with the newer version we are deploying. Basic outline as follows: Began with currently deployed version of application Added new functionality that used existing database Added new database tables and relationships Added new functionality that depended on the new databse structure Testing complete, ready for deployment The issue here is that the currently deployed

importing txt file and manipulating string to do calculations?

喜你入骨 提交于 2020-01-06 14:16:21
问题 In VB2010 I need to process a text file which has multiple lines as follows: Student name, 65, 42, 71, 55 Student name 2, 40, 42, 54, 45 etc. I need to process the file, finding: the overall end of year mark and grade each user received the student who got the highest mark the average overall mark the list of students who achieved a particular grade that the user can specify. Grades: 70% - 100% = D, 60% - 70% = P1, 50% - 60% = P2, 40% - 50% = P3, 0% - 39% = F I am trying to put a data

“IndexOutOfRangeException: Index was outside of the array.” exception occured

坚强是说给别人听的谎言 提交于 2020-01-06 14:08:14
问题 I encountered this exception while setting the SetKeyName method of ImageCollection of ImageList. this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream"))); this.imageList1.TransparentColor = System.Drawing.Color.Fuchsia; this.imageList1.Images.SetKeyName(0, ""); this.imageList1.Images.SetKeyName(1, ""); i have used this "imageList1.ImageStream" in my Main Form too, and it works fine there. I am stuck here and i do not know what

Unwanted changes in .csproj file on build

戏子无情 提交于 2020-01-06 14:08:12
问题 I'm trying to auto-detect web.configs as part of a transform pre-build event in one of my web application project files, this code goes up one folder level from my project file and gets all web.configs in every directory and sub directory: <ItemGroup> <WebConfigsRelativePath Include ="..\**\Web.config"/> </ItemGroup> This works great but everytime I build and exit Visual Studio, I get a prompt asking me if I want to save changes made to my solution file. If I select yes, and open the project

Visual studio unit testing “Start Debugging” starts all tests

雨燕双飞 提交于 2020-01-06 14:01:18
问题 Visual studio unit testing starts all tests when I use "Start Debugging" from Debug menu, instead just ones selected in Test List editor or Test results window. It's really annoying since I use shortcut to start projects not only while testing, and number of times I just hit that key automatically and VS starts all tests instead just one or two that I am currently debugging. Can this be changed to just run selected tests in Test List Editor ? UPDATE : I am aware of start commands under Test

Shape not drawing at mouse position on inkcanvas C# WPF

心已入冬 提交于 2020-01-06 12:53:10
问题 I use the following code to draw a square on an inkcanvas at the position of the mouse. But it doesn't draw the shape at the centre of the mouse position, instead slightly to the right and much lower as demonstrated by the following image: Additionally I would like to stop the pen from drawing when I click to add a shape to the canvas. How can I correct the positioning and stop the pen drawing? private void inkCanvas_MouseMove(object sender, MouseEventArgs e) { cursorCoords.Content = Mouse

wcscat_s problem

混江龙づ霸主 提交于 2020-01-06 11:55:46
问题 Hi people i am currently working at my second visual studio made project :) . I am a delphi coder so please excuse my ignorance. I want to write a simple routine to list some files and i wanted to write a simple function like Delphi's IncludeTrailingPathDelimiter() It's a simple function witch adds a \ to a file path if is not there... So i came up with this void listfiles(wchar_t * root) { if (root[wcslen(root) - 1] != L'\\') wcscat_s(root,wcslen(root)+2,L"\\"); printf("%S",root); } It works

Calling static function of C# .NET in C (ICLRRuntimeHost_ExecuteInDefaultAppDomain)

夙愿已清 提交于 2020-01-06 10:40:48
问题 I have this class KernelHelper which is written in C# .NET Framework 2.0. What I want to do is call its static functions in a C program. namespace Kernel.Client { public class KernelHelper { public static int testc(string msg) { // Removing the message box does not change anything System.Windows.Forms.MessageBox.Show(msg); return 0; } // ... } } which compiles and does not seem to make any problems so far. But calling ICLRRuntimeHost_ExecuteInDefaultAppDomain() returns 0x80131513 which is

How to bind datalist in jquery

谁说我不能喝 提交于 2020-01-06 08:48:09
问题 I want to bind my datalist in jquery. Here is my client side code: <head> <script src="jss/jquery.js" type="text/javascript"></script> <script type="text/javascript"> $(function () { $.ajax({ type: "POST", url: "WebForm1.aspx/GetProducts", data: '{}', contentType: "application/json; charset=utf-8", dataType: "json", success: OnSuccess, failure: function (response) { alert(response.d); }, error: function (response) { alert(response.d); } }); }); function OnSuccess(response) { $("[id*