visual-studio-2010

How to do Linq Many to Many join with or without navigation properties

三世轮回 提交于 2020-01-14 04:36:09
问题 this question has been asked several times on stackoverflow, and I have read through atleast half a dozen of those, but I can't get my head around a simple many to many linq join query. This is my database EDMX I'm simply trying to populate a WPF datagrid with the list of students, along with each student's subjects. Now I know we can simply use navigation properties , instead of doing a join, but I have been unable to get the right result so a ( either C#/VB.net )query like var

Failed to generate a user instance of SQL Server

泪湿孤枕 提交于 2020-01-14 03:33:12
问题 I have a local project where I am trying to input data from an ASP:textbox to a database. On building I get the following... " Failed to generate a user instance of SQL Server. Only an integrated connection can generate a user instance. The connection will be closed. " I'm a little puzzled here, I have checked the database and it is active with the credentials i am trying to connect with. Here is the code behind C# namespace OSQARv0._1 { public partial class new_questionnaire : System.Web.UI

In which cases does it make sense to have multiple projects in one solution?

牧云@^-^@ 提交于 2020-01-14 03:28:27
问题 I was just wondering, why would somebody want to create multiple projects in one solution, if he could just as easily create a new solution for each project. What are the best practices/arguments in deciding which setup is better? 回答1: Multiple projects in one solution is very common. The norm even. It's very rare an entire program can be captured in one project. A simple example is unit tests. You typically want those in their own project, but the same solution so they remain easily

I do not have Application Files dialog box in my vs2010

我们两清 提交于 2020-01-14 03:07:06
问题 I am using : Visual studio 2010 Professional Edition and developing Excel addin 2007 Where could i find the options I have there? Or could you tell me which edition of vs has the button? Print screen Thank you! 回答1: Found the explanation from the msdn it says : When you are trying to deploy Office addin : Data FilesFiles with .xml, .mdb, and .mdf extensions are automatically copied to the application data directory. You cannot configure these data files by using the Application Files dialog

Is this possible to collapse “If Then Else” as methods?

倖福魔咒の 提交于 2020-01-13 19:48:22
问题 Is it possible to collapse blocks of the code (like "if ... endif") in Visual Studio 2010 as it can be done with methods? 回答1: yes, it is. Select the code, then hit Ctrl+M,Ctrl+H (in the default config) alternatively, right-click and go to Outlining -> Hide Selection. Here's MSDN on this very feature, which apparently is not available for Visual Basic code. 回答2: As others have said, this will allow you to collapse a section of code visibly in C#. #region Name of region #endregion However

C++ - Using environment variable in property sheet for Visual Studio 2010

假装没事ソ 提交于 2020-01-13 19:12:30
问题 I want to set up a project which uses OpenCV. So basically, I have to add a new property sheet using the property manager from Visual Studio 2010. Basically, I have to add the path to my include and lib folders in order to make OpenCV functional. I want to put my project in a git repository and I don't want to change the paths in my property sheets every time. Is there a way of using a system variable in my property sheet with the path to the build folder of OpenCV? If there exist a way of

C++ - Using environment variable in property sheet for Visual Studio 2010

一曲冷凌霜 提交于 2020-01-13 19:12:26
问题 I want to set up a project which uses OpenCV. So basically, I have to add a new property sheet using the property manager from Visual Studio 2010. Basically, I have to add the path to my include and lib folders in order to make OpenCV functional. I want to put my project in a git repository and I don't want to change the paths in my property sheets every time. Is there a way of using a system variable in my property sheet with the path to the build folder of OpenCV? If there exist a way of

Visual Studio 2010 and windows SDK 7.0a compilation error

别说谁变了你拦得住时间么 提交于 2020-01-13 18:20:11
问题 I am new to windows development world. I am having Visual Studio 2010 and windows SDK 7.0a installed on my machine. Any win32 application (even the skeleton generated using the wizard) is giving me this compilation error repeated hundreds of times: 2> Note: including file: C:\Program Files\Microsoft Visual Studio 10.0\VC\include\stdio.h 2> Note: including file: C:\Program Files\Microsoft Visual Studio 10.0\VC\include\crtdefs.h 2> Note: including file: C:\Program Files\Microsoft Visual Studio

C++ Trouble Reading a Text File

耗尽温柔 提交于 2020-01-13 18:17:10
问题 I'm trying to read a text file but nothing is coming out. I feel like maybe It's not linking correctly in my Visual Studio Resources folder but if I double click it - it opens fine in visual studio and it doesn't run into any problems if I test to see if it opens or if it is good. The program compiles fine right now but there's not output. Nothing prints to my command prompt. Any suggestions? Code #include <iostream> #include <iomanip> #include <fstream> using namespace std; int main() { char

TFS build - deployment/package target does not run

本小妞迷上赌 提交于 2020-01-13 18:05:39
问题 We have a TFS build definition set up where we pass the following extra MSBuild arguments in: /p:DeployOnBuild=true;DeployTarget=PipelinePreDeployCopyAllFilesToOneFolder;_PackageTempDir="\\server\build";AutoParameterizationWebConfigConnectionStrings=false This has been detailed elsewhere as a way to have the published files copied to a specific location instead of generating a deploy package. This unfortunately does not work on our build server, however if I run the exact same msbuild command