|
There is a VS2022 version as well: Automatic Versions 3 - Visual Studio Marketplace[^]
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I tried this add-in yesterday. it works well for my case.
diligent hands rule....
|
|
|
|
|
Anything new I use GitVersion - preferably using "Mainline" mode. My pipeline is always checked in with the main code repository, so any changes to it also forces a version update. The pipeline could be as simple as a script or msbuild project if you do not need a build server and just release from your own computer.
Edit: It seems you do not even need a build script for .net framework (.NET core on the way) as it can hook into msbuild for those who are so inclined (no idea why you would be even for a single person project, but each to his own I guess). This will run without any VS plugin or similar as it is all handled by adding the nuget package.
modified 26-Aug-23 15:11pm.
|
|
|
|
|
To add to Mike's suggestion, there is a newer version which works with the changes MS made at VS 2022: Automatic Versions 3 - Visual Studio Marketplace[^] - I'm looking at installing it tomorrow as I was writing a tool to automate release versioning for myself when I had a moment ...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
From what I could see, it modifies the assembly version in the files when it run?
So you would have to commit these files? Or leave them out of git and restore them manually if lost (assuming single build computer)?
I have that in an old tool pipeline I am too lazy to change, but I would definitely not go down that route ever again.
|
|
|
|
|
I'm not sure - I was going to have a close look tomorrow (I don't have VS on my Surface ATM) but the way I was going to do it was to write an app that ran in a prebuild step for release only (easy to do) that modified the release notes to "fix" the version number from debug to release then ran again as a post build step to modify the assembly.cs file ready for the next debug version. Doing it in a VS extension seems a cleaner solution - but I've never written any of those!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
|
My favorite IDEs, for my favorite language, all do this automatically under the project properties. Just major/minor versions would need to adjusted manually, but build numbers get increased each time a "build" operation is executed....
|
|
|
|
|
I use the build in mechanism to automatically generate the 3rd (version) and 4th (revision) parts of the build number. The 3rd value is the day of the build and the 4th value is a value representing the minutes within the day.
So in assemblyInfo.cs have:
[assembly: AssemblyVersion("4.1.*")]
I have the major and minor set to 4.1 but these can be set to any numbers.
To retrieve the full version number values use:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Reflection;
using System.Diagnostics;
using System.IO;
static int Main(string[] args)
{
Assembly assembly = Assembly.GetExecutingAssembly();
FileVersionInfo fileVersionInfo = FileVersionInfo.GetVersionInfo(assembly.Location);
string version = fileVersionInfo.ProductVersion;
int majorNo = fileVersionInfo.FileMajorPart;
int minorNo = fileVersionInfo.FileMinorPart;
int buildNo = fileVersionInfo.ProductBuildPart;
int revisionNo = fileVersionInfo.ProductPrivatePart;
}
|
|
|
|
|
I don't, as a rule, trust anything in the "Cloud" - breeches are all too common for my tastes. But I also have to use the same tools on multiple platforms, and so finally bought into Office365. I can't afford the obscene prices MS charges for the standalone products on multiple devices. So I'm rethinking this OneDrive thing. Apparently I can't kill it, and everything from MS defaults to OneDrive as the first listed place to store data, so I probably should learn to use it. My question is, should I keep most storage local, and use OneDrive as a backup destination? Or should I use OneDrive as a main storage location and use my local drives for backup storage? Or should I do something else?
How do you use it?
Will Rogers never met me.
|
|
|
|
|
Roger Wright wrote: How do you use it?
I don't.
I keep everything on my PC local.
My phone (Android) puts some stuff in a cloud, but documents and images I keep local on my phone and move them to my PC.
|
|
|
|
|
It is not one or the other. OneDrive always have a copy (and keeps some history, but check it is enough for you to warrent not having an extra backup). Remember any ransomware or accidental modification will be synched to OneDrive as well.
You can decide which files/folders you always keep local, and which ones are only downloaded "on demand". If the files are important I would have at least one computer with the files locally.
|
|
|
|
|
Technically this is somewhat true. Try disconnecting your desktop from one drive.
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
That can give conflicts and you end up with two copies. The way I use it that last happened years ago, so I tend to forget about that.
|
|
|
|
|
If you roll out new features, we should not see conflicts. But I see your point.
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
For personal files I used to use & like Dropbox but has since been blocked at work so I switched to Google drive.
The office365 license assigned by my employer makes onedrive the default storage place for everything work related, if the work files have to be shared then sharepoint & it does integrate well with MS Teams.
|
|
|
|
|
I have been using it for quite a few years as a backup repository, and it seems fine.
|
|
|
|
|
I have been using OneDrive for a 5+ years now both at home and for work.
It's nice. I like it. I backup everything to OneDrive twice a week for work and home. I/you can also work directly from anything in OneDrive so you don't have to worry about separately backing anything up - it just backs up in real-time.
I also use Google Drive for some home stuff as well, no work.
You install it to your personal laptop/PC and it syncs with the clouds servers. It is fairly easy to learn and use.
WARNING: Both Google and Microsoft scan everything you upload to its servers for illegal content and things like hate speech, etc. (IT'S IN THE FINE PRINT). Not that you would, but be aware that your stuff is not private to only your eyes.
One of the extremely convenient things about storing files on the cloud is being able to access those files from almost any digital device you own: phone, laptop, pc, etc.
modified 26-Aug-23 15:07pm.
|
|
|
|
|
any glitches ever you run into?
diligent hands rule....
|
|
|
|
|
Yes, with the glitches but very, very rare (for me, once or twice in 5 years, I think). Usually all glitches are with the Microsoft or Google servers, etc. and NOT with my own pc or laptop, and they are usually resolved within 12-24 hours, or so. Glitches as in network issues and you cannot sync or work with the files on the cloud server.
I highly recommend it. I know for some putting your stuff on another server that you do not manage is a little scary, but unless you are storing illegal files, etc., you have nothing to worry about, seriously.
|
|
|
|
|
I do as well - it's really handy to be able to have a master copy on the desktop, which syncs the folders to OneDrive, and then be able to access them on my phone, Surface, or the kitchen computer - and it all pretty much "just works", though there can be a time delay between a update reaching some of the devices.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I have OneDrive family and OneDrive for business. I use both and even keep my Visual Studio source on my OneDrive for Business. I keep hearing OneDrive Windows and Office keep defaulting to OneDrive but I have yet to see this behavior.
|
|
|
|
|
I had stuff on OneDrive that "disappeared" (folders emptied). So, no, I use my own external drives for backing up. I might also create a USB stick of my "favorites", now and then; just because.
(I believe OneDrive links to "account" and "hardware" info and if there is an issue with those, your OneDrive data can go south).
I used to, and may still use OneDrive for a "share" (instead of mailing) if the need arises; but that's it.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
I have a bunch of small utilities (Sysinternals type, and others), and primarily use OneDrive to host those files.
So I have the files locally, and then they sync automatically on any other system where I login with the same credentials. So if I happen to need one of these utilities, it's already there.
I really just use it to sync one folder across different systems I use. If a utility gets updated, I only replace the file once, and it syncs back everywhere else I have OneDrive running.
Personal files? Nope. If they do end up there, then it's really nothing of importance, and nothing I would care about if leaked.
|
|
|
|
|
Maybe I'm paranoid, but I don't trust those cloud storage for work or personal stuff. I have had OneDrive available for many years now and have only used it accidentally.
I am a solo dev in a small company. All important work projects/code/products/docs/etc. reside on a physical server here in my home office. Normally during the week, I'm working on projects via the server shares from my desktop system. The magical piece of the puzzle though is my laptop.
The laptop uses the same server shares as the desktop with one big difference...those network folders are configured to be available offline. At least once a week I fire up the laptop and let it synch those folders. If it's a weekend where I'm working remotely, I can do whatever, then just let it synch again when I get home. Once it's done, it gets powered off until the next week, or I decide that a backup is warranted.
Unfortunately, this backup strategy was put to the test about 6 years ago when a 4 y/o spinner on the server crashed. Fortunately, the laptop synch was only a day old, so I only lost a day's work. (which actually turned out better the second time ) Unfortunately, that drive took with it several sql server database log files and backups. That was humbling. My next project after that was a sql server backup utility that uses hot (system drive), warm (data drive), and cold (offsite/ftp) backup locations each with x number of backups per batch.
I also use an external drive (mostly personal/customer databases) that can travel with the laptop as needed. Once a month, I backup all development files to that drive. I then back that drive up to another identical external drive once a month. That drive stays in my man-cave...a detached garage. Of course, I do realize that I'm screwed if the house and garage both burned down. Given bandwidth these days, maybe I need to consider offsite storage for code backups.
"Go forth into the source" - Neal Morse
"Hope is contagious"
|
|
|
|