projects-and-solutions

How do you only build a file's project using Visual Studio's Command Window?

a 夏天 提交于 2020-01-15 03:24:09
问题 Ctrl-Shift-B, by default, builds an entire solution. An entire solution may contain many projects. Compiling all at the same time may be very slow, especially when development is only occurring on a single project. I have tried t remap Ctrl-Shift-B to Build.BuildOnlyProject, but it does not work. Nothing happens. From the menu, the following option does exactly what I want: Build -> Build [MY PROJECT NAME] 回答1: The command is Build.BuildSelection To bind that to a key, click Tools | Customize

Where is “Set as Startup” defined and persisted in C# winforms solutions?

北战南征 提交于 2020-01-13 11:35:10
问题 I don't see it in the .sln file, which is what I expected. 回答1: Which project is the "startup" project only has any relevance for debugging, which means it's user metadata from the point of the solution and the projects. Regardless of which project is the "startup" project, the compiled code is the same. Because of this, the information is stored as a user setting in the Solution User Options file (solution.suo) which accompanies the Solution file (solution.sln). The .suo file "Records all of

Versioning with Visual Studio 2010 and HG

被刻印的时光 ゝ 提交于 2020-01-11 03:22:06
问题 Recently me and my team got a HG repository for versioning as this would make it easier and better to develop our application. We are using Visual Studio 2010 and c# All of the project is under version control.. Unfortunately, when one of us commits, usually the other gets an error of some kind when opening the solution (due to the various files VS has) My question is: what files should be put under version control? (and removed in my case!) PS: we have 3 Projects: (using XNA) game, contents,

Splitting an Solution into multiple projects

偶尔善良 提交于 2020-01-06 07:56:45
问题 I created a Black Solution (Arhi) with a ASP.NET MVC 4 Internet project (Arhi.Core) and Class library project for data (Arhi.Data) where I'm storing my EDMX Model. I added a reference for Arhi.Data into Arhi.Core and I tried to add a Controller with a Model class from Arhi.Data (People entity) and I got this error. 'Unable to retrive metadata for 'Arhi.Core.People'. The specified named connection is either not found in the configuration, not inteneded to be used with the EntityClient provider

Importing NuGet references through a local project reference

半世苍凉 提交于 2020-01-04 02:30:15
问题 Let's say I have a "main" C# project that uses NuGet to manage its third-party dependencies. Now let's say I create a unit-testing project alongside the main project that includes the main project as a reference. Unfortunately, it seems that I need to re-add dependencies that are included via nuget in the main project in order to use them to write code for the unit tests in the unit test project. My question is: Is there a way to automatically include the "main" nuget references in the

Managing Nuget packages for C# project present in multiple solutions

杀马特。学长 韩版系。学妹 提交于 2020-01-03 03:39:07
问题 I am now on the phase of refactoring madness of a big project which has a lot of legacy and unstable modules . I've decided to split the solution that currently has ALL projects (so around 20 and there will be more because of unit test projects that would surely come in next months) chained in it to make it more independent and granular. With this approach there are modules e.g. API clients that needs to be either referenced or added in multiple solutions. The problem is that Nuget packages

How to work with multiple .net projects on os x and vs code

≡放荡痞女 提交于 2020-01-03 01:28:06
问题 I am trying to create a typical solution/project layout using vs code. I created the various libraries using yo aspnet , but I don't know how to reference projects in vs code. Do I use a single project.json at the root? How does it know what the startup project and entry point are? Also, is there a way to get intellisense on the namespacing? 回答1: If you don't use Visual Studio (the full version), then you don't need a solution or xproj files. You just use folders and project.json files to

Custom common target to build a solution

让人想犯罪 __ 提交于 2020-01-01 08:36:52
问题 I created a custom common target "RealClean" which remove every files in the output and "intermediate output" directory. I put it in the Microsoft.Common.targets file. When I run MsBuild on my csproj everything is fine. But when I run MsBuild on my sln (which just references a list of csproj) I have the following error error MSB4057: The target "RealClean" does not exist in the project. Here is the command line I enter to run MsBuild C:\Windows\Microsoft .NET\Framework\v3.5\MsBuild.exe /p

Whats a recommended solution structure for a somewhat large website in asp.net

一曲冷凌霜 提交于 2020-01-01 00:48:53
问题 Im currently trying to refactor a project(asp.net mvc) that doesnt have any separation at all. just folders :s The project has a bunch of EF Code First classes (People.cs, Exam.cs, Message.cs, etc) The project has several repositories (which all use EF Data Context) And of course a lot of controllers and viewmodels We have a Tests Project but we arent very good at TDD so its not something we are really working on as of now. I would like to have a clearer separation on the different

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

人盡茶涼 提交于 2019-12-31 08:28:11
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed last year . When spliting a solution in to logical layers, when is it best to use a separate project over just grouping by a folder? 回答1: By default, always just create new folder within the same project You will get single assembly (without additional ILMerge gymnastic) Easier to