projects-and-solutions

How to programmatically include a file in my project?

微笑、不失礼 提交于 2019-11-26 13:04:53
问题 Background I\'m making a helper application that reformats some code files and creates new code files, which are to be added to my other project, so I could use the new code right away, but I\'m having serious trouble adding that new code file into my project automatically. By the way it\'s in c# and the helper app is WinForms. Failed attempts This question\'s only answer has two ways of doing that, but I couldn\'t make any of them work. With the first I can\'t find a Microsoft.Build assembly

What does the “Link Library Dependency” linker option actually do in Visual Studio 2010 - 2015 and upwards?

天大地大妈咪最大 提交于 2019-11-26 12:56:13
问题 Up to VS2008, you set your native C++ project dependencies up in the solution file ( Project Dependencies ... ) and if (by default) the Linker Option Properties -> Linker -> General : Link Library Dependencies = Yes is set, the Visual Studio Build will automatically link in the .lib files of all projects (DLLs, LIBs) that this project is dependent on will be \"statically\" linked in. Side Note: Microsoft changed how the dependencies worked in VS2010 and you are now supposed to add the

Visual Studio 2010 & 2008 can't handle source files with identical names in different folders?

孤人 提交于 2019-11-26 12:06:31
问题 Direct Question: If I have two files with the same name (but in different directories), it appears that only Visual Studio 2005 can handle this transparently?? VS 2008 & 2010 require a bunch of tweaking? Aside from my naming convention, am I doing something wrong? Background: I\'m developing C++ statistical libraries... I have two folders: / Univariate Normal.cpp Normal.h Beta.cpp Beta.h Adaptive.cpp Adaptive.h / Multivariate Normal.cpp Normal.h Beta.cpp Beta.h Adaptive.cpp Adaptive.h I need

Tool to view the contents of the Solution User Options file (.suo)

爷,独闯天下 提交于 2019-11-26 11:09:53
问题 Are there any free tools available to view the contents of the solution user options file (the .suo file that accompanies solution files)? I know it\'s basically formatted as a file system within the file, but I\'d like to be able to view the contents so that I can figure out which aspects of my solution and customizations are causing it grow very large over time. 回答1: The .SUO file is effectively disposable. If it's getting too large, just delete it. Visual Studio will create a fresh one. If

Solution-wide pre-build event?

℡╲_俬逩灬. 提交于 2019-11-26 10:38:45
问题 I have a solution in Visual Studio which contains several projects. I\'d like to run a command at the very beginning of every build - no matter which projects are involved and whether or not they are up-to-date. Essentially I need something similar to a solution-wide pre-build event, but unfortunately VS does not appear to support these. Does anyone know an alternative way of achieving what I need? 回答1: Unusual requirement. But it can be done. Add a new project to your solution, use the

Android - copy existing project with a new name

痞子三分冷 提交于 2019-11-26 10:10:15
问题 Using Eclipse. Say I have a project \'ProjectA\' in the eclipseworkspace (in a folder ProjectA). I want to copy the project but with a new name (ProjectB) and have all the references in the new project adjusted. I can\'t find much help for what I thought would be a vary basic operation. I want to try out variations on the original design/code and creating a copy seemed the obvious way to go about it. Any suggestions please. 回答1: I need it also today and i got the answer from my co-worker. you

How do I programmatically list all projects in a solution?

筅森魡賤 提交于 2019-11-26 09:36:34
问题 How do I programmatically list all of the projects in a solution? I\'ll take a script, command-line, or API calls. 回答1: Here's a PowerShell script that retrieves project details from a .sln file: Get-Content 'Foo.sln' | Select-String 'Project\(' | ForEach-Object { $projectParts = $_ -Split '[,=]' | ForEach-Object { $_.Trim('[ "{}]') }; New-Object PSObject -Property @{ Name = $projectParts[1]; File = $projectParts[2]; Guid = $projectParts[3] } } 回答2: var Content = File.ReadAllText(SlnPath);

VS2008 Setup Project: Shared (By All Users) Application Data Files?

时光怂恿深爱的人放手 提交于 2019-11-26 09:07:24
问题 fellow anthropoids and lily pads and paddlewheels! I\'m developing a Windows desktop app in C#/.NET/WPF, using VS 2008. The app is required to install and run on Vista and XP machines. I\'m working on a Setup/Windows Installer Project to install the app. My app requires read/modify/write access to a SQLCE database file (.sdf) and some other database-type files related to a third-party control I\'m using. These files should be shared among all users/log-ins on the PC, none of which can be

What is the significance of ProjectTypeGuids tag in the visual studio project file

江枫思渺然 提交于 2019-11-26 05:16:54
问题 What is the significance of the ProjectTypeGuids tag in a visual studio project?? When I created a WPF application, i am seeing two GUIDs in here. {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}** Does these represent WPF and Windows type of applications? If I create my own project type (.myproj) that has .xaml and .cs files, what should I fill in this ProjectTypeGuids tags? Should I also need to fill the ProjectType tag? It would also be better if someone

Error: Cannot access file bin/Debug/… because it is being used by another process

非 Y 不嫁゛ 提交于 2019-11-26 04:36:38
问题 When I debug my project, I get following error: \"Unable to copy file \"obj\\Debug\\My Dream.exe\" to \"bin\\Debug\\My Dream.exe\". The process cannot access the file \'bin\\Debug\\My Dream.exe\' because it is being used by another process.\" Using Process Explorer, I see that MyApplication.exe was out but System process still uses it although I stopped debug before. Whenever I change my code and start debug it is going to happen. If I copy project to USB and debug, it runs OK. Why? How can I