visual-studio-2010

Cannot get T4MVC to work with VS2010 and ASP.NET MVC 2

萝らか妹 提交于 2019-12-29 06:52:10
问题 I'm trying to add the T4MVC templates to my project, but I'm experiencing some problems. I went to Codeplex and downloaded the latest version of T4MVC, and according to the instructions I just copied the two files T4MVC.tt and T4MVC.Settings.t4 into the root of my web application. Immediately, I got the following errors: From T4MVC.cs (generated file): A namespace cannot directly contain members such as fields or methods From T4MVC.tt (the code generating template): Compiling transformation:

Fixing the “MSVCP110D.dll is missing from your computer” issue

↘锁芯ラ 提交于 2019-12-29 06:46:16
问题 I am facing the following (fairly common) problem: I am running my program in Debug mode in VS2010 and/or VS2012, but at startup it crashes, saying: The programme can't start because MSVCP100D.dll is missing from your computer. Try reinstalling the program to fix this problem. Now I found a number of possible solutions, but none of them work for me: Compile with /MTd instead of /MDd : actually this does solve the problem, but I am not allowed to: my program is part of a bigger program, and

When linking statically, does the linker include the whole library?

家住魔仙堡 提交于 2019-12-29 05:58:04
问题 For example, if I static link to freeglut, does the compiler include everything from freeglut or only the parts that I use? Of course, this implies that the linker (or compiler?) do some kind of dependency analysis to figure out what it can safely exclude. If so, is there a way to see what have been included or excluded in Visual Studio? 回答1: It's partly a Quality of Implementation issue, but there is a real gotcha. Namely, by the standard the linker has to add in all compilation units that

When linking statically, does the linker include the whole library?

元气小坏坏 提交于 2019-12-29 05:57:06
问题 For example, if I static link to freeglut, does the compiler include everything from freeglut or only the parts that I use? Of course, this implies that the linker (or compiler?) do some kind of dependency analysis to figure out what it can safely exclude. If so, is there a way to see what have been included or excluded in Visual Studio? 回答1: It's partly a Quality of Implementation issue, but there is a real gotcha. Namely, by the standard the linker has to add in all compilation units that

VS2010 opens my class-file (.cs) in the designer mode

只愿长相守 提交于 2019-12-29 05:44:05
问题 I've created a class that extends DbConnection in a brand new project. public class FakeDbConnection : DbConnection { ... } In the Solution Explorer the class looks like this: And when double-clicking it wants to open it in design mode which won't work. Opening up the .csproj-file reveals the problem <ItemGroup> <Compile Include="FakeADO\FakeDbConnection.cs"> <SubType>Component</SubType> </Compile> </ItemGroup> Even if I remove the SubType tag VS2010 immediately re-adds it. Very annoying. How

Changing the Default Target Framework Visual Studio 2010

心不动则不痛 提交于 2019-12-29 04:30:12
问题 Is there a way in Visual Studio 2010 to change the default target framework that projects point to when they are created? I want to target the 4.0. framework by default and NOT the Client Profile version of the 4.0 framework. 回答1: Visual Studio 2010 (and older versions) will remember the last target framework you chose when using File -> New -> New Project . So if you create a new project using 4.0, the next time you create a new project 4.0 will be preselected as the target framework. EDIT :

Visual Studio 2010 Database Project - Unresolved Reference to a Synonym

淺唱寂寞╮ 提交于 2019-12-29 04:16:26
问题 We have a couple of synonyms that are being used to reference tables in a separate database (that's on the same server). The actual synonyms are fine, but the stored procs/user defined functions that reference said synonyms show the following error: Error 13 SQL03006: Column: [dbo].[GetCocosIndexSearched].[User ID] contains an unresolved reference to an object. Either the object does not exist or the reference is ambiguous because it could refer to any of the following objects: [dbo].

Create a Visual Studio project programmatically

懵懂的女人 提交于 2019-12-29 04:01:05
问题 As my question say I want to create a new project based in a template which already created an tested and works fine, but i have two problems when i tried to do it in C# code (in a mvc3 project). Which are the differences between EnvDTE80, EnvDTE90 and EnvDTE100 because i tried to do this example with EnvDTE100 but it doesn't work because the object handle it's Solution4 not Solution2 and Solution4 doesn't have the same behavior. How can I create the project without use the default path, but

VC++ cl.exe — DLL not found

泄露秘密 提交于 2019-12-29 03:40:11
问题 I added the bin directory of the VS2010 (not SP1) C++ compiler to my PATH variable on Windows XP. When i try to run it, it tells me that a DLL was not found. I added this line to my PATH : C:\Program Files\Microsoft Visual Studio 10.0\VC\bin; Update: it still fails when I cd to the bin directory above, and then run the compiler Can you help me out? 回答1: Run the VS command prompt shortcut or the batch file it points to, such as: "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall

error in deleting a file with File.Delete() method

陌路散爱 提交于 2019-12-29 02:09:12
问题 I have written a winform application in visual studio 2010.In one of the forms the user can browse the local system and select an image, so the application will copy that image(with File.Copy() method) to its folder. the problem is when the user wants to delete that image(File.Delete() method),I receive an error like this : cannot delete this file because it is used by another process. I do not know what this error says because i do not use the image files in other processes. 回答1: cannot