Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Essential
Aug 14, 2003

I am such an rear end in a top hat for not looking at this before.

Thanks, this will seriously make a huge difference in my development life!

Adbot
ADBOT LOVES YOU

diadem
Sep 20, 2003
eet bugz
Having a strange issue with MSBuild and intellisence in regards to workflow activities and refactoring (but not code behind activities).

The compiler seems to have some sort of internal cache that I cannot flush by the standard clear cache commands or even by deleting files. The question will probably will only make sense to people familiar with Wokflow Foundation. This issue does not occur with .cs files, just .xaml files of the workflow activity type.


Environment (Visual Studio 2012 Ultimate):

Project A has my object models. It compiles fine
Project B has my workflow activities. It references project A as a project reference.

What works as expected (.cs files): If I create a new code behind activity in project B (CodeActivity1.cs) then intellisense works fine. I can create an instance of a class of A based upon the most recent compilation of project A.

What does not work as expected (.xaml files): If I try exactly the same thing with a workflow activity (Activity1.xaml) then intellisense isn't smart enough to use the latest version. It uses a cache of whatever version was added to it. When I look at the code of the xaml the namespace includes the assembly by name, not by version.

Attempts at compilation mirror the odd behavior of intellisence.

The only work around I found for this is to delete and re-add the variable or argument. The values of the newly added variable are exactly the same as the deleted one. This seems to work for the name of a property but not its type.

How can I fix this?

diadem fucked around with this message at 01:46 on Jun 21, 2013

edmund745
Jun 5, 2010

gariig posted:

Here is part of the confusion. The Visual Studio Express SKUs can't run third party plug-ins like AnkhSVN. However, Microsoft made an exception for the TFS plug-in which can run. So yes the Product Unit Manager for Team Foundation Services does know what he is talking about. ...
There seems to be accounts of before Microsoft allowed TFS Express to work with VS Express--and also accounts of after, when they did. And the TFS Express use terms don't clear much up.
Not that it matters much, it's all indecipherable.

I've spent the last day or so searching Google for "single user version source control", and people say the best choice is,,,,, everything. Everyone says everything is great for some reason. I understand what it's supposed to do, but everything I've seen so far is way too much work to learn to use, for one person working only on one PC.

I'd want something more like PC file-backup software: no network bothers, no multiple-user capability, no branching or merging cause I'd never use it. Just save a set of files as a series of revisions, and go forwards or backwards.... I want something I can set up and be using in ~15 minutes. It looks like if I really wanted it, I'd have to write it myself though. :\

The source-control-software ability to visually compare file versions is nice, but I can live without it.

quote:

Also, I suggest posting some of the code you have written. The description of it sounds like you are doing things the really hard way.
The code is lousy because hindsight is 20/20 and I've not really done it in ten years (and what I had to do back then wasn't real complicated either). Using massive numbers of functionally-global variables hasn't really been an issue however.

crashdome
Jun 28, 2011
TortoiseHG.

Install, right-click on working folder, create new repository, done.

When you want to initiate a new "version", right-click and commit.

When you want to revert, right-click and revert.

Edit: oh, you may have to specify your name on first commit. That's about it. Much easier than SVN. Don't know about git.

crashdome fucked around with this message at 02:01 on Jun 21, 2013

RICHUNCLEPENNYBAGS
Dec 21, 2010

edmund745 posted:

There seems to be accounts of before Microsoft allowed TFS Express to work with VS Express--and also accounts of after, when they did. And the TFS Express use terms don't clear much up.
Not that it matters much, it's all indecipherable.

I've spent the last day or so searching Google for "single user version source control", and people say the best choice is,,,,, everything. Everyone says everything is great for some reason. I understand what it's supposed to do, but everything I've seen so far is way too much work to learn to use, for one person working only on one PC.

I'd want something more like PC file-backup software: no network bothers, no multiple-user capability, no branching or merging cause I'd never use it. Just save a set of files as a series of revisions, and go forwards or backwards.... I want something I can set up and be using in ~15 minutes. It looks like if I really wanted it, I'd have to write it myself though. :\

The source-control-software ability to visually compare file versions is nice, but I can live without it.

OK, so, make a mercurial repo and store it on Dropbox or something. You need to know like three commands to do what you want and they're all here: http://hginit.com/01.html

Dietrich
Sep 11, 2001

Git is pretty identical to mercurial.

clayburn
Mar 6, 2007

Cammy Cam Juice

edmund745 posted:

I'd want something more like PC file-backup software: no network bothers, no multiple-user capability, no branching or merging cause I'd never use it. Just save a set of files as a series of revisions, and go forwards or backwards.... I want something I can set up and be using in ~15 minutes. It looks like if I really wanted it, I'd have to write it myself though. :\

You can do this with git or mercurial with no problem. You could do what you are describing with about 3 commands and 10 minutes of research. There is no reason to write this yourself. You would just have to ignore all the other features.

epswing
Nov 4, 2003

Soiled Meat

edmund745 posted:

I'd want something more like PC file-backup software: no network bothers, no multiple-user capability, no branching or merging cause I'd never use it. Just save a set of files as a series of revisions, and go forwards or backwards.... I want something I can set up and be using in ~15 minutes. It looks like if I really wanted it, I'd have to write it myself though. :\

For the love of god, you just described both git and mercurial. Stop posting and learn about either git or mercurial or "write it yourself" (lol) and stop making GBS threads up our beloved subforum. Jesus Christ.

Zhentar
Sep 28, 2003

Brilliant Master Genius
Both git and mercurial allow both branching and merging, so no, they don't meet his criteria. No source control software software meets his criteria because the criteria are dumb as poo poo.

epswing
Nov 4, 2003

Soiled Meat

Zhentar posted:

Both git and mercurial allow both branching and merging, so no, they don't meet his criteria. No source control software software meets his criteria because the criteria are dumb as poo poo.

I think "save a set of files as a series of revisions, and go forwards or backwards" qualifies. For someone who doesn't know source control, this is a good mental step in the right direction. Any modern vcs will do this and more, and the suggestions of git and hg satisfy the "set up in 15 minutes" and "work offline" criteria too. The fact that he/she is ignoring the voices of several people who know better is moderately frustrating.

epswing fucked around with this message at 05:59 on Jun 21, 2013

Eggnogium
Jun 1, 2010

Never give an inch! Hnnnghhhhhh!
Is an irrational aversion to source control in the new DSM?

edmund745
Jun 5, 2010
I think TortiseSVN is almost easy to use, but the setup doesn't make any sense.

For this explanation, I have the Visual Studio project files, and I will call them [file set #1]. There is no other file set, because I have already seen that if [file set #1] is moved then stuff don't work, since there is absolute paths written into a bunch of the files.

------

Now........ when you set up TortiseSVN, it first asks you to set up the repository, and the tutorials say to point to the existing project, that is usually on a server.
And THEN it says to indicate a working copy. And that is ,,,,, where?

If you are doing this all on your own computer, then there is only [file set #1] that exists, and indicating the same set of files as both the repository and the working copy doesn't make any sense.

Should I copy [file set #1] to another location on the computer [file set #2], and then indicate [file set #2] as the repository and [file set #1] as the working copy? It would seem that [file set #1] would need to be the working copy, because that is the ones that Visual Studio is going to use.
But none of the tutorials say that you have to create [file set #2] yourself.... ?


If you are using a repository that already exists, then it makes sense for the setup process to ask what repository to use first--but if you are doing everything on one PC, then it would seem that it should ask "what set of files do you want to save versions of?", and then ask "what location should these be saved to?".


About 95% of all the tutorials I can find only tell you how to set up to a repository that already exists on a remote server. They don't really give instructions for how to set the whole thing up from nothing on one single computer, when there is only one set of source files to begin with. And the couple tutorials I have found that do try to say how to do it all on one PC, are so old that the instructions are outdated and can't be followed because the menu options they refer to don't exist in the current version of TortiseSVN.

......

Also: I don't want anything online even if it is free, just because my cable connection is spotty some days, and I won't ever need to access this stuff remotely.

[edit added]

I think I almost did it right. I followed the instructions on this page - http://www.shokhirev.com/nikolai/programs/SVN/svn.html
but it kept sticking the working copy files (in the Visual Studio) folder in the extra "trunk" sub-folder. I had to move the CS project files into the root of the SVN repository for Visual Studio to be able to open them after checking out..... Also TortiseSVN copies the empty trunk, tags and branches folders into the Visual Studio project directory... ? That page tutorial says to put them in, but doesn't explain what those folders are there for. And they are empty?

Maybe I will put up my own web page with instructions, it might help somebody. None I found explain it very well, or show pics of what you're supposed to see in TortiseSVN *and* Windows Explorer....

edmund745 fucked around with this message at 10:36 on Jun 21, 2013

Dietrich
Sep 11, 2001

DON'T USE SVN.

USE MERCURIAL.

edmund745
Jun 5, 2010

Dietrich posted:

DON'T USE SVN.

USE MERCURIAL.
Would there be any particular reason for the preference?
I find lots of accounts of people saying {everything} is great, and {everything else} sucks.

Note that most of those discussions are about managing teams of coders and related problems with using a remote repository to push changes, creating & merging branches often and a whole bunch of other things that s single person working on just the local machine likely won't need. ?

-----

For that matter, a lot of people said Foundation Server is great, but so far all it has done is make my computer reboot about four times in the last 48 hours.
Also when I tried to change any of the options in the admin console or connect VisStudio to it.... it asks me for a username and password, which I didn't set up and (apparently) it's not supposed to have.
(the usual advice for this is to just reinstall, but I'm only going to do that halfway, most likely)

Dietrich
Sep 11, 2001

1) Mercurial is just plain easier to setup and use than SVN
2) SVN is wrong-headed about the way development works.

Here's the setup.
1) Install Mercurial. Install TortiseHg if you don't like the command line.
2) Initialize a repository in your program's directory. Hg Init on the command line, Create Repository in tortiseHg
3) Commit your files to get them tracked. Hg Commit -a on the command line. Commit in TortiseHg.

You are done.

For the wrong-headedness, it comes down to the fact that git and mercurial realize that software development usually means making changes to more than one file at a time. If I add a method in one file, and then call the method in another file, both files contain the change needed for the code to be operational. It doesn't make any sense to roll back one without the other. Hg and Git deal with change sets- that is all the edits, additions, and deletions of files across your entire folder are packaged together and treated as one atomic unit each time you commit your changes. SVN does not. Each file's changes are tracked individually. One file will be on revision 48 and the other on revision 12. Trying to roll back and forward your entire code base become more difficult.

Dietrich fucked around with this message at 15:10 on Jun 21, 2013

gariig
Dec 31, 2004
Beaten into submission by my fiance
Pillbug
I'm assuming Deitrich is 100% because I've never used Subversion. However, the real reason to use git and Mercurial (hg) is because they are "distributed version control systems" (DVCS). They do not need a centralized server up and running you create a repository in a folder and you can do change tracking locally without ever setting up a server. Also, not a single person here suggest Subversion (SVN).

You also shouldn't Google this stuff because all of the tools work and it's minor differences between them. Listen to us we are professionals trying to give you free advice. You have probably 30 years development experience trying to make your life easier, and you are not listening and actively sabotaging our advice. Both crashdome and Dietrich have told you how to setup Mercurial and to check-in items. Start with Mercurial.

wwb
Aug 17, 2004

Dietrich posted:

Git is pretty identical to mercurial.

In terms of workflow and poo poo yes. In terms of tooling on windows no. Sourcetree helps alot but TortoiseHG is so goddamn sweet that it is hard to beat.

I still use SVN occasionally but for very, very specific purposes more related to devops and continuious integration. No you certainly don't want to start using that poo poo under any circumstances.

edmund745
Jun 5, 2010

Dietrich posted:

1) Mercurial is just plain easier to setup and use than SVN
2) SVN is wrong-headed about the way development works.
Firstly, thank you so much for a clear, concise explanation of the issue.

So then, I already have TortiseSVN installed.... Should I install Mercurial too, and then track the TortiseSVN repository changes in Mercurial?
:>D

I will try Mercurial, but I could see arguments for both ways of doing it, I guess. Not having used either yet.
A lot of people must have thought the SVN way was worth doing...?

gariig posted:

,,, git and Mercurial (hg) ,,, are "distributed version control systems" (DVCS). They do not need a centralized server up and running you create a repository in a folder and you can do change tracking locally without ever setting up a server.
TortiseSVN allows using only a local repository too; the main reason I tried it first was that (somewhere) pointed that out.

The generic-SVC aspect that tripped me up was that to use a local repository, you first have to add the project files into the repository, and then you set the working copy location as the location that the original project files are already in.

Dr. Poz
Sep 8, 2003

Dr. Poz just diagnosed you with a serious case of being a pussy. Now get back out there and hit them till you can't remember your kid's name.

Pillbug

edmund745 posted:

I will try Mercurial, but I could see arguments for both ways of doing it, I guess. Not having used either yet.
A lot of people must have thought the SVN way was worth doing...?

I work in a shop that uses SVN. I can assure you it's only used here because it's what the most senior developer at the time was familiar with and lack of inertia has kept it in place. While I rock the boat occasionally and suggest Git/Mercurial after each of our monthly releases subsequently reveals what was missed/overwritten with the merge, it falls on apathetic ears.

Dietrich
Sep 11, 2001

edmund745 posted:

Firstly, thank you so much for a clear, concise explanation of the issue.

So then, I already have TortiseSVN installed.... Should I install Mercurial too, and then track the TortiseSVN repository changes in Mercurial?
:>D

I will try Mercurial, but I could see arguments for both ways of doing it, I guess. Not having used either yet.
A lot of people must have thought the SVN way was worth doing...?

TortiseSVN allows using only a local repository too; the main reason I tried it first was that (somewhere) pointed that out.

The generic-SVC aspect that tripped me up was that to use a local repository, you first have to add the project files into the repository, and then you set the working copy location as the location that the original project files are already in.

I have no idea what you are talking about. TortiseSVN does not create a local repository, it allows you to pretend that your computer is also the server. A semantic difference on the surface, but an important one.

Uninstall tortiseSVN. Install tortiseHg. Don't bother with SVN at all. Forget the abbreviation. Forget you ever heard of it.

Girl With Huge Tits posted:

I work in a shop that uses SVN. I can assure you it's only used here because it's what the most senior developer at the time was familiar with and lack of inertia has kept it in place. While I rock the boat occasionally and suggest Git/Mercurial after each of our monthly releases subsequently reveals what was missed/overwritten with the merge, it falls on apathetic ears.

This is pretty typical. People only use SVN because their shops only use SVN because their senior developers only used CVS for decades and SVN is an improvement to CVS with a similar workflow.

Git and Mercurial are both vastly better than SVN. Mercurial is easier to pick up. Git is more powerful and flexible.

Dietrich fucked around with this message at 15:49 on Jun 21, 2013

Atoramos
Aug 31, 2003

Jim's now a Blind Cave Salamander!


I feel silly asking about this, but nothing I do seems to work. I create a cookie in my C# Asp.Net application, however I find that deleting this cookie is impossible. I tried the normal stuff for Attempt 1 and 2, and then went wild with 3 and 4 just to show how indestructible the cookie is:

[REMOVED EXCESSIVE CODE]

The problem was, my logout link wasn't set to 'return false', so the Ajax was firing while the page had already posted, thus the cookies couldn't be written.

Atoramos fucked around with this message at 20:11 on Jun 21, 2013

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug
I might be on crack, but aren't you creating a cookie that expires in a year, then setting its expiration to one day less than one year from now?

Zhentar
Sep 28, 2003

Brilliant Master Genius
To offset the anti-SVN crowd a little bit... SVN tends to have better toolset integration, because it's been around and popular for a lot longer (and because libgit is a rather recent development). Also, both Git and Mercurial have some scalability issues with large projects, especially with many binary files.

Atoramos
Aug 31, 2003

Jim's now a Blind Cave Salamander!


Ithaqua posted:

I might be on crack, but aren't you creating a cookie that expires in a year, then setting its expiration to one day less than one year from now?

I don't think so? I think I'm creating a cookie that expires in a year, then setting its expiration to one day less than DateTime.Now, which should be yesterday.

Edit: Changed all use of DateTime.Now.AddDay(-1) to AddYear(-2), no luck.

Atoramos fucked around with this message at 18:21 on Jun 21, 2013

glompix
Jan 19, 2004

propane grill-pilled

Atoramos posted:

I feel silly asking about this, but nothing I do seems to work. I create a cookie in my C# Asp.Net application:

I put a breakpoint in my code for cookie creation, and I know it's not being hit after deleting the cookies or something silly like that.

Is the cookie actually available to you on subsequent requests after setting the expiration like that? I wouldn't expect the object to be removed from the cookie collection right after you do that, but I would expect it to be ineffective. What are you trying to accomplish?

Dietrich
Sep 11, 2001

Zhentar posted:

To offset the anti-SVN crowd a little bit... SVN tends to have better toolset integration, because it's been around and popular for a lot longer (and because libgit is a rather recent development). Also, both Git and Mercurial have some scalability issues with large projects, especially with many binary files.

The biggest program I work on has 773 MB of code, references, images, and so on in the source directory.

My git repository for this program- with over 2 years of history- is 68.3 MB.

So basically I don't know where you're getting that from.

Zhentar
Sep 28, 2003

Brilliant Master Genius
I'm talking about large projects, not a tiny little thing like that.

Atoramos
Aug 31, 2003

Jim's now a Blind Cave Salamander!


glompix posted:

Is the cookie actually available to you on subsequent requests after setting the expiration like that? I wouldn't expect the object to be removed from the cookie collection right after you do that, but I would expect it to be ineffective. What are you trying to accomplish?

I have a personal website that lets me rate and suggest movies between my friends and myself. As such, there's no password authentication or anything else required, you just log in and it sets your username to the one you logged in as. I use Session["Username"] to store your username, but found that the timeout was annoying. I thought about it, and realized I wanted to keep users logged in, which is why I'm introducing cookies. Here's the function of that initial login:

edit: Removed code now that I figured it out. I'm a dummy.

Atoramos fucked around with this message at 20:07 on Jun 21, 2013

wwb
Aug 17, 2004

You know they have a whole membership system for that. Failing that you can just manually use the forms authentication plumbing and never have to worry about low-level cookie handling.

Personally, I'd make sure something later in the pipeline isn't resetting the cookie.

Atoramos
Aug 31, 2003

Jim's now a Blind Cave Salamander!


wwb posted:

You know they have a whole membership system for that. Failing that you can just manually use the forms authentication plumbing and never have to worry about low-level cookie handling.

Personally, I'd make sure something later in the pipeline isn't resetting the cookie.

Yea I'm familiar with asp.net membership and use it on any of my real sites, but really felt like it was a bit much for this type of a project and was curious why things simply won't work.

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

Atoramos posted:

Yea I'm familiar with asp.net membership and use it on any of my real sites, but really felt like it was a bit much for this type of a project and was curious why things simply won't work.

Have you taken longer coding and trying to debug this issue than it would've taken you to use the ASP .NET membership provider?

Exactly.

Atoramos
Aug 31, 2003

Jim's now a Blind Cave Salamander!


Ithaqua posted:

Have you taken longer coding and trying to debug this issue than it would've taken you to use the ASP .NET membership provider?

Exactly.

Yea, at first it was me being lazy since I hadn't set up the membership stuff on my personal DB yet, and then progressed into curious frustration that it wasn't working.

By the way, I did figure it out: I'm an idiot and forgot to make the Logout link itself return false or href="#". Everything was breaking because the page would post from the link, completely separate from the Ajax logout.

wwb
Aug 17, 2004

And that is just a small issue when you are dealing with logins and cookies.

I do feel you on the membership being overkill, but it is just as easy to do FormsAuthentication.SetCookie(userName) than it is to set the cookie and then you can ride that framework for all it is worth.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

Zhentar posted:

I'm talking about large projects, not a tiny little thing like that.

Yeah, git tends to get intolerably slow after the first couple of gigabytes or so. There are ways to get around that (like sharding into separate repositories), but that adds a pretty substantial cognitive overhead for everyone and you might want to switch to something more suited to large repositories.

Still don't use svn unless you're on a tight budget and can't afford a perforce license though.

Wozbo
Jul 5, 2010
I've got a question about something that may or may not exist:

Are there any OSS projects that work at the data access layer that do automapping/ relationships? I'm currently toying around with the idea of making my own library that uses some attributes to handle mapping arbitrary tables (or sub portions) to a class to be returned in an API like fashion, including things like automatic search building and partial mapping.

My current thoughts are to split up the attributes so that I have two types of "Class-table" things. One for data, and one for relational mapping (so that I can build things that would traverse foreign keys or what have you).


Example:

I have two resources. One of which is a User, another is a Group.

I would have 3 classes, one which is a User class (could be called differently or something, attributes would point to [Table("User_table")] or something). One for Groups, and one that would have two members that point to the linking IDs/ a linking table/ some linking logic. If the Property matches the column name, then you don't need anything on the property, otherwise you'd do something like [Column("username")] for public string Name {get; set;}. I'm thinking [TableLink("User_Table", "Group_table")][Table("UserGroup")] and decorating the properties with the proper attributes for linking. Eventually I want the linking tables to be such that you can make a object that's comprised of multiple sub objects and have the library just start grabbing stuff and populating. I'm also thinking of some unit testing/ database versioning stuff I could possibly tack on to this, but that would be later.

Does this make any sense/ does something like this exist? I'm prototyping out something right now for the funsies, but if something already does it then there's really no point and I'd love to look at what's out there. I'm not finding anything or my google fu seems lacking.

Disclaimer: This is something I came up in shower-logic time. It may or may not be completely stupid. I'm testing the water here.

EDIT: I'm also wanting to make this work in mono, if that's any help.

Dietrich
Sep 11, 2001

there are many ORMs that do what you are asking.

NHibernate is the big boy on the block, it can do just about everything but has a steep learning curve. If you have a long term need to do these sorts of things, it might be worth the investment.

MicroORM is a nice light weight approach, uses convention over configuration type stuff. It maps pretty much 1:1 with what you've described there.

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

Dietrich posted:

there are many ORMs that do what you are asking.

NHibernate is the big boy on the block, it can do just about everything but has a steep learning curve. If you have a long term need to do these sorts of things, it might be worth the investment.

MicroORM is a nice light weight approach, uses convention over configuration type stuff. It maps pretty much 1:1 with what you've described there.

A friend of mine has an implementation of the repository pattern for nHibernate. It's great if you're just doing simple CRUD stuff and not more complex SQL.

https://github.com/BobPalmer/Dormouse.Core

Wozbo
Jul 5, 2010

Dietrich posted:

there are many ORMs that do what you are asking.

NHibernate is the big boy on the block, it can do just about everything but has a steep learning curve. If you have a long term need to do these sorts of things, it might be worth the investment.

MicroORM is a nice light weight approach, uses convention over configuration type stuff. It maps pretty much 1:1 with what you've described there.

Thanks for this! for some reason ORM was slipping my mind. I'm not too db oriented but I've just noticed that the stuff I've been doing is really janky. I'm gonna take the time to learn this!

Specifically: I want to integrate some of the features I was talking about with http://www.servicestack.net/

Wozbo fucked around with this message at 19:47 on Jun 23, 2013

Dietrich
Sep 11, 2001

Wozbo posted:

Thanks for this! for some reason ORM was slipping my mind. I'm not too db oriented but I've just noticed that the stuff I've been doing is really janky. I'm gonna take the time to learn this!

Specifically: I want to integrate some of the features I was talking about with http://www.servicestack.net/

Service Stack comes with OrmLite - https://github.com/ServiceStack/ServiceStack.OrmLite

It's a good simple one. I've used it.

Adbot
ADBOT LOVES YOU

Wozbo
Jul 5, 2010
Is there any real reason to go with nHibernate then? I kinda want to learn something that I can take with me in this particular case.

  • Locked thread