visual-studio-2010

How to build Debug and Release at once?

无人久伴 提交于 2020-01-01 07:34:30
问题 When I select Build->Build or anything else it only build the currently selected configuration (Debug or Release). How to make it build for example Release also when I'm in "Debug mode" (I have debug selected)? 回答1: You can do this with "Batch Build", although it's not available in the Express version. Anyway, you don't want to be building from the GUI anyway, you should be using msbuild or something of that nature to automate your build process. 回答2: If you want to use the build button and

DesignTime only Error: WPF “StaticExtension” exception

核能气质少年 提交于 2020-01-01 06:33:10
问题 I have this ComboBox <ComboBox Name="company" Width="120" HorizontalAlignment="Right" Margin="5" IsSynchronizedWithCurrentItem="True" ItemsPanel="{DynamicResource Virtualized}" ItemsSource="{x:Static local:Repository.Customers}" SelectedItem="{Binding Path=SelectedCustomer}" DisplayMemberPath="CM_FULL_NAME""/> It runs. It works. Except in the designer, which won't let me do anything because of the error: ArgumentException was thrown on "StaticExtention": Exception has been thrown by the

Use CMake to run a C++ program post-build

亡梦爱人 提交于 2020-01-01 05:54:54
问题 I have an application that is written in C++ that I use CMake to build and release binaries. I'd like to have the CMakeLists.txt script compile and run a CPP file that is used to timestamp and encrypt a license file after it has built the binaries for the application. I've seen examples of running the execute_process command such as this: execute_process(COMMAND "gcc -o foo foo.cpp" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) execute_process(COMMAND "./foo" WORKING_DIRECTORY ${CMAKE

Why doesn't the compiler give an error when an uninitialized variable is returned?

懵懂的女人 提交于 2020-01-01 05:46:08
问题 #include <iostream> using namespace std; int weirdVariable = weirdVariable + 1; int main() { cout<< weirdVariable ; return weirdVariable ; } I was just wondering how this un-initialized variable is not returning error and returning 1.So my question is, how/why is it returning the value "1". Is this program logically valid? Or is it some flaw? 回答1: It's not uninitialized. Variables with static storage duration (like a global variable) are first zero-initialized before any further

Setup project with crystal reports and VS2010 fails to register crystal dlls

假装没事ソ 提交于 2020-01-01 05:43:49
问题 I built some crystal reports in VS2010, and made a setup project for it. It deploys fine on my dev machine, but I get the following error while trying to install it on the client machine. I have googled this error for sometime and found that the VC++ 2005 redistributables are a prereq. I have added these merge modules to my setup project but I still get the same error. I have also added .NET 4.0 as a prerequisite, and still get the same error. Anybody has any ideas? My dev machine is running

how to use __stdcall to qualify C++ lambda?

被刻印的时光 ゝ 提交于 2020-01-01 05:29:06
问题 Foreword--I love C++ lambda, if possible I will use it everywhere. Now I have a lambda requirement, I need to a __stdcall lambda. But I get the following error message: error C2664: 'EnumWindows' : cannot convert parameter 1 from '`anonymous-namespace'::<lambda1>' to 'WNDENUMPROC' 1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called Anybody can help me? Here is my code( EnumWindowsProc is in the function scope ): auto

Report (RDLC) Localization/Globalization

天大地大妈咪最大 提交于 2020-01-01 05:25:14
问题 [VS2010/ASP.NET Web Forms] Hi, In a report (RDLC) I need to provide localization/globalization in two languages (pt-BR and en-US) to the following elements: - Labels/Captions (fixed text) - Report Viewer UI interface (buttons and tooltips to controls like find, next, previous, etc.). - fields formating, according to the current culture What is the best way to achive this? To translate the fixed captions/labels I´ve found some solutions that make a manual translation of RDLC´s XML definition,

Third-party dll crashes program with no exception thrown

假装没事ソ 提交于 2020-01-01 05:15:11
问题 I am using Visual Studio 2010, and coding in C#. I have a third-party dll that I am using in my project. When I attempt to use a specific method, at seemingly random occasions, the program simply crashes, with no exception thrown. The session simply ends. Is there any way I can trace what is going on? 回答1: The way the stack for a thread is laid out in Windows goes like this (roughly; this is not an exact description of everything that goes on, just enough to give you the gist. And the way the

ASP.NET MVC 3 faster localization?

孤人 提交于 2020-01-01 04:56:14
问题 is there any way to speed up the string localization on ASp.Net mvc3 with razor? Lest say I write on my .cshtml "Hello World", and then I want to send that "Hello world" to the resources, with an automatic Id and refactor that string to the calling the resource, with just some clicks. Something like http://resourcerefactoring.codeplex.com/ but for VS 2010 and razor. And Free! Thanks! 回答1: So I touch some few lines of the Resource Refactoring Tool and I make it work with Razor (cshtml files).

Visual Studio 2010 Intellisense squiggles for C code

故事扮演 提交于 2020-01-01 04:49:07
问题 Intellisense in Visual Studio 2010 interprets C code as C++ and marks errors where they don't exist, as in: struct my_struct *s = malloc(sizeof *s); which is valid C, but not valid C++. Is there any way to fix this? 回答1: It is a known bug since at least MSVC 2005. Unfortunately it has become a bigger issue in 2010 since VC now uses Intellisense to mark errors. See this discussion at the MSDN forums for more information. The following statement is disheartening, but I highly recommend that you