visual-studio-2010

Can't Silence Embed Interop Warnings

时光毁灭记忆、已成空白 提交于 2020-01-03 09:24:08
问题 First I've got a third party ActiveX control I need to use. Next I've got to use the stdole library to feed that third party control some images. When I compile under the default settings, I get some warnings: warning CS1762: A reference was created to embedded interop assembly 'c:\Windows\assembly\GAC\stdole\7.0.3300.0__b03f5f7f11d50a3a\stdole.dll' because of an indirect reference to that assembly created by assembly 'XXX\obj\x86\Release\Interop.ThirdPartyControl.dll'. Consider changing the

Is there a way to ensure an MSI installer updates the .exe file every time?

倾然丶 夕夏残阳落幕 提交于 2020-01-03 09:07:42
问题 Is there some easy, hassle-free way to get the MSI installation to always replace the .exe file (i.e. Primary Output) whenever the .exe file is more recent? This is just basic and common sense. Wherever I search there are always complicated discussions about major and minor versions and patches. There must be some simple way to ensure the file gets replaced during an install. Otherwise, what is the MSI file actually doing during the whole installation procedure. It's like a fake install where

Throwing exceptions from ContinueWith

北战南征 提交于 2020-01-03 09:05:14
问题 I am trying to wrap the exceptions that can be thrown by an async task using ContinueWith() . If I just throw from the continuation action things seem to work, but my debugger claims the exception is unhandled. Am I doing something wrong or is this a Visual Studio problem? Is there a cleaner way to do this, or a way to work around my debugger stopping on what is ultimately a handled exception? The test below passes and prints "caught wrapped exception as expected", but when I debug it the

Unable to debug .NET framework code in VS2010

五迷三道 提交于 2020-01-03 08:38:52
问题 I'm trying to debug .NET code with public available symbols. I setup according instructions: In Tools-> Options -> Debug I checked "Enable .NET framework source stepping", disabled "Enable just my Code". In Tools-> Options -> Debug -> Symbols Load All Symbols. I checked a lot of *.pdb's appeared in this folder. In ASP.NET MVC application I place breakpoint into Application_Start() method. After debugger run I see call stack, see all methods in call stack (System.Web.dll). But if I try to

Memory corrupt error

女生的网名这么多〃 提交于 2020-01-03 08:29:27
问题 I have made one c# application For estate Agent Management. In that application i have one mdi form which has all the menus in it. In that menu when i selects agent master , one form comes with Add agent button. When On Add Agent button is clicked Another Window is opened with agent details to fill. My problem is>> when i closes this form>> "Attempt to read or write protected memory.This often an indication that other memory is corrupt" Error Comes. When i clicks ok on the message box of this

Can MS .NET 4.6 be used with Visual Studio 2010

冷暖自知 提交于 2020-01-03 08:28:36
问题 We are still using VS 2010 SP1 to develop a large scale LOB ASP.NET web application. The infrastructure folks are looking at pushing .NET 4.6 (and the targeting pack to devs) to the desktop and I am having trouble finding anything on compatibility with VS 2010. One of the leads here said the two are incompatible and cannot be used together and that you must have VS 2012 or higher but I can't find anything official on the topic. Anyone know if it is possible to use .NET 4.6 and VS 2010 SP1 for

Can MS .NET 4.6 be used with Visual Studio 2010

泪湿孤枕 提交于 2020-01-03 08:28:10
问题 We are still using VS 2010 SP1 to develop a large scale LOB ASP.NET web application. The infrastructure folks are looking at pushing .NET 4.6 (and the targeting pack to devs) to the desktop and I am having trouble finding anything on compatibility with VS 2010. One of the leads here said the two are incompatible and cannot be used together and that you must have VS 2012 or higher but I can't find anything official on the topic. Anyone know if it is possible to use .NET 4.6 and VS 2010 SP1 for

Run all tests in a test class using TestDriven.NET and NUnit

天涯浪子 提交于 2020-01-03 08:26:14
问题 Note: I am using TestDriven.NET 3.0.2749 and NUnit 2.6.0.12051 for this project. I have installed both TestDriven.NET and NUnit and am trying to get TestDriven.NET to run all tests in a test class via the right-click context menu. From the TestDriven.NET documentation: If the code editor window is selected, the test(s) to execute will be determined by the position of the caret; individual tests are executed by right-clicking anywhere inside a test method and selecting 'Run Test(s)' as shown

To run this application, you first must install .Net 4.5

你说的曾经没有我的故事 提交于 2020-01-03 07:29:10
问题 I have a wpf project that I created in VS2012, but am now trying to hack in VS2010. In the csproj file I removed the 'required version' stuff. I can open the project in VS2010, I can compile it too, but if I try to run it, I get the 'needs v4.5' message. I tried removing all the references and adding them back in again: still compiles (so all the dependencies should be on my (XP) machine). Where else should I be looking? 回答1: Check the <supportedRuntime> element in your .config file. If it's

Update Service Reference insist on adding Soap12 to Config.

隐身守侯 提交于 2020-01-03 07:24:08
问题 When I update a Service Reference I end up with : An endpoint configuration section for contract 'MyService.MainServiceSoap' could not be loaded because more than one endpoint configuration for that contract was found. Please indicate the preferred endpoint configuration section by name. my web.config ends up like this: endpoints: <endpoint address="http://localhost/main/MainService.asmx" binding="basicHttpBinding" bindingConfiguration="MainServiceSoap" contract="MyService.MainServiceSoap"