visual-studio-2010

What could be causing a System.TypeLoadException in a Visual Studio Unit Test?

回眸只為那壹抹淺笑 提交于 2019-12-28 05:49:27
问题 I've got a C# .NET class library MyClassLibrary that compiles fine. I'm trying to create a unit test project for it (using Visual Studio Unit Testing Framework, with Visual Studio 2010). The class library does have big classes in it, but whenever I run even the simplest test against the simplest class, I get the following exception: Test method MyClassLibraryTest.MyClassLibraryTests.MySimpleClassTest threw exception: System.TypeLoadException: Could not load type 'MyClassLibrary.MySimpleClass'

.csproj multiple hint paths for an assembly

两盒软妹~` 提交于 2019-12-28 04:51:12
问题 I'm packaging example code for an SDK distribution. In the distribution, the relative path from code to the SDK assemblies is different from the build machine. For example: Distribution csharp/bin/assembly.dll example/ex1/ex1.csproj Build Machine foo/sdk/csharp/bin/assembly.dll bar/baz/quux/ex1/ex1.csproj Assume that I can't move anything. Is there a way I can instruct ex1.csproj to look in both ../../csharp/bin/ and ../../../../foo/sdk/csharp/bin/ for assembly.dll ? In C++ I'd put the

Should std::unique_ptr<void> be permitted

爱⌒轻易说出口 提交于 2019-12-28 04:22:08
问题 This is a very simple question. Consider the following code: #include <iostream> #include <memory> typedef std::unique_ptr<void> UniqueVoidPtr; int main() { UniqueVoidPtr p(new int); return 0; } Compiling with cygwin (g++ 4.5.3) with the following command g++ -std=c++0x -o prog file.cpp works just fine. However, compiling with the microsoft compiler (either VS 2010 or 2013) I get this error: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\memory(2067) : error C2070: 'void':

Native PHP support in Visual Studio 2010?

╄→гoц情女王★ 提交于 2019-12-28 04:00:14
问题 Is there any truth to the rumor that Visual Studio 2010 will natively support PHP coding? (http://www.codeplex.com/php4vs) If not,what are the options?(except VS.php) 回答1: Visual Studio 2010 won't have native PHP support. However, it's "relatively easy" to add some language support to Visual Studio 2010. If all you want is syntax highlighting, auto comment/uncomment, and brace matching, it could be done in one sitting by someone who knows how the new extensibility model works. After you wrote

Why is it not necessary to indicate ByVal/ByRef anymore?

落爺英雄遲暮 提交于 2019-12-28 04:00:13
问题 I just installed Visual Studio 2010 Service pack (proposed on Windows Update), and I can see a new feature on the "intellisense" that means when I write a Function or Sub in VB.NET it doesn't auto-complete parameters with ByRef or ByVal ... 1) Is there anyway that I can configure this option back to how it was before? 2) If I don't specify ByX , which one is used by default? (it seems like it is always ByRef ) 回答1: Tim covered what you asked directly, but something else to keep in mind is

How to reference .NET 4.0 assembly within .NET 3.5 projects

為{幸葍}努か 提交于 2019-12-28 03:04:26
问题 I would like to do some Office Interop stuff using .NET 4.0, but developing the rest of my project using VS2008 and .NET3.5. How can I now use the functionality from the .NET 4.0 assembly within my other solution. Loading CLR 4.0 assemblies into a 2.0 AppDomain won't work, will it? 回答1: In short: you can't. .NET 4.0 is a totally new CLR (4.0) and as far as I know, cannot be intermixed with .NET 3.5 and/or used from VS 2008, sorry. You could use .NET 2.0 assemblies from your .NET 4.0 code, if

Visual Studio Installer > How To Launch App at End of Installer

一个人想着一个人 提交于 2019-12-28 02:25:26
问题 This is probably a stupid question and my Googling just is not functioning today. I have an application I added a Visual Studio Installer > Setup Wizard project to. I am wondering how to add a button or check box that would launch the application after successful install. This would be located on the last page of the MSI Installer Package. I am using Visual Studio 2010 Ultimate. I am needing this so that when the application does an automatic update, it auto launches the installer. I just

How to troubleshoot and debug Visual Studio design mode errors?

流过昼夜 提交于 2019-12-28 02:05:17
问题 Using Windows 7 and Visual Studio 2010, I am writing a C# custom UserControl. I was coding in code view for weeks and recently when I tried to switch to design mode, Visual Studio hanged, "NOT RESPONDING". I can wait for an hour, and still nothing happens. Clicking on the close button it gives the "Do you want to wait, close, restart and send information to Microsoft" dialog. Is there a way to (stack)trace the code that the designer is trying to execute? Maybe design-time trace messages or

Re-establish TFS source control bindings

佐手、 提交于 2019-12-28 01:51:34
问题 I have about a dozen Visual Studio 2010 projects I've been working on that are versioned in a TFS repository. Recently I went on a vacation and upgraded my computer's OS to Windows 7 64 bit. I've reinstalled Visual Studio, and I can connect to my Team Foundation Server and see my projects...only my bindings aren't working correctly. Most of the time none of my files seem to be under source control, but in a couple of projects my source control bindings are OK in the root folder, but not

Context menu to Add Controller/View missing

本秂侑毒 提交于 2019-12-27 17:03:59
问题 I have integrated ASP.NET MVC 4 into existing asp.net web site. Both works fine but I don't see any menu/shortcuts to create controller/view within visual studio IDE. Are those only available to ASP.NET MVC template? 回答1: Are those only available to ASP.NET MVC template? Yes, but you could cheat. The way Visual Studio shows those shortcuts is by looking at the project type and if it sees that it is an ASP.NET MVC project it will make them available. But how does it know it is an ASP.NET MVC