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 2 years ago.
Improve this question
I have a relatively comprehensive solution that contains about 20 projects. One of the projects is "Utils", which I would like to have shared for other solutions. Unfortunately, if I added this project to another solution as a linked project, then this project didn't upload me to Git for this solution, so then teamwork is not possible. Therefore, I am looking for a solution to achieve that I can share the source codes of this project between the individual solutions. I use VS2019 and as a Git repository xxx.visualstudio.com. Thanks for the advice.
If doing a nuget package is not a solution for you because it add too much friction (even if you could also give access to the util repository), and that you want to be able to update the "Utils" source directly from the sln file, then the solution for you is to use Git submodules.
From the documentation:
It often happens that while working on one project, you need to use another project from within it. Perhaps it’s a library that a third party developed or that you’re developing separately and using in multiple parent projects. A common issue arises in these scenarios: you want to be able to treat the two projects as separate yet still be able to use one from within the other.
You will have to create a repository for the "Utils" code and include it in the other(s) repositories as submodules.
But Visual Studio still no support it...
It's not crippling because you could still use it from the command line or from an external git GUI that support it (like GitExtensions for example).
Related
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 5 years ago.
The community reviewed whether to reopen this question 7 months ago and left it closed:
Original close reason(s) were not resolved
Improve this question
I am developing an N-tier application and want to create each tier separately (i mean not in one solution), so i have the DAL, BLL and Entities DLLs created separately, then i reference them in my presentation layer solution, anyway, for quick maintenance, i thought on creating a solution in which i add the projects DAL, BLL, Entities and the Presentation layer as existing projects, is it ok or it will have concequences ?
Every decision has consequences.
Splitting an application into multiple solutions has some positive and some negative. If you have dozens of projects, multiple solutions is a good way to reduce load and navigation time. However you may spend more time flipping between solutions or instances of Visual Studio.
You can also put the same projects in multiple solutions; solutions do not have to represent a physical folder necessarily. If you "add existing project" you can grab an existing project from another solution and have it in both solutions.
Generally, I avoid this because it can create issues with multiple instances of Visual Studio using the same files, but it can be helpful at times. Usually I only do it for debugging help when working on the boundaries between two related applications in different solutions, or an application and a library it consumes.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
In New File I can choose empty class but it does not close the project I am working on. As in the title, what is the difference between a file and a project?
One ore more files create a project and one ore more projects create a solution.
You are probably adding a new file to you're existing project.
Projects are "buildable" things (they have output) and are composed of files. Thus, adding a new file has no reason to "close" the project (whatever that means).
When you get far enough, Solutions are "groups" of projects. Adding a new project to a solution doesn't close anything either.
In any IDE, project is a logical collection of different types of files, such as programs, resources, configuration files etc. There are so many different formats for storing the project information on disk such as .xproj, .csproj etc.
A "solution" is a logical collection of projects. A solution can have just one project in that as well. Solution is stored on disk typically by .sln extension by visual studio. In a solution, programmer can specify the build order of the projects, build configurations etc.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
How do I create the solution in Visual Studio 2008 from which I should be able to press F5 (debug) and get all webservices going aswell as start up Microsoft Internet Explorer with the frontpage of the websolution?
I need to create a solution in which I will add all existing projects for an existing application. The projects are at present located in several diffrent solutions, several for diffrent webservices and one for the main web application, which makes it hard to debug. I have tried to just create a new solution and add all existing projects, but it did not work - the webservices won't start automatically. If there is some configuration that needs to be done in order to get the webservices started, please explain that part too.
Sorry for not being able to include any example code.
If you want to add nothing but existing projects to a solution then you should use the Blank Solution template. You can then use the Add Existing Project option to add the projects to the solution.
As for running multiple projects when debugging, right-click the solution and select Set Startup Projects. You can then select multiple startup projects instead of just one.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
like this https://github.com/seesharper/LightInject/blob/master/LightInject/LightInject.cs
It's hard to reading, is there any deep meaning?
Being the author of LightInject, I feel I should comment on this :)
Say that you are a library developer and want to be able to utilize an IoC framework internally without taking a dependency on a third party assembly. By using the source version of LightInject, this can be done quite easily and you can still ship your library as a single assembly.
Many framework developers choose not to use an IoC framework just because they don't want that extra dependency.
The alternative to this would be to use tools like ILMerge that is capable of merging two or more assemblies into a single assembly.
This is a far more advanced option and would also require an extra build step that performs the merging.
Note that LightInject comes in two flavors, the source version where all the types are internal and the binary version that acts just like any other third party dependency.
Taking on a dependency might not seem so bad at first, but if you are a framework developer, you could easily run into issues if the consumer of your framework uses another version of the same dependency
Best regards
Bernhard Richter
It makes integration as source in another project easier: simply add one file to your project and forget about it. This is a supported installation scenario according to the official website of LightInject, there's even a NuGet package for it.
If you want to read it, I'd strongly suggest opening it in Visual Studio and using the code navigation features to find what you want, e.g. VS 2013's Solution Explorer can display the classes inside of a file as children of that file.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have take over a old asp.net website and there is no Visual Studio Project for it. If i want to change some functionality, is there a way to put in a .cs file overriding the logic in the bin file?
I am not aware of any other solution but one.
You can decompile the whole dll, create a new project and attach all classes there. Then recompile and replace an old dll with a new one.
You may need to decompile the whole web site, as it is likely there will be some dependencies to other dlls.
For anyone who stumbles across this question, I'd like to suggest an alternate approach. Take a look at Fody. Fody is an IL weaving tool which allows you to weave in changes to existing .dll compiled files. Here is a Basic Fody Addin Project. You'll notice Fody would allow you to inject or 'weave' code changes into the IL without a decompile.