visual-studio-2010

How to stop C# compile on first error in VS 2010 (VS 2008 macros don't work)!

守給你的承諾、 提交于 2019-12-30 04:17:11
问题 New information : This question has been re-asked here and has been correctly answered by Noah Richards with a solution that works in VS 2010. At work we have a C# solution with over 80 projects. Is it possible in VS 2010 to automatically stop compilation as soon as an error is encountered rather than the default behaviour which is to continue as far as possible and display a list of errors in the error window? I'm happy for it to stop either as soon as an error is encountered (file-level) or

Before and AfterBuild Target in Visual Studio not firing

风流意气都作罢 提交于 2019-12-30 03:50:27
问题 I am doing the following: I have created a default class file project Edited the csproj file to include Pre and Post BuildEvents Uncomment the default commented out BeforeBuild and AfterBuild targets The BeforeBuild and AfterBuild targets are not called form within Visual Studio but are from msbuild command line, why is that? I would rather use msbuild targets rather than the PostBuildEvent as if gives me more power and flexibility, assuming it works. Cheers, adam I shortened some of the

The thread '<No Name>' (0xb24) has exited with code 0 (0x0)

老子叫甜甜 提交于 2019-12-30 03:50:08
问题 whenever i try to run program for example, if i have to run "frmphonebook" so in Application.Run(new frmphonebook()); I typed but when i run it it run another form, and it happens to each and every form and it is displaying output as The thread 'vshost.RunParkingWindow' (0x63c) has exited with code 0 (0x0). The thread '<No Name>' (0xb24) has exited with code 0 (0x0). how to solve this ? 回答1: You can give your threads a name it would also help you in your debugging... But in many apps threads

Downgrade C# Project from visual studio 2010 to visual studio 2008

╄→гoц情女王★ 提交于 2019-12-30 03:17:06
问题 I wrote a visual c# 2008 windows form application ,then i edited the code in a computer which had visual studio 2010,but i can no longer run it in visual 2008,is there a way i can do this? 回答1: When you say "can no longer run it"... what happens? the sln files are not compatible; you'll need different sln files for each VS version the csproj are mostly compatible, although you might see a "version 4 not recognised, using 3.5 instead" warning or two, which is usually fine the cs is compatible

Sealed keyword affects the compiler's opinion on a cast

廉价感情. 提交于 2019-12-30 02:44:12
问题 I have a situation where I'd like the behaviour of the compiler explained. Given a little code: interface IFoo<T> { T Get(); } class FooGetter : IFoo<int> { public int Get() { return 42; } } The following compiles and runs: static class FooGetterGetter { public static IFoo<T> Get<T>() { return (IFoo<T>)new FooGetter(); } } If we make a change to the signature of the Foo class and add the sealed keyword: sealed class FooGetter : IFoo<int> // etc Then I get a compiler error on the following

Link build configuration to a publish profile

和自甴很熟 提交于 2019-12-30 02:37:09
问题 Why does Microsoft not allow you to link a build configuration to a publish profile. Instead it tells you to use the dropdown in the main VS interface. I find this extremely annoying, because we use config transforms to change our config settings based on the environment we are publishing to (such as database connection strings). We also check-in the .Publish.xml file, so that the publish paths are saved in source control. If someone forgets to change the build configuration they could

Need help using instancing in XNA 4.0

会有一股神秘感。 提交于 2019-12-30 02:26:27
问题 I have come to inquire about instancing in XNA I am a beginning XNA developer, only recently stepping up from 2D to 3D games. I'm trying to draw a large number of cubes made solely out of vertices in code. As one might suspect, drawing a large number of these cubes causes quite a bit of stress on my computer. As I was looking for a way to increase performance I came across the term "instancing". Not knowing how instancing works in XNA 4.0, I've looked around for a tutorial suitable for

Generate HTML / Help files from VS 2010 C# XML documentation

南楼画角 提交于 2019-12-30 01:38:27
问题 I am looking for a good tool creating HTML / Help files from my VS2010 XML documentation. I have found some commercial tools, such as .Net documentation tool VSDocman I am sure there are more, I just list these two as examples. Also there are simple XSLT stylesheets around to convert the XML to HTML documentation. What are you using, e.g. is there a free tool to do the conversion, maybe as Add-In. Just to clarify, basically I have found two types of tools: The ones converting the XML

Import Existing C++ Source Code into Visual Studio

微笑、不失礼 提交于 2019-12-30 00:28:16
问题 I am trying to import an existing c++ application's source into visual studio to take advantage of some specific MS tools. However, after searching online and playing with visual studio, I cannot seem to find an easy way to import existing c++ source code into visual studio and keep it structurally intact. The import capacity I did find flattens out the directories and puts them all into one project. Am I missing something? (This is all unmanaged C++, and contains specific builds for win/unix

Auto-skip STL functions during step-by-step debugging in MSVC++2010

有些话、适合烂在心里 提交于 2019-12-29 18:42:12
问题 It often happens that I debug through a program step-by-step. I generally always use the "step into" button to halt at every line in the section that I am debugging, and when I think I got the current line, just click again. What's really disrupting this work flow, however, are library calls. If there's something like a string length calculation or a map storage or similar, the debugger will jump into some STL file and continue there. I then have to press "jump out" to skip back into the