Merge Visual Studio Solution into Gitlab - c#

I have a local Web Application which's backend is written in C# with Visual Studio. Now I decided to use a source administration tool for it. My problem is, that I'm really confused how to migrate my solution into GitLab. In my opinion there is one solution and 6-8 projects in this solution. So I wanna try to create for each project a git repository. The only problem is, that if I'm cloning my projects they won't find the dependencies. What is the right way to check in everything, organize it right and get rid of dependencies problems?
In the moment I created a git subgroup "MYAPP" and added all angular frontend applications. I made one repo for every application. Now I want to add the c# projects which are containing the logic. These are devided in 5 projects and a core project which handles the entityframework.
I hope to get some good advices and best practices.
Sorry for my bad english and thanks to everyone who tries to help.

You should consider carefully if you want to separate each project into a single repository. If your projects are only used as part of your solution and you never want to use them anywhere else as standalone modules or libraries, it's perfectly fine to put the whole solution and all projects in a single git repository.
If, on the other hand, you use or publish your projects as libraries, you can totally manage them as separate repositories. In this case, you would need a repository for your solution that includes your subrepositories as submodules or subtrees.
Managing subrepositories, however, always comes with a certain overhead. I would advise to avoid it if it isn't justified (i.e. if at this point in time your solution is the only one using your projects).

Related

Update one DLL file in an ASP.NET website project

net development. I am working in a website project and I am trying to update one of the dll files. I've search for hours for a solution on stackoverflow, but no luck.
Our website project in Visual studios is composed of one website that uses three C# projects. I am trying to update just one of these C# projects. Currently the website is in production and the DLL files of these projects are in the /bin folder.
I opened up the solution in VS and made my changes.
I built the whole solution and retrieved the new dll.
I stopped our in-process website with IIS and overwrote the dll and restarted it again.
I get an Missing Method Exception as an error when I do this. I was hoping for a straight forward way of updating our website project because I only need to change about two lines of code and swapping dll files seems like the easiest way of doing this.
Thank you guys for your help and be patient with me I am a slow learner and I ask a lot of questions.
One of the reason of this to occur could be that your dll is built using different version of .net framework than what is on your server. You can check that and see if that resolves the issue.

Setting and configuring a subversion repository for my .net project

I am developing a ASP.net project in visual studio.
Every thing was fine when I was the only developer here, but I needed some helping hands to contribute to my project.
Currently there are 4 developers not in a same geographic location.
So after the files are changed and submitted to me, a lot of effort and time is wasted in merging the code.
So I was thinking of creating a subversion of this project.
I have worked with SVN through Tortoise, but I have not done the set up.
Please suggest me a way to set up an SVN.
Any suggestion will be appreciated.
Thanks in advance.
First thing you need to decide is the hosting space for your code.
If you are developing an opensource project, then you can go for code.google.com or any other provider. If your project is private, then you can coose any private repository such as assembla. If you go in this way, you will get a checkout url. You can just commit your project to this url.
If you are having your own server to host the code, then follow the steps provided in this article.

Trouble running the WPF Application Framework examples

I feel embarrassed asking this here, but I was wondering if anyone could help me quickly, the Microsoft documentation around this is actually quite poor.
Microsoft host what appears to be a very neat framework on codeplex that helps you build MVVM WPF applications, and has samples illustrating much of the MVVM principles and the supporting code base they offer. It's called WPF Application Framework and you can download it here.
I downloaded the framework and its samples, as well as the documentation for the sample i'm interested in (WPF EmailClient), but I'm having trouble running the sample.
This is a picture of the documentation:
As you can see, it tells you to simply set the EmailClient.Presentation project as the startup project and run.
However
This project is in fact a Class Library, and cannot be set as a startup project.
I turned it into a Windows Application, but it needs an App.xaml file, and the whole project seems to use MEF as an IoC container and dependency injects all the views and ViewModels dependencies.
All this means a lot of work for me to launch this project, and I was just wondering if any of you out there know how you are supposed to do this.
Oh yea and I'm running windows 8 and VS2012, but I really don't think that has anything to do with it. (The project is targeting .Net 4 anyway)
Interesting framework.
The application for the overarching "InformationManager" sample is a project called "Assembler"
You'll need to set this as the startup project. Make sure you do a full build of the entire solution before you run it, otherwise you'll get an xaml parse exception in app.xaml.
By changing the project type you broke the solution. Download the example again and open the solution in Visual Studio. Next right click on the project you run and select Set as Startup Project.
Then when you press F5 it'll launch that application, not the class library.

Referencing DBML project in Console App (.net)

I inherited a software engineering job with a .DBML project in it. It was being referenced by an ASP.Net website as it's data access layer, but I'm tasked with creating a Console app that could utilize the extensive data access classes in the project.
However, when I reference the project I get intellisense and all but on building it, get errors as if I don't have reference to it.
I am not that familiar with this kind of project and am kind of at a lost how to proceed. I have been trying out different stuffs for past few hours, but nothing seems to work.
Can anyone guide me to how to solve this, or perhaps an article that could point me to the right direction? Thanks!
Right click on your console application and then click on properties. Change the target framework from .Net Framework Client Profile to .NET Framework.
This "feature" of Visual Studio has bitten a lot of people... I wasted almost a full day on it recently.

Implementing development processes - versioning and installers

In my team we create assemblies to attach to extensible released software created and published elsewhere in my company. These assemblies are often specific for an individual client, though some are reused. I want to introduce a couple of standards into this environment - version numbers and installers.
Currently, many assemblies go to clients without adequate versioning. I want to institute automated version number updates so when a client has a problem we can be sure which source code was used in their software.
Currently, assemblies are installed by the individual copying them manually to the correct path and performing any necessary registration. I want to force people to use an installer package so the path and registration is handled automatically.
I could implement the first step by getting people to use:
[assembly: AssemblyVersion("1.0.*")]
But I'd prefer to update the AssemblyFileVersion rather than the AssemblyVersion. This is because I understand that advancing AssemblyVersion combined with our manual installation can lead to multiple versions of an assembly being registered. AssemblyFileVersion doesn't update automatically, and I'm wary of a solution that requires developers install 3rd party tools. If we had a proper installation process, the problem would multiple versions would go away.
For the second step, if I use a Visual Studio setup project then adding the assembly causes it to try to add other assemblies from the original published software, which I don't want. I assume I can create this as a patch somehow, but I've not worked that out yet. Of course, an installer will require reliable version numbers or things will go badly.
It seems clear having written this that I need to advance both issues simultaneously, but I'd really rather approach one at a time.
Any thoughts for the best way to get over these two issues?
I don't have nearly enough information to point you to a solution. What are you using to build your application and installers? Desktop F5 build? Team Foundation Server? Cruise Control?
Things to realize:
1) Visual Studio Deployment Projects suck. Yes, I'll stick by that comment. In your case, the dependency scanning problem you have is unfixable. Even if you right click | exclude the dependency it could scan a new dependency at build time. We even wrote visual studio automation to open the project, right click | exclude everything and then save it on the build machine to avoid this problem. Trust me, it's a horrible road to go down. Even Microsoft knows it sucks and that's why it won't be in the next release of Visual Studio anyways. Use other tools such as Windows Installer XML or InstallShield Limited Edition or Professional.
2) You must update AssemblyFileVersion. This is such a core/foundational tenant of Change Management and it's critical in getting Windows Installer upgrades and patches to work. AssemblyVersion can be changed at your discretion and is only applicable to Strong Naming and IoC scenarios such as Prism where you write rules on what constitutes a valid class for injection.
3) 1.0.* isn't what you want. You want a system that increments your version and passes it into your build automation. What you use will depend on what you are using for build automation. I use Team Foundation Server and a project in CodePlex to do my versioining.
4) You should never be building on a developers machine. You should always be using a clean build machine with automated scripts and not F5.
If these are released applications, then the installer method is fine. If you are adding libraries through this method, and not necessarily the actual application, then something like NuGet (package manager) is an option. NuGet itself is a bit infant and needs to grow up a bit, but I think it should fit your basic scenario.
If you have published software, a bootstrap on the client that calls for updates and then runs the update installer is a good pattern.
The basic answer is you have options, depending what bits you are employing and should take advantage of the one(s) that fit your needs.

Categories