How do I fork a VS 2010 VB Solution - vb.net

I've written a bare-bones ap in Visual Studio 2010, Express version. It does what I need and several others are using it successfully. I'd like to add features to it, but I don't want to foreclose the ability to make corrections to the present version.
How do I make a fork in the application for this purpose? Google has been no help in this case, and I've tried several incarnations of copy and change names etc etc.

Ensure you have a Source Code Revision Control System in place (Subversion, TFS, Git etc.), and then create a branch. That way all names stay the same.
One technique is to create a branch (from the trunk, or a previous branch from trunk) for each different production version you want to support. That way, merging chnages up/down between versions and current development is (usually) relatively straightforward.
Even if you are not using Subversion, the 'Red Bean' book is a great place to learn about branching strategy.

Visual Studio 2010, Express edition doesn't integrate directly with source control systems. This is one of the product limitations (i.e. what makes it the 'express' license).
I would recommend either:
1. using a product like SVN or Mercurial, which you use outside the Visual Studio IDE
2. depending on the complexity of the changes, you may want to look at conditional compilation. It's kind of like a poor man's code branch.

Related

Synchronizing Visual Studio Code and Visual Studio 2019 preferences/settings

I was wondering whether there is an easy way to synchronize your preferences/settings across VS Code and VS 2019?
You can go to Tools -> Options -> Environement -> Keyboard
Syncing Settings Across VS Code & VS 2022
I think I have a pretty good idea of what you're asking for, and I would say that they don't have what you are thinking to have. Like, if you wonder that since they are both funded by Microsoft dollars, that there maybe some sort of interoperability, but there's not. Many people have have been hoping for some time to see Visual Studio work in harmony with V.S. Code, but I don't think that will ever happen like many people are hoping it will. The reason is, they are fundamentally — at the very core of what they are — very different beasts. While, as I pointed out, they are both developed by Microsoft dollars, and they are both "Development Environments", they are not both "Integrated Environments", and there in lies the difference that makes them worlds apart.
Visual Studio (the IDE) is considered to be an IDE — integrated is the keyword here — because it integrates into the projects that are built using Visual Studio as the Development Environment. Visual Studio Code does not integrate into projects, instead it allows you to structure the project, provide the compiler, debugger, and things like a build system, RTE, REPL, libraries, modules, plugins, the Languages themselves, etc... You are the master of your own environment with V.S. Code, and where developers have much more control over their projects using a non-integrated dev-env, especially one that's non-proprietary, they also have to put in much more work, to produce many of the same programs that Visual Studio can practically generate for you.
So the point here is, that you can't really swap configurations between the two, not for the majority of configured stuff, however; that's not to say that some settings cannot not be swapped. Any configuration that can have the same values applied to it, whether the configuration is in VS Code, or Visual Studio 2022, would not be unique to Visual Studio, and VS Code, and has nothing to do with the fact that they are both backed by Microsoft. In fact, if you have a group of settings, and those settings exist in both environments, and are able to accept all the same values (they can't accept any different values in any env) then that configuration will port to environments far beyond Visual Studio Code & Visual Studio 2022, and will probably be configurable in over 90% of the Development Environments out there. And this is something that software engineers, programmers & web-developers/designers take advantage of already, and it's referred to by its filename...
Dot-Editor-Config or .editorconfig
"Above is the Dot-Editor-Config Project's Logo."
EditorConfig, is a good gig, but it won't configure entire environments. Like most tools, the more you use it, the better you will get at making use of it. It seems to me that it is more useful across IDE's, as IDEs, as I explained above, work similarly (obviously), so they have more settings in common. Editor config basically creates a medium for setting semantics. Since settings found in different Development Environments are often called something different in each environment, what the .editorconfig file does, is it gives a single name for each of the variation of the setting that ports across environments, and gives a single place to configure the setting, allowing you to take one file from IDE to IDE. Like I said though, there is only so much it will configure, and it works better between IDE's than between IDE and Editor, at least IMHO.
Check Editor Config out, and see what you think.
I used to use it mainly to configure formatting across C++ projects, but CLang's CLang-Format Tool has become such a good tool that I did away with it.
This link will take you to the Dot-Editor-Config GitHub Repository, where you can find the .editorconfig extensions for...
VS Code
Visual Studio
JetBrains
Emacs
Vim
...and probably many more.
I did some research, or lack-of I should say, after authoring this. I couldn't find any other options out there. There really isn't a lot in the way to help in porting configurations, except for .editorconfig, and really .editorconfig won't do much between an IDE & Editor than configure formatting styles. You can get that same functionality with Prettier, CLang, ESLint, and many other tools. Editor-config doesn't just configure its-self though, like a formatter does, so I am sure you can find some extras it targets, but It's not so much that I use it. A lot of people do, though.
Dot Editor Config GitHub Repo
Watching this thought as well. I've been working in VSCode for a few years off and on as needed. But the full VS IDE (2022 currently) is both more complicated and more capable, so I'm running both.
Then realized that many of the extensions may (should?) be cross-usable, but still digging through that to determine what 'reality' looks like.
Sensible question though.

VS 2019 - how to upgrade Visual Basic .NET projects

I am dusting off a number of old projects that we have in production and would like to upgrade the vbproj files to the latest version. Currently, ToolsVersion="12.0". New projects created in VS 2019 are using 15.0. My current projects have been repeatedly updated since something like VS 2003. However VS 2019 is not offering to upgrade them further. Although maybe I am missing something.
I plan to set up a side-by-side environment so I can use the designer content. I would really like to begin with project versions that are up-to-date. These current projects have been repeatedly updated since something like VS 2003.
A cursory review shows that the vbproj content is quite different. Is there a recommended way to upgrade? One alternative would be to create new projects using current templates and copy the source over. But there are about 32 projects that include WinForms, Web and class library projects and that's a big task. Another approach would be for me to manually merge the old and new vbproj files, something I am not sure I can safely do.
Any ideas?
VS 2019 - how to upgrade Visual Basic .NET projects
In fact, you have missed too many versions of VS and this document shows that VS2019 will not allow to upgrade VS2003 project directly.
Because there are too many different versions, there have been great changes from the project structure to the construction mechanism to various details, and some have even been removed from the new version VS.
The safest way is to upgrade the project step by step(a version by a version), but it is not unreality since VS2005, VS2008 are no longer maintained by Microsoft.
Or you can try upgrading your project step by step with VS2010 directly as an intermediate, but due to the large gap between the two, there will be various upgrade errors. And there is no such tool or easy approach to upgrade directly.
Actually, the best way is just creating new projects in VS2019 and then migrate your old project content into your new projects.
This is certainly much clearer and easier than if you were to correct errors in more than 30 projects later. And old projects with a gap of 16 years are worth the time it takes to re-create and migrate them in vs2019, which will take a long time but save you unnecessary and tedious errors.
In addition, do not forget to make a backup just in case.
Hope it could help you.

SAP Design Time Repository Branching like Git or SVN

In SAP Netweaver Design Time Repository is there an equivalent to SVN or Git style branching? I would like to be able to branch a SC for some development work on particular features while maintaining a main development trunk. Also it would be useful to be able to have tagging of stable releases.
I've been working with a tool to migrate our code from Netweaver Developer Studio to SVN, but if we could make it work properly in DTR that would be better. So far though I haven't been able to find any equivalent function.
It depends on what do you mean under branching. If we speak about simple SVN-style branching then SAP concept of development track can fit into your needs:
As it stated by the SAP
When a development project is started, the landscape administrator
initially uses the CMS to create a new track. A track is a separate
production line for a certain release of an SC.
In other words track works like a simple branch, so you can try following scenario:
Create several different tracks (or copy existing track to a new one)
Do development in different tracks independently.
In the end merge changes from two tracks or just delete the unnecessary ones. Until changes are activated and imported into QA the actual state of PROD will not be modified.
UPDATE: following link describes several branching patterns in NWDI and can be helpful.

How can multiple developers efficiently work on one force.com application?

The company I work for is building a managed force.com application as an integration with the service we provide.
We are having issues working concurrently on the same set of files due to the shoddy tooling that is provided with the force.com Eclipse plugin. If 2 developers are working on the same file, one is given a message that he can't save -- once he merges he has to manually force the plugin to push his changes to the server along with clicking 2 'Are you really sure' messages.
Basically, the tooling does a shoddy job of merging in changes and forces minutes of work every time the developer wants to save if another person has modified the file he's working on.
We're currently working around this by basically 'locking' individual files by letting co-workers know who is editing a file.
It feels like there has got to be a better way in this day and age. Does anyone know of a different toolset we could use, process we could change, or anything we can do to make this easier?
When working with the Force.com platform my current organisation has found a number of different approaches can work depending on the situation. We all use the Eclipse Force.com plugin without issues and have found the following set ups to work well.
We have a centralised version control system that we deploy from using a series of ant commands to a developer org instance. We then depending on the scope of the work either separate it off into chunks with each developer having their own development org and merging the changes and testing them regularly, or working in a single development org together (which if you have 2 developers should be no major problem) allowing you to have almost instant integration.
If you are both trying to work on the same file you should be pair programming anyway, but if working on two components of a similar system together, sharing the same org can allow you to develop in a fast and flexible manner by creating the skeleton of the system you wish to use and then individually fleshing out the detail.
I have used both methods extensively and a I say, work really well depending on the situation.
Each developer could work in separate development sandbox (if you have enterprise edition, I think 10 sandboxes with full config & limited amount of data are included in the fee?). From time to time you would merge your changes (diff tool from any version control system should be enough) and test them in integration environment. The chain development->integration->system test->Q&A-> production can be useful for other reasons too.
Separate trick to consider can be used if for example 2 guys work on the same trigger. I've learned it on the "DEV 401" course for Developers.
Move all your logic to classes. Seriously. They will be simpler to unit test too.
Add custom field (multi-select picklist) to User object. Values should be equal to each separate feature people are working on. It can hold up to 500 values so you should be safe.
For User account of developer 1 set "feature1" in the picklist. Set "feature2" for the other guy.
In the trigger write an if that tests presence of each picklist value and enters or leaves the call to relevant class. This wastes 1 query but you are sure that only the code you want will be called.
Each developer keeps on working in his own class file.
For integration test of both features simply set the multiselect to contain both features.
I found this trick especially useful when other guy's code turned out to be non-optimal and ate too many resources. I've just disabled his feature on my user account and kept on working.
This trick can be to some extend applied to Visualforce pages too (if you can divide them into components).
If you don't want to waste query - use some logic like "user's first name contains X" ;)
We had/have the exact same problem, we have a team of 10 Devs working on a force.com application that has loads of apex classes (>300) and VF pages (>300).
We started using Eclipse plugin but found it:
too slow working outside of the USA each time a save is called takes > 5 sections
to many merge issues with a team of 10 developers
Next we tried developing in our own individual sandboxes and then merging code. This is ok for a small project but when you have lots of files and need changes to be pushed between sandboxes it becomes impossible to manage as the only thing worse then force.com development tooling, is force.coms deployment/build tools. No automation its all manual. No easy way to move data between sandboxes either.
Our third approach was to just edit all our VF pages and Apex code in the browser. (not using their embedded editor that shows up in the bottom half of the page because that is buggy and slow) but just using the regular Editor under setup > develop > Apex classes. This worked ok. To supplement this we also had a scheduled job that would download all our code and save it into our SVN repository. We also built a tool that allow us to click a folder on our desktop and zip its contents and deploy it as static resources for us.
However this approach still has its short comings, i.e. it is slow and painful to develop in the cloud, their (salesforce) idea of Development As a Service is crazy. Also we have no real SCM we only have it acting as backups.
Bottom line is force.com is a CRM and not a Development platform, if you can? run, flee, get away from it as fast as you can. Using it for anything apart from a CRM is more trouble then it is worth. Even their Slogan "No Software" makes me laugh everytime
I'm not familiar with force.com, but couldn't you use source control and pull all the files down from force.com into your repository. Then you could all do your work, and merge your changes back into the mainline. Then whenever it's necessary push the mainline up to force.com?
Take a look at the "Development Lifecycle Guide: Enterprise Development on the Force.com Platform". You can find it on developer.force.com's documentation page.
You might want to consider working on separate static resources and pages and then just being careful when editing objects, classes etc.. If most of your development happens on client side code (page, staticresource, lightning component/app) you might be interested in this project: https://github.com/bvellacott/salesforce-build . In any case I strongly suggest using version control. If not on a server then at least locally on your machine, in case your peers overwrite your work.

Best practice for a Sitecore project

I am rather new to Sitecore and would like to know a bit more about the regular approach to a new project. I'm therefore willing to listen and try out some of the experienced Sitecore developers solutions. I have alot of questions, i won't ask them all. I am just very curious to the approach other people have.
What would be the best approach to start a Sitecore project?
How would you set your project up?
What will be your approach looking at the recycling of code in future projects?
In short: What experiences do YOU have (if you have worked with or are working on Sitecore projects) and how would you recommend other people to work with Sitecore.
Right now we are busy on building Sitecore blocks that we can just recycle in other projects but i know for sure there are 1001 handy tips and tricks out there. I hope we have some Sitecore pro's # stackoverflow that could help a bit.
Here is some general setup info, based on how we do things.
Subversion
This is not Sitecore specific but we set up our repository like this
branches - This is used for working on big updates to the site that may take a while. Say for example I wanted to update how all of the sidebars on the site worked, and this was going to take a few weeks to complete. What we do is create a new branch, and set up another sitecore instance for this dev branch and do what we need to do. When it is complete we merge it back into the trunk for testing and deployment.
tags - This is used for keeping a copy of code that will never be merged back into the trunk (that is the difference between this and branches), so for example when we deploy an update to a site we can create a tag of said code so we can go back to it if necessary.
trunk - The active code, anything checked in here should always be deployable.
The Trunk
This is where we are actively developing/fixing bugs, depending on which part of the project that we are on. We set it up something like this (as an example the project is called TheProject)
We keep our solution file at the root of this folder, this will reference the various libraries in the src folder as well as the web project in the website folder.
docs - A place to put documentation about the site. I strongly suggest that as you complete features/sections you write up a little guide about any special knowledge needed for it to work. So say I am working on a featured content box on a landing page. This box will automatically pull some content unless it is explicitly overridden. What I do when I complete something like this is I write a guide for the customer, using a lot of screenshots. I send the guide to the customer as well as put it in the docs folder. This both helps the customer train their staff, as well as helps new developers come up to speed with how things are done.
lib - This is where we keep any DLLs we are going to need to reference in our projects.
test - A place to put unit tests.
src - This is where we keep our project specific library code. So in here we would have a folder called TheProject.Library, and in there would be the visual studio project for said
web/Website - This is where we have Sitecore installed and is the root of the site. In here we have a project called something along the lines of TheProject.Web. In the project we add all of the general stuff like the web.config/layouts folder and so on.
General Sitecore Code Library
One the best things you can do is from the start setup a general Sitecore library that can be added onto over time. Then when you write any code for a project that is not only applicable to the project, you can add it there. It may seem obvious, but this will really help in the long term. You will end up with much more solid code, see link text .
So when we are done with all this we have something like this as a solution/project structure
TheProject (The solution)
TheProject.Library
TheProject.Web
MyCompany.SitecoreLibrary (our general sitecore library)
Tools
This is another general thing, but I find it can really help speed up Sitecore development. If you find yourself doing something over and over in Sitecore, using API write a tool to do it for you. This not only helps with solving whatever problem you are tackling, but also helps to get you more familiar with the API.
Resharper
This is more of a general .NET development suggestion, use Resharper(http://www.jetbrains.com/resharper/index.html). I am sort of a a Resharper fan boy, it makes so many things with development easier and quicker. In my mind the biggest advantage though is how easy it makes refactoring code, which is really important to do over time to keep things clean and understandable.
I hope some of this helps.
Gabe
This is, as you said, quite a big question. Here are some of my thoughts:
Developing Environment
First of all when I start a new project I install Sitecore on my developing environment and I make sure everything works. Either during installation or after I place the databases on a separate SQL-server and change the connectionstring accordingly.
I open up Visual Studio and create a solution and include the files needed. I create some kind of HelloWorld rendering and try building the solution so that I can verify that everything is working as it should.
When everything is up and running I create a zip-file of the whole solution, including the data-folder. Now it is time to add this to some kind of version control system, in my case Subversion.
I add the zip-file to subversion and also add all files that I think will be changed during the project, usually I tell subversion to ignore the sitecore folder, this speeds up performance drastically when checking in files.
After I perform a commit-action the other team members of my project can check out the code and start developing (after unzipping the zip-file, off-course)
We all work towards the same database although this goes against Sitecore recommendations, we havent had any problems with this approach however items in GUI created/changed by one developer take some time before it is created/changed for all the others.
We could off-course develop several different projects using the same Sitecore installation but since almost all customers use different versions of Sitecore we have found this approach a bit cumbersome.
Often we set up an automated build-server but this is a whole other issue.
Reusable code and renderings
I would like to say that we create neat packages based on the same codebase that gets reused between projects but unfortunately we are not there yet. Today it is a lot of cut and pasting between solutions.
Uploading code to customer
This is done via sitecore packages, normally with some kind of dynamic selection for what files to include, say all ascx-files in a specific folder changed the last 5 days.
There you have it.
Take a look at this series.
Especially the component architecture part have increased our level of reusability.
When you create your Visual Studio's project in Sitecore's web root folder and you will keep all Sitecore's dlls files inside bin directory, don't forget to add to project's references all these files:
bin\ComponentArt.Web.UI.dll
bin\HtmlAgilityPack.dll
bin\ITHit.WebDAV.Server.dll
bin\Lucene.Net.dll
bin\Mvp.Xml.dll
bin\Newtonsoft.Json.dll
bin\RadEditor.Net2.dll
bin\Sitecore.Kernel.dll
bin\Sitecore.Logging.dll
bin\Sitecore.NVelocity.dll
bin\Sitecore.Zip.dll
Because when you CLEAN your project and you will have reference only Sitecore.Kernel.dll (in most of cases), you will lost most of dlls from bin directory!!