projects-and-solutions

How to programmatically include a file in my project?

纵饮孤独 提交于 2019-11-27 12:02:57
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 to reference, and in the other there are clearly not enough arguments for a command line. Question How do I

Using Visual Studio project properties effectively for multiple projects and configurations

…衆ロ難τιáo~ 提交于 2019-11-27 10:01:22
I have always used Visual Studios built in GUI support for configuring my projects, often using property sheets so that several projects will use a common set. One of my main gripes with this is managing multiple projects, configurations and platforms. If you just do everything with the main GUI (right click the project -> properties) it quickly becomes a mess, difficult to maintain and prone to bugs (like failing to correctly define some macro, or using the wrong runtime library, etc). Dealing with the fact that different people put there dependency libraries in different places (eg mine all

Is there any guidance on converting existing .NET class libraries to portable libraries?

拈花ヽ惹草 提交于 2019-11-27 09:40:09
问题 I have some class libraries with a non-trivial amount of existing code. The class libraries currently target .NET 4.0. Is there any guidance on how to convert these libraries to be portable libraries? From looking at the .csproj, it doesn't appear that there are a lot of differences: <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" /> and <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B

ASP.NET Web Site or ASP.NET Web Application?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-27 09:39:50
When I start a new ASP.NET project in Visual Studio, I can create an ASP.NET Web Application or I can create an ASP.NET Web Site. What is the difference between ASP.NET Web Application and ASP.NET Web Site? Why would I choose one over other? Is the answer different based on which version of Visual Studio I am using? Andreas Grech Website: The Web Site project is compiled on the fly. You end up with a lot more DLL files, which can be a pain. It also gives problems when you have pages or controls in one directory that need to reference pages and controls in another directory since the other

Developing a Robocode type game with .Net, for a School Assignment

我是研究僧i 提交于 2019-11-27 08:56:06
I am currently in my final year at school, studying for a Higher National Diploma in Computer Studies, and basically in this final semester, we need to develop a Software Project, that basically incorporates a whole system. Now, what I'm thinking of doing is something along the lines of Robocode , but instead of Java, I will be doing this with the .Net Framework. What is Robocode ? For those of you don't know what Robocode is, it's basically a sort of programming game in where people develop their own robots using methods from the class interfaces and downloadable classes that exist, and then

Does CMake always generate configurations for all possible project configurations?

感情迁移 提交于 2019-11-27 08:25:45
问题 I have specific configuration for debug and release options (diferent for MSVC and for GCC). Say we generate default project via cmake .. . Does CMake always generate configurations for all possible project configurations (Debug and Release) or one always gets only one set of comfiguration options? 回答1: As @cplusplusrat has commented, this depends on the generator/build environment: For multi-configuration environments like MSVC or XCode, yes. For single-configuration environments like GCC,

How can I refer to a project from another one in c#?

三世轮回 提交于 2019-11-27 08:15:46
I added a project, Project2, to my solution. It already had another project lets say Project 1. How can I call classes and methods from project2 into project1? What I did: I have Project 1 and its solution. I added Project 2 to Project 1's solution. Project 1 and Project 2 both have a namespace named Correction. Now, I called using Correction. However, in Project 1 typing Project2 gives me an error since its claiming that it does not know what it is. I also added project 2 as a reference. thanks for all the answers. i dont know what i am doing wrong First, you need to add a reference to

Structuring projects & dependencies of large winforms applications in C#

末鹿安然 提交于 2019-11-27 08:02:23
UPDATE: This is one of my most-visited questions, and yet I still haven't really found a satisfactory solution for my project. One idea I read in an answer to another question is to create a tool which can build solutions 'on the fly' for projects that you pick from a list. I have yet to try that though. How do you structure a very large application? Multiple smallish projects/assemblies in one big solution? A few big projects? One solution per project? And how do you manage dependencies in the case where you don't have one solution. Note: I'm looking for advice based on experience, not

How to save DLLs in a different folder when compiling in Visual Studio?

烈酒焚心 提交于 2019-11-27 07:26:14
Let's suppose I have a Window Forms / Console Application C# project with some external references and references to other class library projects in the same solution too. When I build the Window Form project, I want the referenced libraries be stored in a different location (eg: bin\Release\Libraries ), and not in the same folder as the .exe . Is it possible to do? Alexei Levenkov There are 2 parts of your question: How to configure solutions to build assemblies/EXE into folders of your choice - this is configured through properties of the project in VS (project properties -> build -> output

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

和自甴很熟 提交于 2019-11-27 07:03:35
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 dependency directly to the project Common Properties -> Framework and References : (List of depenencies) (each