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
Dietrich
Sep 11, 2001

Wozbo posted:

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.

For your particular problem, as described? No.

Nhibernate is what you want to get in to when you want polymorphic table mappings and extension tables and stuff like that. You could likely meet 99%of application requirements with a micro Orm that supports linq.

Adbot
ADBOT LOVES YOU

Dirk Pitt
Sep 14, 2007

haha yes, this feels good

Toilet Rascal
I use linq or ef, however I am a fan of this developer and want to try this out.

https://github.com/robconery/massive

It appears to be simple, though it might be too basic or not at all what you are describing.

ljw1004
Jan 18, 2005

rum
With all the version-control talk, I want to mention

http://tfs.visualstudio.com

I'm someone with an irrational fear of version-control but it was pretty easy to use...
(1) log in with your .NET account,
(2) choose whether you want it backed by GIT or TFS,
(3) click the button on the web page to launch VisualStudio all correctly configured,
(4) right-click on SolutionExplorer and "Add To Version Control"
(5) check it in from with VS.

(My identical twin brother doesn't share this irrational fear, doesn't use VisualStudio much at all, he swears by SVN, and has little pictures of tortoises all over his Windows Explorer.)

Shitty Treat
Feb 21, 2012

Stoopid?
I need to convert a small VB6 app to VB.net is there any software that can convert it semi reliably so I only need to fix a few things or will it be a complete mess and I'm better off starting over from scratch?

Also for my last class this year at UNI we made a small 2 player game, when I start back next year one of my first classes will be to do with network programming so my tutor said if we are bored over the summer break and want to get started see if we can add client/server functionality to it so its playable over the internet.

I have got the client/server stuff done but latency makes it unplayable some times.
I have been reading 'Network Programming in .NET With C# and Visual Basic .NET' which has got me this far.
Does anyone have a good resource for adding in some way to combat this?
Preferably in .NET but Java is also fine just so I can get a general idea of how to combat it.

This is not homework I get no grades for this its just something to do over summer, I don't want the code for it just a pointer to some good reading material.

RICHUNCLEPENNYBAGS
Dec 21, 2010

lovely Treat posted:

I need to convert a small VB6 app to VB.net is there any software that can convert it semi reliably so I only need to fix a few things or will it be a complete mess and I'm better off starting over from scratch?

Even if there were such a tool (I don't think this is), the output would not in any way resemble best-practice VB.Net code.

crashdome
Jun 28, 2011

ljw1004 posted:

My identical twin brother doesn't share this irrational fear, doesn't use VisualStudio much at all, he swears by SVN, and has little pictures of tortoises all over his Windows Explorer.

Sounds like the Arnold Schwarzenegger/Danny DeVito of programming. :D

lovely Treat posted:

VB6 conversion

It depends but, I'm going to say start from scratch. It'll be a good learning experience for you since you sound like you are starting out. Just keep reminding yourself that how ever it was done in VB6, there is a better OO approach and trying to figure it all out will give you good practice in improving your critical thinking skills if you ever have to deal with converting or improving on other lovely OO designs.

crashdome fucked around with this message at 12:53 on Jun 24, 2013

Dietrich
Sep 11, 2001

lovely Treat posted:

I need to convert a small VB6 app to VB.net is there any software that can convert it semi reliably so I only need to fix a few things or will it be a complete mess and I'm better off starting over from scratch?

Also for my last class this year at UNI we made a small 2 player game, when I start back next year one of my first classes will be to do with network programming so my tutor said if we are bored over the summer break and want to get started see if we can add client/server functionality to it so its playable over the internet.

I have got the client/server stuff done but latency makes it unplayable some times.
I have been reading 'Network Programming in .NET With C# and Visual Basic .NET' which has got me this far.
Does anyone have a good resource for adding in some way to combat this?
Preferably in .NET but Java is also fine just so I can get a general idea of how to combat it.

This is not homework I get no grades for this its just something to do over summer, I don't want the code for it just a pointer to some good reading material.

I'd recommend looking at some open source video game code to see how they handle that problem. The needs for a video game when it comes to latency are very different than a business application.

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug
VB6 has as much to do with VB .NET as ham has to do with hamsters.

Sab669
Sep 24, 2009

Another dumb question of the week!

I see forms have their AutoSize property / enumeration, and at initial glance the GrowOnly seemed perfect. Lets users expand the form without shrinking so no controls get distorted. In practice you simply can't shrink it after you expand it :doh:
Is the only way to achieve this expanding and shrinking-but-not-too-much behavior in the ResizeEnd event? Compare the new size to what I want and if it's too small just force a resize to the desired minimums.

edit; Oh, yea, the min. size properties work. Guess I was never aware of them :downs:

Sab669 fucked around with this message at 15:35 on Jun 24, 2013

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

Sab669 posted:

Another dumb question of the week!

I see forms have their AutoSize property / enumeration, and at initial glance the GrowOnly seemed perfect. Lets users expand the form without shrinking so no controls get distorted. In practice you simply can't shrink it after you expand it :doh:
Is the only way to achieve this expanding and shrinking-but-not-too-much behavior in the ResizeEnd event? Compare the new size to what I want and if it's too small just force a resize to the desired minimums.

I'm pretty sure there are Minimum and Maximum settings for Height and Width. Set the Min and the let users resize to their hearts content.

Edit: Is this WinForms or WPF?

Shitty Treat
Feb 21, 2012

Stoopid?

Dietrich posted:

I'd recommend looking at some open source video game code to see how they handle that problem. The needs for a video game when it comes to latency are very different than a business application.

Yea I have looked at other games and stuff but copying code from another game and adapting it for my needs feels like the easier option, was more after some reading material so I could work out my own solution over the long summer break.

crashdome posted:


It depends but, I'm going to say start from scratch. It'll be a good learning experience for you since you sound like you are starting out.

Yea I guess starting from scratch will be more beneficial towards my learning progress, not like I don't have plenty of free time for the next few months.

epswing
Nov 4, 2003

Soiled Meat

lovely Treat posted:

plenty of free time for the next few months.

I would kill for this.

Dietrich
Sep 11, 2001

lovely Treat posted:

Yea I have looked at other games and stuff but copying code from another game and adapting it for my needs feels like the easier option, was more after some reading material so I could work out my own solution over the long summer break.

I don't mean to be dismissive, but the game development megathread could probably recommend some good reading for you.

Latency combating techniques aren't generally language or framework specific.

Shitty Treat
Feb 21, 2012

Stoopid?

Dietrich posted:

I don't mean to be dismissive, but the game development megathread could probably recommend some good reading for you.

Latency combating techniques aren't generally language or framework specific.

I'll give the gamedev thread a shot, thanks.
Just thought it was worth asking in the .Net thread while I was already asking another question.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



epalm posted:

I would kill for this.

You would have a lot of free time in prison...

raminasi
Jan 25, 2005

a last drink with no ice
Has anyone ever used Microsoft Solver Foundation for anything?

e: This looks overpowered for me. I just want to write some F# that will minimize a function I define (also in F#). Maybe this is exactly what I want...

raminasi fucked around with this message at 02:15 on Jun 25, 2013

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug
I just want to state for the record: I hate trying to automate things with MSBuild. I'm transitioning a client from VS2005 web deploy projects and DB projects to VS2012 "publishing profiles" and SSDT projects, and everything works almost the same, but is all just different enough to make the entire thing a loving nightmare.

For example, VS2005 web deploy projects were an actual project file that you could have in your solution, with references and all that stuff, so you could build a solution configuration and it would build all the projects, then run the web deploy project. With publishing profiles, I still can't figure out how to have it build a solution, then run a specific publishing profile. I can have MSBuild execute the "website.publishproj" file, but that doesn't build the references or output the code analysis warnings, which I need to have happen because this client has a major issue with thousands of warnings that they want to get under control. I'm probably going to have to end up hacking around it -- build the solution without the website, then build the publishproject file afterwards in order to actually precompile site. It doesn't help that apparently no one else has ever tried to do what seems like it should be a really common workflow. Google comes up with nothing.

wwb
Aug 17, 2004

FWIW, this is the msbuild line I've used on every website since 2008 or so:

code:
<MSBuild Projects="$(AdminProj)"
	Targets="Rebuild;ResolveReferences;_CopyWebApplication"
	Properties="WebProjectOutputDir=$(AdminTarget);OutDir=$(AdminTarget)\bin\;Configuration=$(Configuration)" />
But I'm kind of old school and never did get my head wrapped around the new deployment projects, largely because they seemed like black magic compared to ugly assed MSBuild.

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

wwb posted:

FWIW, this is the msbuild line I've used on every website since 2008 or so:

code:
<MSBuild Projects="$(AdminProj)"
	Targets="Rebuild;ResolveReferences;_CopyWebApplication"
	Properties="WebProjectOutputDir=$(AdminTarget);OutDir=$(AdminTarget)\bin\;Configuration=$(Configuration)" />
But I'm kind of old school and never did get my head wrapped around the new deployment projects, largely because they seemed like black magic compared to ugly assed MSBuild.

That's my favorite part of this whole thing: I've never done anything with
  • Old-style web deployment projects
  • New-style web publishing profiles
  • Old-style DB projects
  • New-style SSDT projects

Personally, I wouldn't pay to have a consultant learn this poo poo on my dime.

Dietrich
Sep 11, 2001

Here's how you do it in TeamCity (Ithaqua hisses)

subx
Jan 12, 2003

If we hit that bullseye, the rest of the dominoes should fall like a house of cards. Checkmate.
Working with MVC:

I remember reading/seeing somewhere about Entity Framework not handling bridge tables with additional info well, but is there any good way to do this?

I have a set of check boxes for different locations, like "Outside", "Hallway", "Away From Facility" and "Other". Some of these can have additional text, so the Locations table in the Database has a flag "HasAdditionalText" that I use to open a text box when you select it.

So my tables look like:



Seems logical to me, but if someone has suggestions of a better way to design them, feel free to let me know.

Is there a way to make Entity Framework actually do this correctly? I don't know if there's any magic-name I can give the additional text box that opens when you select a location to make it save to that bridge.

Additional Question:

Apparently if I put a foreach loop in my View, it tries to execute it before it builds the model. I get a Null reference exeception if I do something like @foreach(var x in Model.Something). I can't figure out why it's doing this (I am converting an ASP.NET project to MVC, if that means anything).

glompix
Jan 19, 2004

propane grill-pilled
We just have about 300 lines of python that handles deploying our 5 projects. CruiseControl runs msbuild. If that works, the output just gets exported to a folder and another python script (executable from CC's web server) can be used to publish that. It's pretty simple and the only thing missing that I want to change for our upcoming rearchitect-ing is transforming web.config for test and release. Haven't had to touch it in 5 years except to update paths in a config class.

I never understood what the advantage was to using VS deployment, actually - especially the stuff from VS2005. My boss used that to deploy until I set up CI and we would always have to go to his office to ask him to publish. :eng99:

I desperately want to switch to Team City too. Configuring CC.NET blows and we are switching to git soon.

Dietrich
Sep 11, 2001

glompix posted:

We just have about 300 lines of python that handles deploying our 5 projects. CruiseControl runs msbuild. If that works, the output just gets exported to a folder and another python script (executable from CC's web server) can be used to publish that. It's pretty simple and the only thing missing that I want to change for our upcoming rearchitect-ing is transforming web.config for test and release. Haven't had to touch it in 5 years except to update paths in a config class.

I never understood what the advantage was to using VS deployment, actually - especially the stuff from VS2005. My boss used that to deploy until I set up CI and we would always have to go to his office to ask him to publish. :eng99:

I desperately want to switch to Team City too. Configuring CC.NET blows and we are switching to git soon.

TeamCity is awesome. Easy to install, easy to configure, easy to update, free for 20 build configs, and only 2k for unlimited.

I've got it hosting our internal NuGet packages, deploying our windows services, deploying our web/intranet apps, and sending out our winforms apps as well. Every night it runs a full code analysis on all the projects that have changed and tells us when our developers are not following standards. Every time it deploys something, it zips that thing up for us and stores all the versions for the last 30 days or the last 3 versions, whichever is greater. If we need to roll back, we can just manually grab that zip and put it in the deployed location, or we can just re-run the deploy process against a previous continuous build.

The only thing that I wish it handled better was understanding the web.config transform process and grabbing the transformed config for achieving- I've had to write the same shell script like 10 times to do that. With version 8.0 (just released) you're supposed to be able to template build steps into reusable paramaterized steps, so I might be trying that approach the next time I have reason to change our stuff.

roflsaurus
Jun 5, 2004

GAOooooooh!! RAOR!!!
Has anyone ever looked into the VSTA 2012 SDK? Looks like it's being resurrected by Microsoft - http://www.microsoft.com/en-au/download/details.aspx?id=38806

Only major downside I can see is it requires VS 2012 Professional to edit any VSTA scripts you create.

I'm thinking about integrating it into a Winforms or WPF app for adhoc data processing (basically a simplified of Access that uses .Net instead of VBA). My only concern is noone seems to be using it currently, and MS may drop support for it (as they did with VSTA 2.0)

edmund745
Jun 5, 2010
Using VB on Visual Studio 2012 Express: is there a way to remove bitmap resources that doesn't leave an error in the resx file?

I have buttons that I made bitmapts for. With some, the first bitmap didn't look so good, so what I do is this:
1) make another and name it a different filename,
2) import it in by setting the button's image property (using the VS resource manager to import it) and then I-
3) delete the first bitmap from the project explorer window.

The next time I try to debug or publish, there is always an error reference to the first (gone) bitmap in the resources.resx file.
I have just been removing the resx reference myself, because I can't figure out any other way to remove resources from the project. I keep thinking I must be doing it wrong though.

But then again....
This page on MSDN (about managing resources in VS2012) leads to nothing:
http://msdn.microsoft.com/en-us/library/9za7fxc7.aspx

This page (discussing VS 2010) mentions a Productivity Power Pack that seems to add capabilities to that version of VS that it didn't come with:
http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2286405-remove-unused-resources-automatically
Note that the link above is talking about finding unused resources, and that isn't really my problem. I only got seven bitmaps I'm using.
That topic just mentions some other MS software that VS2012Express doesn't seem to have...?

?

epswing
Nov 4, 2003

Soiled Meat
I have multiple projects and 2 solutions, a 'dev' solution and a 'setup' solution. Most of the projects exist in both solutions, but the InstallShield projects are not part of the 'dev' solution, and the Test projects are not part of the 'setup' solution. I didn't set this up, it's just How Things Are. I guess the motivation was to avoid loading certain projects into the VS workspace if they weren't needed.

When I remove a project common to both solutions, the next time I open the other solution I get

quote:

Unable to read the project file 'DeletedProj.csproj'.
The project file could not be loaded. Could not find a part of the path 'C:\path\to\DeletedProj.csproj'.

1. Are we "doing it wrong"?

2. How can I tell the other solution that the deleted project is gone and that's A-OK?

Pseudo-God
Mar 13, 2006

I just love oranges!

edmund745 posted:

Using VB on Visual Studio 2012 Express: is there a way to remove bitmap resources that doesn't leave an error in the resx file?

I have buttons that I made bitmapts for. With some, the first bitmap didn't look so good, so what I do is this:
1) make another and name it a different filename,
2) import it in by setting the button's image property (using the VS resource manager to import it) and then I-
3) delete the first bitmap from the project explorer window.

The next time I try to debug or publish, there is always an error reference to the first (gone) bitmap in the resources.resx file.
I have just been removing the resx reference myself, because I can't figure out any other way to remove resources from the project. I keep thinking I must be doing it wrong though.

But then again....
This page on MSDN (about managing resources in VS2012) leads to nothing:
http://msdn.microsoft.com/en-us/library/9za7fxc7.aspx

This page (discussing VS 2010) mentions a Productivity Power Pack that seems to add capabilities to that version of VS that it didn't come with:
http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2286405-remove-unused-resources-automatically
Note that the link above is talking about finding unused resources, and that isn't really my problem. I only got seven bitmaps I'm using.
That topic just mentions some other MS software that VS2012Express doesn't seem to have...?

?

It's much simpler than those links are making it out to be. On the Solution Explorer, expand Properties, and double click on Resources.resx. You will see all the resources there: right click and select remove to get rid of them safely across your project.

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

epalm posted:

I have multiple projects and 2 solutions, a 'dev' solution and a 'setup' solution. Most of the projects exist in both solutions, but the InstallShield projects are not part of the 'dev' solution, and the Test projects are not part of the 'setup' solution. I didn't set this up, it's just How Things Are. I guess the motivation was to avoid loading certain projects into the VS workspace if they weren't needed.

When I remove a project common to both solutions, the next time I open the other solution I get


1. Are we "doing it wrong"?

2. How can I tell the other solution that the deleted project is gone and that's A-OK?

If you have a reference to one project in two solutions, you have to remove the project from both solutions after you delete the project.

I'm not too familiar with InstallShield, but can't you just have two solution configurations, "Dev" and "Release", with release packaging just the necessary assemblies? That makes a lot more sense than having multiple solutions.

epswing
Nov 4, 2003

Soiled Meat
Oh I see, I should have removed the project from solution A, then removed the project from solution B, and then deleted the project folder.

I removed the project from solution A, deleted the project folder, and a week later opened solution B (and got the errors above).

I suppose I could resurrect the project folder so I can remove it from solution B from within VS, but I just killed some lines in the .sln file and everything seems good.

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

epalm posted:

Oh I see, I should have removed the project from solution A, then removed the project from solution B, and then deleted the project folder.

I removed the project from solution A, deleted the project folder, and a week later opened solution B (and got the errors above).

I suppose I could resurrect the project folder so I can remove it from solution B from within VS, but I just killed some lines in the .sln file and everything seems good.

It should just give you an error, open the solution, and have the missing project show up with the text "unavailable" or something like that. Then you can delete it. You don't need to "resurrect" the old project.

epswing
Nov 4, 2003

Soiled Meat

Ithaqua posted:

It should just give you an error, open the solution, and have the missing project show up with the text "unavailable" or something like that. Then you can delete it. You don't need to "resurrect" the old project.

This did not occur (though I expected it to). VS 2010 Pro.

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug
VS2013 preview is out:

http://www.microsoft.com/visualstudio/eng/2013-downloads

[edit]
VS2012 Update 3 is out too, actually. http://www.microsoft.com/en-us/download/details.aspx?id=39305

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



They're moving to a yearly release now? It took months for all the plugins I was used to from 2010 to come to 2012. If that continues to be the trend, I'll probably just have to go without them :\

ljw1004
Jan 18, 2005

rum

Ithaqua posted:

VS2013 preview is out: http://www.microsoft.com/visualstudio/eng/2013-downloads
VS2012 Update 3 is out too, actually. [url]http://www.microsoft.com/en-us/download/details.aspx?id=39305

Here are details from the .NET team about what's new in .NET 4.5.1.

http://blogs.msdn.com/b/dotnet/archive/2013/06/26/announcing-the-net-framework-4-5-1-preview.aspx


I'm most excited by the improvements to the callstack window when debugging async methods. (They require VS2013. Also the Tasks window now gives more information about all ongoing async Tasks, but this requires OS support from Windows 8.1).

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

ljw1004 posted:

I'm most excited by the improvements to the callstack window when debugging async methods.

Yeah, that looks awesome. I'm happy about x64 edit and continue.

I just finished installing VS2013 in a Windows 8.1 VM, so I'm going to play around now.

wwb
Aug 17, 2004

Dietrich posted:

TeamCity is awesome. Easy to install, easy to configure, easy to update, free for 20 build configs, and only 2k for unlimited.

This. It certainly paid for itself in the first week we used it. If you are using branches you can get alot of flexibility without going over those 20 configs really easily. 8.0 also gives some easier options for adding build configs without diving in for unlimited.

It also works with non-MS stuff which is nice if you live in the real world.

I'm at build if anyone is about. VS2013 was cool but I think the much more exciting news is the hardware they've got going -- win8 was a bit of an abortion because it didn't have stuff that could make it sing. The convertible tablets look pretty badassed.

Dirk Pitt
Sep 14, 2007

haha yes, this feels good

Toilet Rascal
I didn't realize there was so much love for Team City. I typically go with the mantra that Microsoft provides good tools to make average developers great. Then i bought resharper, and while i am mocked for using it by my team, i dont write much code and am refactoring fool now.

Team City looks interesting. Every time I get a wild hair up my rear end about having msbuild sign, rev the versions, and publish my click once apps to dev and test I go crazy the moment I get into the workflow foundation. Does team city make this easier? Also,I was reading about some tool Microsoft bought and is integrating into vs2013, will assist in getting versions into different environments easier. Is this accurate?

Orzo
Sep 3, 2004

IT! IT is confusing! Say your goddamn pronouns!

Dirk Pitt posted:

Then i bought resharper, and while i am mocked for using it by my team
Haha, what? Your team is full of idiots. ReSharper is widely regarded as a great piece of software that makes VS twice as good.

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

Dirk Pitt posted:

Also,I was reading about some tool Microsoft bought and is integrating into vs2013, will assist in getting versions into different environments easier. Is this accurate?

WF isn't that bad. Easiest way to do it: Take the Default template, find the "post-build" part, slap a powershell task in there and have it run a powershell script. Assuming you're using TFS, of course. If you're not, that's your problem. :)

InRelease? I know a lot about InRelease. It's not going to be in VS/TFS2013 as far as I know, though.

InRelease is a deployment tool, and it's pretty awesome, especially if you have a lot of different environments. One client I work with that bought InRelease bought it because they have Integration, QA, Staging, and Production environments for 10+ different localizations of their software. The localizations are worked on by different teams and have different release cycles, so it's really hard for them to keep track of what version of the software is at what stage in the release process.

They're doing a presentation on it on July 1st... http://www.incyclesoftware.com/?events=a-lap-around-inrelease-3

Adbot
ADBOT LOVES YOU

wwb
Aug 17, 2004

^^^^ this. It is basically the only plugin I use and I'm honestly not sure if I could use visual studio without it.

Insofar as your MSBuild woes go, TeamCity won't help you that directly -- you need to be able to effectively build it from the command line to get much mileage. But once you get there it pays off in spades.

  • Locked thread