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
Fuck them
Jan 21, 2011

and their bullshit
:yotj:

Ithaqua posted:

Well, part of the problem is that you're not doing MVVM. Not that MVVM is going to make it less verbose, but you're setting yourself up for pain down the line.

So it's conceptually far different. Good point.

Still, is there an easier way to do what I want to do? "characters in a box on a screen drawn by the OS which the program can treat as a string when events fire" seems like it should be a bit more polished.

Adbot
ADBOT LOVES YOU

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

gently caress them posted:

So it's conceptually far different. Good point.

Still, is there an easier way to do what I want to do? "characters in a box on a screen drawn by the OS which the program can treat as a string when events fire" seems like it should be a bit more polished.

No, it's conceptually exactly the same -- WPF and Knockout both encourage you to use the MVVM pattern. You're just not using it for your WPF application.

WPF is really powerful and expressive, but it's also very verbose. There's not much of a way around it.

raminasi
Jan 25, 2005

a last drink with no ice

gently caress them posted:

So it's conceptually far different. Good point.

Still, is there an easier way to do what I want to do? "characters in a box on a screen drawn by the OS which the program can treat as a string when events fire" seems like it should be a bit more polished.

Maybe I'm missing something, but it doesn't seem like you should need to be creating your own DependencyPropertys.

Fuck them
Jan 21, 2011

and their bullshit
:yotj:

GrumpyDoctor posted:

Maybe I'm missing something, but it doesn't seem like you should need to be creating your own DependencyPropertys.

"It didn't work until I did that." :q:

I need to just get a WPF book.

Mr. Crow
May 22, 2008

Snap City mayor for life

gently caress them posted:

"It didn't work until I did that." :q:

I need to just get a WPF book.

I just quickly glanced through this but this seems like a decent enough quick-start http://www.codeproject.com/Articles/165368/WPF-MVVM-Quick-Start-Tutorial

Comedy answers to why it's so verbose:
1) You're using the designer. Please stop.
2) You're using VB :v:

Fuck them
Jan 21, 2011

and their bullshit
:yotj:

Mr. Crow posted:

I just quickly glanced through this but this seems like a decent enough quick-start http://www.codeproject.com/Articles/165368/WPF-MVVM-Quick-Start-Tutorial

Comedy answers to why it's so verbose:
1) You're using the designer. Please stop.
2) You're using VB :v:

1) mockups schmockups; but yeah I do it by hand when it's time to get real
2) government job :frogsiren:

Edit: the actual bindings were done by hand. The layout poo poo was letting the designer do its thing, though.

Fuck them fucked around with this message at 21:46 on Jun 10, 2014

Mr. Crow
May 22, 2008

Snap City mayor for life
Anyone have any experience with AutoFixture? We've got an existing large project (doesn't everyone?) with quite a few very old and horribly written unit tests, especially on old classes that have like a dozen constructor parameters etc. so it's a pain to come across one of these tests and have to refactor everything and try to figure out the best approach to getting a good test harness set up.

AutoFixture seems like a great middle ground to getting things in a better state, thoughts?

gently caress them posted:

Edit: the actual bindings were done by hand. The layout poo poo was letting the designer do its thing, though.

Which is awful and irritating to everyone, please don't. The designer is there to get a feel for what you're UI will look like, it's a horrid failure as some sort of toolbox / imitation of photoshop.

At least that's my factual and very opinionated stance on it :v:

Begby
Apr 7, 2005

Light saber? Check. Black boots? Check. Codpiece? Check. He's more machine than kid now.

Mr. Crow posted:

Anyone have any experience with AutoFixture? We've got an existing large project (doesn't everyone?) with quite a few very old and horribly written unit tests, especially on old classes that have like a dozen constructor parameters etc. so it's a pain to come across one of these tests and have to refactor everything and try to figure out the best approach to getting a good test harness set up.

AutoFixture seems like a great middle ground to getting things in a better state, thoughts?


Which is awful and irritating to everyone, please don't. The designer is there to get a feel for what you're UI will look like, it's a horrid failure as some sort of toolbox / imitation of photoshop.

At least that's my factual and very opinionated stance on it :v:

I use autofixture quite a bit. I am not sure how it would help or not help given the situation you are in without more specifics.

What I use it for is creating test objects from my model. For instance if I have a list of orders, each order has several addresses, several items, several shipments, and each shipment has a bunch of shipped items, and I need to test parsing that into XML, its just a loving pain in the rear end to create and populate all those objects for test data. Autofixture handles all that for you.

You can also use it for generating test output data. Say you have IRepository and you mock it and need it to return some dummy records. You can use AutoFixture to generate a bunch of complex data for it to return in a few short lines of code, than have your stub method return it to whatever class you are testing.

bobua
Mar 23, 2003
I'd trade it all for just a little more.

ljw1004 posted:

(Sorry I don't know your answer but...)

Q1. Why did you go for Emgu rather than "OpenCVSharp"? I'm not sure which one to pick.

Q2. Has anyone managed to get either wrapper to work in Windows8.1 or WindowsPhone8.1 projects?

Google's returns on opencvsharp questions are so sparse that I didn't even know it existed until you mentioned it(although just from a quick look, it seems to be a lot more like working with opencv directly).

I don't develop on 8.1 but I run the compiled code\libraries on it without issue. I use most of the libraries including GPU with cuda 5.5.

Dust!!!
May 13, 2003

Woosh!

gently caress them posted:

I feel like I'm in bizarro world right now. "knockout is just like WPF so easy!" was the selling point, and I did me a knockout. Now I'm back to wpf (WOO!!!) or really "anything that's .NET and makes a windows app."

Is it just me or is it really, really loving wordy?

WPF is really wordy. But using MVVM and styles cuts down on the boilerplate.

Using MVVM, you will rarely need to create DependencyProperties and your basic binding will be {Binding PropertyName}. You'll still need them when making custom controls and such.

Styling and Templating covers those two things. Feel free to ignore anything starting with the DataTemplate section for now.

While you've got me talking about WPF, I should mention messaging. It's one way of addressing communication between a View (a Page, Window, etc.) and a ViewModel. WPF doesn't actually come with a messaging class, but MVVM Light and other toolkits do. Messaging is one option (maybe the best option) if you need to navigate between multiple pages in your app.

uXs
May 3, 2005

Mark it zero!
Anyone here happen to know when VS2014 will be released? We skipped VS2013 because I just didn't see the point.

However, I've now come across an issue: apparently Intellisense for MVC 5.1 razor views doesn't work in VS2012?

Incompatibility with new versions of MVC or EF or whatever would be a good reason to upgrade to a new Visual Studio. But if the next major version would be released in a couple of months, buying 2013 right now could be a bit stupid. Or maybe not, licensing is confusing.

gariig
Dec 31, 2004
Beaten into submission by my fiance
Pillbug
Visual Studio 14 CTP was just released 10 days ago. I'm going to guess release to MSDN in early December and official release in February. It could be longer because the next .NET update cycle has quite a few changes in it (Roslyn, ASP.Net vNext)

Do you have a MSDN account? If so you can get all the Visual Studio you want

diadem
Sep 20, 2003
eet bugz
I'm using Workflow Foundation under Visual Studio 2013 (latest service pack). My project compiled fine for a while, but started throwing the following error when I tried to build.

XC1020: Build error occurred in the XAML MSBuild task: 'Object '/f537cd6c_c118_4d1c_959d_a05ed0d0c69d/na6q2vzvjwxy+8ncvo zsuonu_65.rem' has been disconnected or does not exist at the server.

I tried to delete the folder and get latest from github, then rebooted - but the error still appears. I also moved the folder to a higher root level in the file system, just in case the length of the file path caused issues with MSBuild.

Is this a dll dependency error, or could it be something else? Just in case it's a resource issue, the VM in question has 30GB of ram and 6 cores.

edit: For the record, I am running as administrator (as not doing so is the common cause of XC1020 compile issues)

diadem fucked around with this message at 16:31 on Jun 13, 2014

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

gariig posted:

Do you have a MSDN account? If so you can get all the Visual Studio you want

Yeah, 2013 wasn't a massive release, but there was some good stuff in there, especially for Ultimate users. CodeLens is awesome.

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

uXs posted:

Anyone here happen to know when VS2014 will be released? We skipped VS2013 because I just didn't see the point.

However, I've now come across an issue: apparently Intellisense for MVC 5.1 razor views doesn't work in VS2012?

Incompatibility with new versions of MVC or EF or whatever would be a good reason to upgrade to a new Visual Studio. But if the next major version would be released in a couple of months, buying 2013 right now could be a bit stupid. Or maybe not, licensing is confusing.

Not for a while.

If you're on an msdn sub, keep renewing. If not, you can get vs pro fairly cheaply with VSO, and if you're big enough you probably want to have an msdn sub.

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

Ithaqua posted:

Yeah, 2013 wasn't a massive release, but there was some good stuff in there, especially for Ultimate users. CodeLens is awesome.

If this guy is waffling about purchasing an ide I doubt he's on the one that costs $14k/4k a year.

Sab669
Sep 24, 2009

This is more of a Visual Studio question than it is a .NET question, but is there a plugin for 2010 that'll make the code not scroll unless the mouse is within the boundaries of the text editor?

For example, same Chrome has focus and the mouse is over on my other monitor and I scroll, Chrome does not scroll.
On the other hand, if VS has focus and my mouse is on the other monitor, it will scroll the code.

I know this is more or less PEBKAC because I think one window has focus, but still :(

Faldoncow
Jun 29, 2007
Munchin' on some steak

Sab669 posted:

This is more of a Visual Studio question than it is a .NET question, but is there a plugin for 2010 that'll make the code not scroll unless the mouse is within the boundaries of the text editor?

For example, same Chrome has focus and the mouse is over on my other monitor and I scroll, Chrome does not scroll.
On the other hand, if VS has focus and my mouse is on the other monitor, it will scroll the code.

I know this is more or less PEBKAC because I think one window has focus, but still :(

I haven't tried them, but there's a few windows utilities in this thread: http://forums.somethingawful.com/showthread.php?threadid=3636485 that change how scrolling works with focus.

RICHUNCLEPENNYBAGS
Dec 21, 2010

Mr. Crow posted:

Anyone have any experience with AutoFixture? We've got an existing large project (doesn't everyone?) with quite a few very old and horribly written unit tests, especially on old classes that have like a dozen constructor parameters etc. so it's a pain to come across one of these tests and have to refactor everything and try to figure out the best approach to getting a good test harness set up.

AutoFixture seems like a great middle ground to getting things in a better state, thoughts?

Tremendously useful in eliminating some tedium from unit testing. No reason not to use it.

Stupor Mundi
Jan 10, 2008
Filil Hobenstaufenin osculamini asinum meum.
I have a more novice-oriented question to ask. I developed a C# Win Forms application that interacts with a SQL Database for class. I wanted to be able to deploy the application so I can add it to my portfolio. In order to make it more portable, I remade the database as a local DB inside Visual Studio 2013. I then used Install Shield to create a Setup project, and I added the .mdf and .log file to the Database directory that's one tier below all the app files. I then installed local DB on a test machine and installed my app. The problem is that, on the test machine, the application looks like it's connecting to the database, but a SqlException object is being thrown stating that my table objects don't exist. I addressed my tables in the code as follows: SCC.dbo.tableName -- where SCC is the name of the database. Here's the connection string: string connectionString = @"Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\Database\SCC.mdf;Integrated Security=True;Connect Timeout=30";

Any help would be much appreciated. I haven't been able to find anything via Google searches as of yet. The application works perfectly fine within Visual Studio, and even as an installed application on my development machine, which is strange.

Begby
Apr 7, 2005

Light saber? Check. Black boots? Check. Codpiece? Check. He's more machine than kid now.

Stupor Mundi posted:

I have a more novice-oriented question to ask. I developed a C# Win Forms application that interacts with a SQL Database for class. I wanted to be able to deploy the application so I can add it to my portfolio. In order to make it more portable, I remade the database as a local DB inside Visual Studio 2013. I then used Install Shield to create a Setup project, and I added the .mdf and .log file to the Database directory that's one tier below all the app files. I then installed local DB on a test machine and installed my app. The problem is that, on the test machine, the application looks like it's connecting to the database, but a SqlException object is being thrown stating that my table objects don't exist. I addressed my tables in the code as follows: SCC.dbo.tableName -- where SCC is the name of the database. Here's the connection string: string connectionString = @"Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\Database\SCC.mdf;Integrated Security=True;Connect Timeout=30";

Any help would be much appreciated. I haven't been able to find anything via Google searches as of yet. The application works perfectly fine within Visual Studio, and even as an installed application on my development machine, which is strange.

The first place to start would be to connect to the DB in question outside of your app with some sort of DB management program, and see if indeed the tables are there. I am guessing that you are somehow deploying an empty database.

Bognar
Aug 4, 2011

I am the queen of France
Hot Rope Guy
If I'm deploying a desktop application with a local database, I like to include all the necessary scripts/migrations to set up a database rather than including an already created one with the deployment (if there's not a significant amount of seed data, anyway).

aBagorn
Aug 26, 2004

Bognar posted:

If I'm deploying a desktop application with a local database, I like to include all the necessary scripts/migrations to set up a database rather than including an already created one with the deployment (if there's not a significant amount of seed data, anyway).

This is my approach as well. I'll throw something like this in my Program.cs (crappy example)

C# code:
ApplicationDeployment deployment = ApplicationDeployment.CurrentDeployment;

if (deployment != null && deployment.IsFirstRun)
Common.ExecuteSQL("startupscripts.txt");
Where ExecuteSQL is a method that will open a SQL connection and execute each line of the text file.

Sab669
Sep 24, 2009

So my coworker accidentally deleted a Designer file. No big deal, right? Just do an Update from SVN and have it restored. Nope. Re-open the solution in VS and despite both classes having the same namespace and everything, the 'normal' code behind has the keyword partial grayed out and says "Partial class with single part", and it can't find the implementation for InitializeComponent() since that's in the Designer file.

I tried deleting the whole folder and doing an update from SVN, instead of trying to restore just the Designer.cs file but it's still giving me the same problem. Any ideas? :saddowns:

e; For what it's worth, in the Solution Explorer the Designer file is showing up with a white, blank document icon next to it instead of the usual icon.

Sab669 fucked around with this message at 20:45 on Jun 16, 2014

epswing
Nov 4, 2003

Soiled Meat
Which Visual Studio?

Sab669
Sep 24, 2009

Oh, 2010, sorry.

Edit again; Well, ended up just copy-pasting the .cs, Designer.cs and .resx files into another directory, deleting the original files from the project in VS, then moved the "backups" back into the folder, and used Add Existing to get them back into the project and it seems OK... But I'd still like to know if there's another way to fix that issue, if anyone knows :psyduck:

Sab669 fucked around with this message at 21:07 on Jun 16, 2014

fankey
Aug 31, 2001

We have devices which use multicast UDP to announce their existence and they send these packets out somewhere between every 1 to 1.5 seconds. If I don't receive a packet 'every so often' I need to remove it from the discovery list. Every once in a while a packet is received much later ( + a second or 2 ) than it should be. If I compare the reception of my program to a wireshark capture the majority of packet deltas agree except for the outliers - these show up on time in wireshark. Since wireshark doesn't have this issue I know my pc is receiving the packets on time but for some reason my app isn't being notified in a timely manner. Here's a simple example that shows the issue - in this case I have about 20 devices on the network but I'm only printing out the deltas for a particular unit to help with debugging. Is there anything I'm doing which might be causing these issues?

EDIT fixed by increasing the ReceiveBufferSize from the paltry 8k default.
code:
using System;
using System.Net;
using System.Net.Sockets;

namespace UdpTest
{
  class Program
  {
    static DateTime lastTime = DateTime.Now;
    static TimeSpan maxSpan = TimeSpan.FromSeconds(0);

    static void UpdAsyncCallback(IAsyncResult iar)
    {
      UdpClient client = iar.AsyncState as UdpClient;
      try
      {
        IPEndPoint e = new IPEndPoint(IPAddress.Any, 0);
        var data = client.EndReceive(iar, ref e);

        if (e.Address.Equals(IPAddress.Parse("10.104.128.105")))
        {
          DateTime now = DateTime.Now;
          TimeSpan span = now.Subtract(lastTime);
          Console.WriteLine("{0} delta {1} length {2}", e.Address, span, data.Length);
          if (span > maxSpan)
          {
            Console.WriteLine("  new span {0}", span);
            maxSpan = span;
          }
          lastTime = now;
        }
      }
      catch (Exception ex)
      {
        Console.WriteLine("UpdAsyncCallback error {0}", ex.Message);
      }
      client.BeginReceive(UpdAsyncCallback, client);
    }


    static void Main(string[] args)
    {
      try
      {
        var udpClient = new UdpClient();
        udpClient.Client.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true);
        udpClient.Client.Bind(new IPEndPoint(IPAddress.Any, 2467));
        udpClient.JoinMulticastGroup(IPAddress.Parse("224.0.23.175"));
        udpClient.BeginReceive(UpdAsyncCallback, udpClient);
        while (true) System.Threading.Thread.Sleep(1000);
      }
      catch (Exception ex)
      {
        Console.WriteLine(ex.Message);
      }
    }
  }
}

fankey fucked around with this message at 23:55 on Jun 16, 2014

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

fankey posted:

We have devices which use multicast UDP to announce their existence and they send these packets out somewhere between every 1 to 1.5 seconds. If I don't receive a packet 'every so often' I need to remove it from the discovery list. Every once in a while a packet is received much later ( + a second or 2 ) than it should be. If I compare the reception of my program to a wireshark capture the majority of packet deltas agree except for the outliers - these show up on time in wireshark. Since wireshark doesn't have this issue I know my pc is receiving the packets on time but for some reason my app isn't being notified in a timely manner. Here's a simple example that shows the issue - in this case I have about 20 devices on the network but I'm only printing out the deltas for a particular unit to help with debugging. Is there anything I'm doing which might be causing these issues?
code:

using System;
using System.Net;
using System.Net.Sockets;

namespace UdpTest
{
  class Program
  {
    static DateTime lastTime = DateTime.Now;
    static TimeSpan maxSpan = TimeSpan.FromSeconds(0);

    static void UpdAsyncCallback(IAsyncResult iar)
    {
      UdpClient client = iar.AsyncState as UdpClient;
      try
      {
        IPEndPoint e = new IPEndPoint(IPAddress.Any, 0);
        var data = client.EndReceive(iar, ref e);

        if (e.Address.Equals(IPAddress.Parse("10.104.128.105")))
        {
          DateTime now = DateTime.Now;
          TimeSpan span = now.Subtract(lastTime);
          Console.WriteLine("{0} delta {1} length {2}", e.Address, span, data.Length);
          if (span > maxSpan)
          {
            Console.WriteLine("  new span {0}", span);
            maxSpan = span;
          }
          lastTime = now;
        }
      }
      catch (Exception ex)
      {
        Console.WriteLine("UpdAsyncCallback error {0}", ex.Message);
      }
      client.BeginReceive(UpdAsyncCallback, client);
    }


    static void Main(string[] args)
    {
      try
      {
        var udpClient = new UdpClient();
        udpClient.Client.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true);
        udpClient.Client.Bind(new IPEndPoint(IPAddress.Any, 2467));
        udpClient.JoinMulticastGroup(IPAddress.Parse("224.0.23.175"));
        udpClient.BeginReceive(UpdAsyncCallback, udpClient);
        while (true) System.Threading.Thread.Sleep(1000);
      }
      catch (Exception ex)
      {
        Console.WriteLine(ex.Message);
      }
    }
  }
}

Gc pauses maybe? .net and windows aren't realtime so it could be a lot of things

Knyteguy
Jul 6, 2005

YES to love
NO to shirts


Toilet Rascal

RICHUNCLEPENNYBAGS posted:

Tremendously useful in eliminating some tedium from unit testing. No reason not to use it.

This thread is over 7 years old and the OP sucks. It would be really cool for someone to create a new OP with stuff like this in it (AutoFixture). Helpful common libraries and VS addons, newbie resources, books, etc.

Mr. Crow
May 22, 2008

Snap City mayor for life

Knyteguy posted:

This thread is over 7 years old and the OP sucks. It would be really cool for someone to create a new OP with stuff like this in it (AutoFixture). Helpful common libraries and VS addons, newbie resources, books, etc.

I'll second this request.

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug
If Fastbreak doesn't want to do an overhaul of the OP, I'll volunteer. Here's a comprehensive list of my qualifications:

Drastic Actions
Apr 7, 2009

FUCK YOU!
GET PUMPED!
Nap Ghost

Ithaqua posted:

If Fastbreak doesn't want to do an overhaul of the OP, I'll volunteer. Here's a comprehensive list of my qualifications:

*Wrote Unit tests for AwfulMetro which Drastic Actions promptly broke, fixed, then broke again.

Good enough for me.

c355n4
Jan 3, 2007

Any suggestions on a good book to learn MVC? Coming from a background in webforms.

Knyteguy
Jul 6, 2005

YES to love
NO to shirts


Toilet Rascal

c355n4 posted:

Any suggestions on a good book to learn MVC? Coming from a background in webforms.

Assuming you mean ASP.NET MVC, maybe http://www.amazon.com/Pro-ASP-NET-Experts-Voice-ASP-Net/dp/1430265299/ref=sr_1_1?s=books&ie=UTF8&qid=1403031126&sr=1-1 ? I've used version 4 of this book as a reference and it's pretty solid. If you're not familiar with the MVC pattern it explains it, and at least in version 4 a good portion of the beginning of the book is building a multifaceted web project using MVC. YMMV of course.

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug
Okay, new OP draft. What books/tools/plugins/resources/etc do you guys want to have in it?
-----------------------------------

After 7 and a half years and over 400 pages, it's time for a new .NET megathread!

What is .NET?

Wikipedia posted:

[The] .NET Framework ... is a software framework developed by Microsoft that runs primarily on Microsoft Windows. It includes a large class library known as Framework Class Library (FCL) and provides language interoperability (each language can use code written in other languages) across several programming languages. Programs written for .NET Framework execute in a software environment (as contrasted to hardware environment), known as Common Language Runtime (CLR), an application virtual machine that provides services such as security, memory management, and exception handling. FCL and CLR together constitute .NET Framework.

What languages can I use write to fancy-pants .NET applications?
  • C#
  • Visual Basic .NET
  • F#
  • PowerShell
  • IronRuby
  • IronPython

What's awesome about .NET languages?
First off, Microsoft is constantly improving the framework and languages -- there's usually a new .NET release every 1-2 years, which brings new versions of C#, VB, F#, etc. Since our last megathread in January 2007, dozens of new features have come along, several of which changed the way we write code on a day-to-day basis. The big ones are:
  • LINQ (.NET 3.5)
  • Lambda expressions
  • Task Parallel Library (TPL) (.NET 4.0)
  • Task Asynchronous Pattern (TAP) aka "async/await" (.NET 4.5)

Plus, Microsoft has created some of the best tooling around. Visual Studio is the IDE that every other IDE wishes it could be, and the .NET framework is huge and has built-in classes and methods to do just about everything.

I want to develop using Visual Studio, but I'm not paying for it!
That's fine, Microsoft has Visual Studio Express for you.

Should I be using source control?
Yes!
  • Team Foundation Server Express is free for up to 5 developers.
  • Visual Studio Online is cloud-hosted TFS.
  • Or you can use Github or SVN or something else, just use source control for the love of God. VS2013 has native tools built in for Git, and VSO/TFS2013 both support Git source control.

I want to make a website. What should I do?
ASP .NET MVC. Don't use ASP .NET WebForms. WebForms was an interesting attempt by Microsoft to make developing web applications closer to developing desktop applications. It didn't really accomplish that, and at this point it really just gets in the way of writing modern, dynamic sites.

I want to make a desktop application. What should I do?
WPF. Make sure you follow the Model-View-ViewModel (MVVM) pattern. Don't use WinForms. The WinForms architecture practically forces you to mix your presentation logic with your business logic, which is never a good thing.

I want to make a "Modern UI"/Metro/Windows Store application!
See above, but also look at Microsoft's Windows Store site.

I want to do some sort of stuff involving a database!
Manually writing queries is for suckers! Use an ORM, but not LINQ to SQL. LINQ to SQL is dying.
Microsoft's replacement is Entity Framework. Personally, I prefer NHibernate, but both are better than LINQ to SQL.

Should I be writing unit tests?
Yes.

Books/Sites
General
  • MSDN
  • C# In Depth (Skeet)

Unit Testing
  • The Art of Unit Testing (Osherove)

Frameworks/Tools

Visual Studio Plugins
  • ReSharper - General code inspection/analysis/refactoring. Highly recommended, but not free!

Drastic Actions
Apr 7, 2009

FUCK YOU!
GET PUMPED!
Nap Ghost

Ithaqua posted:

I want to make a desktop application. What should I do?
WPF. Make sure you follow the Model-View-ViewModel (MVVM) pattern. Don't use WinForms. The WinForms architecture practically forces you to mix your presentation logic with your business logic, which is never a good thing.

I want to make a "Modern UI"/Metro/Windows Store application!
See above, but also look at Microsoft's Windows Store site.

I really want to break out Modern UI and/or WPF apps into its own thread (like how it's done with iOS and Android). Would that be a good idea, or should this thread handle everything?

EDIT: Oh yeah, what about Mono/Xamarin? That might be good for the OP.

EDIT 2: Nevermind, the iOS stuff is in the Apple Development thread. So Modern UI should should be fine in there. I am dumb :downs:

Drastic Actions fucked around with this message at 21:35 on Jun 17, 2014

mortarr
Apr 28, 2005

frozen meat at high speed

Ithaqua posted:

Okay, new OP draft. What books/tools/plugins/resources/etc do you guys want to have in it?

Looks good. Here's some more stuff - is it worth putting nuget packages under frameworks/tools?

Books:
Dependency Injection in .NET (Martin Seeman).

Database stuff:
downloadsqlserverexpress.com. Links to SQL Express install packages, without needing to trawl through MSDN.

VS Plugins:
Nuget. Package management for .Net. Using nuget you can pull 3rd party libraries into your projects using its package manager console without leaving VS.

Frameworks/Tools:
  • Autofac, an IoC container for .Net. Getting started guide.
  • Automapper. AutoMapper is a neat little tool to help mapping one object to another.
  • Elmah (Error Logging Modules and Handlers), an application-wide error logging facility for ASP.Net. Here's a list of guides and articles.
  • FluentValidation, a validation library that uses a fluent interface and lambda expressions for building validation rules for your business objects.

Dust!!!
May 13, 2003

Woosh!

Ithaqua posted:

What languages can I use write to fancy-pants .NET applications?
  • C#
  • Visual Basic .NET
  • F#
  • PowerShell
  • IronRuby
  • IronPython

Sadly, IronRuby has been dead for a while. It's still usable, but it's no longer supported by anyone.

If you want to toss some other languages on the list, there's Boo and Cobra.

ShaunO
Jan 29, 2006

Ithaqua posted:

I want to do some sort of stuff involving a database!
Manually writing queries is for suckers! Use an ORM, but not LINQ to SQL. LINQ to SQL is dying.
Microsoft's replacement is Entity Framework. Personally, I prefer NHibernate, but both are better than LINQ to SQL.

If you absolutely have to write ad-hoc queries, your queries don't map well to a full-blown ORM, your application is so small can't justify using a full-blown ORM, or you want to query some other IDbConnection provider. Friends don't let friends use DataTables or reinvent the wheel, use dapper.

It may also be worth giving a mention to object serialization/deserialization libraries, most notably Json.NET

I'd perhaps mention NuGet as the go to for including popular libraries in your apps, as I think it can be easily overlooked by people new to VS.

For source control, I always like to recommend TortoiseHg as an easy way to get started with with a DVCS with a friendly GUI without a nightmare-inducing learning curve. (+Bitbucket for free private repos)

For unit testing NUnit is maybe worth mentioning as a test-runner and fixture creation library

Channel9 http://channel9.msdn.com/ may also be worth mentioning, though maybe better to point to specific tags, but it has a huge amount of useful videos for all levels of programmer

All of the above personal preferences but stuff I would've loved to know when getting started

Adbot
ADBOT LOVES YOU

Destroyenator
Dec 27, 2004

Don't ask me lady, I live in beer
Yeah mono deserves a mention. Personally I'd throw ncrunch in there under tools too.

  • Locked thread