projects-and-solutions

Folders or Projects in a Visual Studio Solution? [closed]

拥有回忆 提交于 2019-12-02 17:41:01
When spliting a solution in to logical layers, when is it best to use a separate project over just grouping by a folder? By default, always just create new folder within the same project You will get single assembly (without additional ILMerge gymnastic) Easier to obfuscate (because you will have less public types and methods, ideally none at all) Separating your source code into multiple projects makes only sense if you... Have some portions of the source code that are part of the project but not deployable by default or at all (unit tests, extra plugins etc.) More developers involved and you

How do I find files that are missing from visual studio projects?

筅森魡賤 提交于 2019-12-02 17:37:10
Due to issues with merging etc, we have lots of project files that don’t contain all source code files that are within their folders. Before I write a little tool, that checks that every *.cs file is included in a project file, I wish to make sure that no-body else has already done that before. (We have close to 100 project files, and 1000s of C# files) ------------------- Clearly the support that visual studio now has for using wildcards to include all “*.cs” files from a given directory in the project is the best solution to this problem. In that there is then no need to update project files

What is the workflow you follow to design the software you're about to write? [closed]

折月煮酒 提交于 2019-12-02 16:01:16
I've started working on a fairly complicated software. It is for a personal project, but nonetheless I'm putting a lot of effort into it. Now, I'm used to work on other people's solutions / designs or on projects that grow in a very controllable way. This time, I started twice to code the basics and I rapidly found myself stuck. So i took a rest and decided to write down the complete solution before coding a single line. What I've done (in order) is: writing the use cases in the form of CLI commands (this is a command line application) write some help design the classes, the structure of the

Running multiple NUnit Projects in Visual Studio

泪湿孤枕 提交于 2019-12-02 08:54:50
I have a solution that has multiple projects including NUnit Test projects. So the solution looks like this (using generic names, these aren't the actual names): + Solution + Project1 + Project1.Test + Project2 + Project2.Test + Project3 + Project3.Test ... I would like to run all the NUnit Tests through the NUnit GUI or console application when I click 'Start Debugging' from within Visual Studio. Right now, what I have done is added a new Class library called TestRunner and set it to be the StartUp project (I've read I don't really need to do this, I can just right click on the project and

How to diff/merge changes to a deployment project file

北城余情 提交于 2019-12-02 05:42:13
I am currently using CVS (not my choice) and have several branches. I'm trying to merge two branches, but a deployment project file has conflicts that I can't resolve without spending a LOT of time. A trivial change to a project file results in drastic changes to that project file - thanks to GUID changes I guess (making a project file change, getting a clean copy and making the same change seems to yield two fairly different project files) So I need to determine all the actual changes that were made so I can replicate them by hand (as the change logs aren't detailed enough). Are there any

How do I reference one VC++ project from another in the same project?

二次信任 提交于 2019-12-02 01:15:29
I am new to Visual Studio. Need your help with the following. Visual Studio 2005, VC++ 1 solution has 2 projects. Lets call the solution as 'solution' Project 1 is named 'p1' and project 2 is called 'p2' Do I need to export functions and classes from 'p1' so that I can use them by importing in 'p2'? What if I simply include the header files and then use the functions by calling them straight away? Thanks, viren If I remember correctly (haven't used C++ for a while), there were two different kinds of C++ libraries - a static library (a .lib file) and a dynamic library (a .dll file). In the case

Does Visual Studio 2008 support configuration (debug/release build) specific references?

柔情痞子 提交于 2019-12-01 22:45:50
问题 I've got a native C++ project with one C++/CLI file (the only file compiled with /CLI), I'd like to add a reference to a C# DLL. There are separate versions for debug and release however I can only seem to add one reference which is applied to all configurations. The reference search path dialog box contains a warning that if I attempt to use any $ConfigurationName type parameters they will only ever refer to the first configuration in the project. So my current ideas are: Join the two

Does Visual Studio 2008 support configuration (debug/release build) specific references?

十年热恋 提交于 2019-12-01 20:34:14
I've got a native C++ project with one C++/CLI file (the only file compiled with /CLI), I'd like to add a reference to a C# DLL. There are separate versions for debug and release however I can only seem to add one reference which is applied to all configurations. The reference search path dialog box contains a warning that if I attempt to use any $ConfigurationName type parameters they will only ever refer to the first configuration in the project. So my current ideas are: Join the two projects together under one solution and adding a reference to the "project" rather then the DLL assembly. My

Separate projects or multiple class files … namespace best practice in C#

折月煮酒 提交于 2019-12-01 17:56:32
I'm creating a library for use with an application that I am building. I am building a name space structure similar to below. MyNamespace.Validation MyNamespace.Reports MyNamespace.Transactions MyNamespace.DataImport etc... Would it be best practice to create a solution with multiple projects for each sub namespace or one project with multiple class files for each sub namespace? Thanks. There are pros and cons to both approaches, which you need to personally decide between for your own circumstance. Pro to multiple projects: Separate assemblies allow the compiler to provide more strict

How to make msbuild fail when a target fails in a VS solution?

一笑奈何 提交于 2019-12-01 17:08:19
问题 I'm using msbuild on the command line to build a VS2012 solution containing a C++ project. The project has a target that runs after the build: <Target Name="RunTargetAfterBuild" AfterTargets="Build"> <Error Text="I am a failing target" /> </Target> I want msbuild to return an error when building, however somewhere in the process of building, the error gets lost and msbuild reports 'Build succeeded'. Consequently the ERRORLEVEL is still set to 0 so it's pretty hard to detect if something went