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.
 
  • Post
  • Reply
Ciaphas
Nov 20, 2005

> BEWARE, COWARD :ovr:


Bognar posted:

I bet that's actually a binding issue. Updating IsBusy (probably) raises a PropertyChanged event with the argument "IsBusy", however the button in your UI is bound to "CPUBoundCommand" and is determining its Enabled status from that. So, even though your RelayCommand's CanExecute is dependent on the IsBusy property, the UI doesn't know that so it's not going to re-run the function to know if it can execute. The UI is only going to update controls that are bound to IsBusy.

There are a few solutions to this. One, you could just use ReevaluateCanExecute. Two, in the setter for IsBusy you could call OnPropertyChanged("CPUBoundCommand"). Three, and this is my preferred option, bind the button's IsEnabled property to IsBusy (and give the binding an InverseBoolConverter).

I never liked using CanExecute on ICommand for exactly this reason. I prefer to explicitly bind IsEnabled on my buttons to avoid this problem entirely.

I like your third solution (why didn't I just do that? I already did that for some checkboxes. Jesus. :doh:) but I'm going to ask something anyway: you say that "even though your RelayCommand's CanExecute is dependent on the IsBusy property, the UI doesn't know that so it's not going to re-run the function to know if it can execute." If that's the case, why does the button disable when I set IsBusy to true before the awaited task?

(ed) I could also use my INPCDependsAttribute that I posted about earlier in the thread as an attribute on CPUBoundCommand, which effectively automates your option 2:
C# code:
[INPCDepends("IsBusy")] // auto calls NotifyPropertyChanged("CPUBoundCommand") after any NotifyPropertyChanged("IsBusy")
public RelayCommand CPUBoundCommand { /* ... */}
I still prefer option 3 though.

Ciaphas fucked around with this message at 22:39 on Oct 27, 2015

Adbot
ADBOT LOVES YOU

Bognar
Aug 4, 2011

I am the queen of France
Hot Rope Guy
WPF calls CanExecute after calling Execute. This worked well when things in .NET were synchronous, but you still had to deal with things manually if you were scheduling work onto a background thread (sound familiar?).

What happens now is your async void method "completes" synchronously before the full execution of the async method. So, WPF executes your CPUBoundCommand which gets to the await then returns. Then WPF calls CanExecute, sees that it returns false and disables your button. Finally, your asynchronous command finishes executing and we run into the problem we already discussed.

Ciaphas
Nov 20, 2005

> BEWARE, COWARD :ovr:


That didn't even occur to me, that the command would be considered "completed" for the purposes of WPF when it hits the await. That pretty much explains the whole thing.

Thanks for being patient with me :shobon:

brap
Aug 23, 2004

Grimey Drawer

Ciaphas posted:

Yet another reason I wish my work machine wasn't an internet-free security-lockdown hellhole. NuGet packages and other frameworks are a non-starter for me, which probably isn't helping matters as far as learning (at least at work) :sigh:

(ed) I do appreciate the advice that tight one-way coupling of the view to its viewmodel is okay, though. I was beginning to lean in that direction anyway--not having any code-behind even for very view-specific stuff struck me as weird from the word go--but it's nice to have it affirmed.

What industry are you working in, if I may ask?

RICHUNCLEPENNYBAGS
Dec 21, 2010

crashdome posted:

edit: nm

I love Abstract Factories myself (don't really need big DI frameworks for what I do) and I'm not championing the SL over alternatives but holy poo poo, that article and the authors comments are the most pretentious BS I've read on the subject. And his samples for "proving" his argument are lol.

He's a little full of himself but he literally wrote the book on dependency injection in C# and I think he's right that isn't better not to bake in the dependency on the service locator throughout your application in many cases, for all the same reasons I don't really like singletons very much.

Inverness
Feb 4, 2009

Fully configurable personal assistant.
I've always had an interest in what PostSharp could offer for programming. My problem with using it is licensing. Sure we could acquire a license for some larger project at work, but for minor use or my own use, I don't want to have to do that.

Yeah, they offer a free version, but it's too limited in my opinion. The free version does not support async or iterator methods, use-based optimization, or any platforms but the desktop framework. Sure you can apply for a free open source license, but that's not without limit and you need to submit an application in the first place.

Instead, I just made a fork of Roslyn, and for the last few days I've had a fun time clunking away at adding an aspect rewriter into the method compilation stage. It's by no means finished.

Here's an example of an exception handling aspect:
code:
    [Features(Features.OnException | Features.FlowControl)]
    internal sealed class CatchAndLogExceptions : MethodBoundaryAspect
    {
        private readonly Type _returnType;
        private readonly object _returnValue;
        private readonly bool _hasReturnValue;

        public CatchAndLogExceptions()
            : this(null)
        {
        }

        public CatchAndLogExceptions(Type returnType)
        {
            _returnType = returnType ?? typeof (void);
        }

        public CatchAndLogExceptions(Type returnType, object returnValue)
        {
            _returnType = returnType ?? typeof (void);
            _returnValue = returnValue;
            _hasReturnValue = true;
        }

        public override void OnException(MethodExecutionArgs args, Exception ex)
        {
            Console.WriteLine(ex.GetType().Name + ": " + ex.Message);
            Console.WriteLine(ex.StackTrace);

            if (_returnType != typeof (void))
            {
                if (_hasReturnValue)
                    args.ReturnValue = _returnValue;
                else if (_returnType.IsValueType)
                    args.ReturnValue = Activator.CreateInstance(_returnType);
                else
                    args.ReturnValue = null;
            }

            args.FlowBehavior = FlowBehavior.Return;
        }
    }
The source code:
code:

    class Program
    {
        static void Main(string[] args)
        {
            var result = TestExceptions(11);
            Console.WriteLine("Result: " + result);
        }

        [CatchAndLogExceptions(typeof(int), 33)]
        private static int TestExceptions(int a)
        {
            return ThrowAnException() + a;
        }

        private static int ThrowAnException()
        {
            throw new NotImplementedException("!!!");
        }
    }
The code that is compiled:
code:
    [CatchAndLogExceptions(typeof (int), 33)]
    private static int TestExceptions(int a)
    {
      if (Program.<TestExceptions>z__a1 == null)
        Program.<TestExceptions>z__a1 = new CatchAndLogExceptions(typeof (int), (object) 33);
      MethodExecutionArgs args = new MethodExecutionArgs((object) null, (Arguments) null);
      int num;
      try
      {
        num = Program.ThrowAnException() + a;
      }
      catch (Exception ex) when (Program.<TestExceptions>z__a1.FilterException(args, ex))
      {
        Program.<TestExceptions>z__a1.OnException(args, ex);
        switch (args.FlowBehavior)
        {
          case FlowBehavior.Return:
            num = (int) args.ReturnValue;
            break;
          case FlowBehavior.Continue:
            break;
          default:
            throw;
        }
      }
      return num;
    }
Having the compiler written in C# has been super-convenient. You can easily slap your own into a compilation process by setting CscToolPath and CscToolExe in your project file.

Relevant Roslyn code is here for anyone interested. And here is the base library for it and the console app I use to test it.

Inverness fucked around with this message at 17:50 on Oct 28, 2015

xgalaxy
Jan 27, 2004
i write code
Thats cool! I've been working on a separate Roslyn related project. I'll bookmark your repo for looking at later.

wilderthanmild
Jun 21, 2010

Posting shit




Grimey Drawer
I have a quick question regarding Solution file organization.

Currently in what I would consider to be the main portion of our system there are 3 major end points. One desktop application, one customer website, and one website for outside contractors. Currently all three are in their own solution files, but share essentially the same back-end projects. Frequently we make a change in one solution, and then have to open up the other two solutions to make matching changes to the other solutions. This sometimes makes trivial changes feel much larger than they really are. Is it possible to combine these all into one solution and still be able to publish all three separately? Assuming it is, does it make sense to do so?

I'm not sure if that's enough information, so if you need more, ask away.

Inverness
Feb 4, 2009

Fully configurable personal assistant.

wilderthanmild posted:

I have a quick question regarding Solution file organization.

Currently in what I would consider to be the main portion of our system there are 3 major end points. One desktop application, one customer website, and one website for outside contractors. Currently all three are in their own solution files, but share essentially the same back-end projects. Frequently we make a change in one solution, and then have to open up the other two solutions to make matching changes to the other solutions. This sometimes makes trivial changes feel much larger than they really are. Is it possible to combine these all into one solution and still be able to publish all three separately? Assuming it is, does it make sense to do so?

I'm not sure if that's enough information, so if you need more, ask away.
What exactly is your publishing procedure?

What you describe is normally something that would be contained in a single solution with several projects for common and platform/frontend specific code.

wilderthanmild
Jun 21, 2010

Posting shit




Grimey Drawer

Inverness posted:

What exactly is your publishing procedure?

What you describe is normally something that would be contained in a single solution with several projects for common and platform/frontend specific code.

Our publishing procedure is pretty basic I'd say.

Currently, the desktop application is published as a click once application. Both of the websites are published using the publish tool in visual studio and published via file system. Most major releases involve publishing all three at the same time, typically done in the very early morning or evening before. There are a lot of minor releases which tend to be desktop application only. The majority of the time testing is done simply by running with the debugger attached, but for the web sites they both have a second publish profile for bigger testing involving more than just the developers. In the case of the desktop app, we have to manually deploy for testing.

Bognar
Aug 4, 2011

I am the queen of France
Hot Rope Guy
ClickOnce deployment and website publishing through VS are project specific and don't depend on the solution. You should be able to add all your projects to a single solution file and still deploy separately. In order to debug a specific project in a solution, you'll want to make use of the "Set as StartUp Project" option in the context menu shown by right clicking on a project. This makes it so when you start debugging (by clicking, pressing F5, whatever) then the project that is started is whatever your current StartUp Project is.

It's not uncommon to have many executable projects in a solution. In just the solution I currently have open, 7 of the projects are executable.

Bognar fucked around with this message at 18:32 on Oct 28, 2015

wilderthanmild
Jun 21, 2010

Posting shit




Grimey Drawer
Thanks for the help everyone. It seems the single solution for most of the project is the right approach. This will save a lot unnecessary opening and closing and shuffling of windows.

ljw1004
Jan 18, 2005

rum

Ciaphas posted:

So I figured the IsBusy = false must be on a non-UI thread.

That's not right. WPF will happily do INotifyPropertyChanged + databinding from a non-UI thread. As of .NET45, it also does it for INotifyCollectionChanged.

EssOEss
Oct 23, 2006
128-bit approved
Speaking of the UI thread, is there some easy way to kick some code to the UI thread in UWP if you do not have access to some UI object like a Page or whatnot? Say, I am in some totally random WhateverClass.DoWhatever() with no dispatcher or UI synchronization context in sight. So far, the pattern I use is to capture the UI thread synchronization context and use it for Task scheduling later but since the UI thread is sort of a singleton, I wonder if I am missing some easier option.

Inverness
Feb 4, 2009

Fully configurable personal assistant.

EssOEss posted:

Speaking of the UI thread, is there some easy way to kick some code to the UI thread in UWP if you do not have access to some UI object like a Page or whatnot? Say, I am in some totally random WhateverClass.DoWhatever() with no dispatcher or UI synchronization context in sight. So far, the pattern I use is to capture the UI thread synchronization context and use it for Task scheduling later but since the UI thread is sort of a singleton, I wonder if I am missing some easier option.
I don't know about UWP myself, but with WPF you can use Application.Current.Dispatcher.

I imagine UWP would have something similar.

ljw1004
Jan 18, 2005

rum

EssOEss posted:

Speaking of the UI thread, is there some easy way to kick some code to the UI thread

This feels like a bit of a smell to me...

Basically, you can write your entire app on the UI thread. The only thing to hive off is small CPU-bound computation kernels. There's no measurable performance downside to doing most of your code on the UI thread. It will also make everything easier.

When you do work on a different thread, the cleanest way to avoid shared-memory race conditions is (1) your data structures are mostly immutable and certainly aren't mutated by the thread, (2) the thread delivers its output in the Task<T> return type, for the caller to do with as it sees fit. I wouldn't make that thread modify the UI.

If the different-thread work is long running and you want some progress to be send back, then do it via the IProgress<T> interface and the Progress<T> class, which automatically marshals back as needed.

Inverness
Feb 4, 2009

Fully configurable personal assistant.
I have a question about UWP. Other than the whole run-on-all-platforms thing, how does its API relate to the Windows 8 "Store" application API?

Does it use an entirely different set of classes? Is there some overlap? Where does WinRT fit into all of this?

Also, if you have a UWP app, how do you get it to do things outside of its box? I imagine the built-in UWP apps with Windows 10 have to do such things otherwise they couldn't change system settings for you and stuff like that. How does that work?

ljw1004
Jan 18, 2005

rum

Inverness posted:

I have a question about UWP. Other than the whole run-on-all-platforms thing, how does its API relate to the Windows 8 "Store" application API? Does it use an entirely different set of classes? Is there some overlap? Where does WinRT fit into all of this?

Win8 and UWP both denote a set of Win32 APIs, a set of COM APIs and a set of WinRT APIs.

UWP itself is a superset of the PCL intersection of both Win8.1 and WinPhone8.1. (Hence, any .NET "universal PCL" that you wrote can be referenced fine by a UWP app and will run fine on all Win10 devices including Mobile and Xbox and Desktop).

The "Win10 Desktop" operating system supports all UWP APIs, plus so-called "Desktop Extension SDK" APIs. In answer to your question, UWP+DesktopExtensionSDK is a superset of Win8.1 store-app APIs. (Hence, any .NET win8.1 DLL that you wrote can be referenced fine by a UWP app and will run fine on Win10 Desktop devices).


Note that a regular desktop app (console, WPF, Winforms, ...) is allowed to call lots of WinRT APIs. I wrote a NuGet package to add a reference to all UWP and DesktopExtensionSDK APIs:
https://www.nuget.org/packages/UwpDesktop



How does a UWP app get to do things outside its box? Change system settings? They're not allowed to do lots of things (e.g. you can't write something that just scans the entire filesystem unless the user specifically clicks a button in the File Selector dialog to chose that). It can't write to the registry. I don't know how the Settings app does all its stuff.

Inverness
Feb 4, 2009

Fully configurable personal assistant.
Thanks for that. I've got a much clearer picture of things now.

ljw1004 posted:

How does a UWP app get to do things outside its box? Change system settings? They're not allowed to do lots of things (e.g. you can't write something that just scans the entire filesystem unless the user specifically clicks a button in the File Selector dialog to chose that). It can't write to the registry. I don't know how the Settings app does all its stuff.
I always assumed it used IPC to communicate with a non-UWP process that could.

Boogeyman
Sep 29, 2004

Boo, motherfucker.
I'm wondering if you guys can help steer me in the right direction. I started at my company as a developer doing classic ASP stuff back in 2001. Moved to the .NET framework, worked with that up through version 3.5 or so (mostly developing web services for our other devs to pull data into their own apps). At that point, my role changed into more of a DBA, and I haven't really been keeping up with all of the new developments with .NET.

We use SQL Server here, and I'm responsible for keeping an eye on a lot of databases. Back in March, I ended up writing a .NET Windows service that rolls through each SQL cluster and each database every night, collects some metrics on row counts, table sizes, application specific metrics, etc, then dumps them into a database for analysis. It works for me since I can pop in whenever and run queries to find the data I want. What doesn't work is the fact that every time I need to send this data on to other teams, I have to dick around with it, dump it into Excel, generate graphs manually, all that BS. Getting tired of doing that. Also, as the DBA, I have to deal with the devs using Entity Framework for everything, and I end up seeing a lot of issues on the SQL side with the way they're using it. Automagically generated queries that totally suck, lazy loading issues, locking/blocking issues, etc. Back in my day, I had to code all my objects by hand, write my own stored procs, write up all the logic to turn those stored proc results into objects (jeebus help whoever has to look at my service code from March). I have no experience with EF other than what I've seen it do to my SQL clusters.

What I'm looking for is a good reference or tutorial on how to develop a website in ASP.NET using EF and the latest advances in the framework, and being able to pull data from my existing analysis database to display it to the users. Preferably with some pretty charts and whatnot to make it easier to comprehend. Not only will this save me time, but I'm hoping that in the process, I can get a better understanding about the proper way to use EF and making it play nicely with SQL. At that point, I can go to the devs and give them some pointers on how they can improve their code and get things running better. I'm not a total newbie, but I've been having issues wrapping my head around MVC and that type of stuff (probably because I'm old and it's hard for me to learn anything at this point while still trying to do the rest of my job).

So, any recommendations on where to start? Any help would be greatly appreciated.

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

Boogeyman posted:

I'm wondering if you guys can help steer me in the right direction. I started at my company as a developer doing classic ASP stuff back in 2001. Moved to the .NET framework, worked with that up through version 3.5 or so (mostly developing web services for our other devs to pull data into their own apps). At that point, my role changed into more of a DBA, and I haven't really been keeping up with all of the new developments with .NET.

We use SQL Server here, and I'm responsible for keeping an eye on a lot of databases. Back in March, I ended up writing a .NET Windows service that rolls through each SQL cluster and each database every night, collects some metrics on row counts, table sizes, application specific metrics, etc, then dumps them into a database for analysis. It works for me since I can pop in whenever and run queries to find the data I want. What doesn't work is the fact that every time I need to send this data on to other teams, I have to dick around with it, dump it into Excel, generate graphs manually, all that BS. Getting tired of doing that. Also, as the DBA, I have to deal with the devs using Entity Framework for everything, and I end up seeing a lot of issues on the SQL side with the way they're using it. Automagically generated queries that totally suck, lazy loading issues, locking/blocking issues, etc. Back in my day, I had to code all my objects by hand, write my own stored procs, write up all the logic to turn those stored proc results into objects (jeebus help whoever has to look at my service code from March). I have no experience with EF other than what I've seen it do to my SQL clusters.

What I'm looking for is a good reference or tutorial on how to develop a website in ASP.NET using EF and the latest advances in the framework, and being able to pull data from my existing analysis database to display it to the users. Preferably with some pretty charts and whatnot to make it easier to comprehend. Not only will this save me time, but I'm hoping that in the process, I can get a better understanding about the proper way to use EF and making it play nicely with SQL. At that point, I can go to the devs and give them some pointers on how they can improve their code and get things running better. I'm not a total newbie, but I've been having issues wrapping my head around MVC and that type of stuff (probably because I'm old and it's hard for me to learn anything at this point while still trying to do the rest of my job).

So, any recommendations on where to start? Any help would be greatly appreciated.

For reporting, look at PowerBI.

Potassium Problems
Sep 28, 2001
I'd recommend having them use MiniProfiler in their apps (http://miniprofiler.com/), which will show them issues with the queries EF generates, but to really fix this your devs are going to have to get a better understanding of SQL, and realize that just because the ORM generated a statement for you it doesn't mean it's good or correct.

As far as tutorials, this one was published a couple days ago on the official asp.net site.

edit- whoops, MVC 5 is definitely not beta, got mixed up

Potassium Problems fucked around with this message at 16:56 on Oct 29, 2015

epswing
Nov 4, 2003

Soiled Meat
Holy cow. I don't even know how to ask this question. I'm going to paste some code. I apologize in advance.

Given this:

C# code:
public class Group
{
    public bool Job1 { get; set; }
    public bool Job2 { get; set; }
    public bool Job3 { get; set; }

    public static string[] BoolPropertyNames()
    {
        return typeof(Group).GetProperties()
                            .Where(x => x.PropertyType == typeof(bool))
                            .Select(x => x.Name)
                            .ToArray();
    }
}
How do I turn this:

pre:
<table>
    <tr>
        <td>Job1</td>
        
        @for (int i = 0; i < Model.Groups.Count; i++)
        {
            <td>
                @Html.CheckBoxFor(model => Model.Groups[i].Job1)
            </td>
        }
    </tr>
    <tr>
        <td>Job2</td>
        
        @for (int i = 0; i < Model.Groups.Count; i++)
        {
            <td>
                @Html.CheckBoxFor(model => Model.Groups[i].Job2)
            </td>
        }
    </tr>
    <tr>
        <td>Job3</td>
        
        @for (int i = 0; i < Model.Groups.Count; i++)
        {
            <td>
                @Html.CheckBoxFor(model => Model.Groups[i].Job3)
            </td>
        }
    </tr>
</table>
Into something like this:

pre:
<table>
    @foreach (var name in Group.BoolPropertyNames())
    {
        <tr>
            <td>@name</td>
            
            @for (int i = 0; i < Model.Groups.Count; i++)
            {
                <td>
                    @Html.CheckBoxFor(model => Model.Groups[i].WHATGOESHERE?)
                </td>
            }
        </tr>
    }
</table>
Using fancy linq expressions?

In reality I have a couple dozen of those Job bools, and pasting that 10-line <tr> for each of them is both tedious and error prone.

Edit: I'm also interested in how one would properly ask the question I don't know how to ask without a hand-wavy example.

brap
Aug 23, 2004

Grimey Drawer
I don't know if I quite like where this is going but you should look into ModelMetadata and iterating over the properties of your view model.

Bognar
Aug 4, 2011

I am the queen of France
Hot Rope Guy

epalm posted:

Holy cow. I don't even know how to ask this question. I'm going to paste some code. I apologize in advance.

Given this:
How do I turn this:
Into something like this:
Using fancy linq expressions?

I would build the new expressions by hand using something like:

C# code:
public static Expression<Func<TModel, TProp>> MakeExpression<TModel, TProp>
	(Expression<Func<TModel,object>> baseExpr, PropertyInfo prop)
{
	var inner = baseExpr.Body;
	var memberAccess = Expression.MakeMemberAccess(inner, prop);
	return Expression.Lambda<Func<TModel, TProp>>(memberAccess, baseExpr.Parameters[0]);
}
For example:

pre:
@foreach (var prop in Group.BoolProperties())
{
    <div>
        @Html.CheckBoxFor(MakeExpression<MyModel,bool>(model => model.Groups[0], prop))
    </div>
}
See https://dotnetfiddle.net/LDc9bG


EDIT:

epalm posted:

Edit: I'm also interested in how one would properly ask the question I don't know how to ask without a hand-wavy example.

The question I'm answering here is "how do I dynamically build an expression at runtime that can be used with MVC's HTML Helpers?"

Bognar fucked around with this message at 18:20 on Oct 29, 2015

gariig
Dec 31, 2004
Beaten into submission by my fiance
Pillbug
Work is making me pick between VS2015 Professional and Enterprise. As a developer is there a reason to pick the Enterprise license? I see some nice things like IntelliTrace and memory analysis, but I think I can live out them. Any other reasons to pick Enterprise that's not obvious in the product comparison matrix?

Inverness
Feb 4, 2009

Fully configurable personal assistant.

gariig posted:

Work is making me pick between VS2015 Professional and Enterprise. As a developer is there a reason to pick the Enterprise license? I see some nice things like IntelliTrace and memory analysis, but I think I can live out them. Any other reasons to pick Enterprise that's not obvious in the product comparison matrix?
If you're getting the MSDN subscription too I imagine you'll want to see what is offered there for the Enterprise license.

epswing
Nov 4, 2003

Soiled Meat

fleshweasel posted:

I don't know if I quite like where this is going

You and me both, buddy :negative:

Bognar posted:

I would build the new expressions by hand using something like
...
The question I'm answering here is "how do I dynamically build an expression at runtime that can be used with MVC's HTML Helpers?"

Fascinating. Thanks!

epswing fucked around with this message at 20:01 on Oct 29, 2015

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug
Since this is the catch-all Microsoft-ecosystem developer thread, I'll ask here: Anyone else going to be at the MVP summit this week?

epswing
Nov 4, 2003

Soiled Meat
We have two C# solutions with a small but growing overlap of features. I want to pull the common functionality into a 3rd C# solution, referenced by the two products. Could I somehow do this using Nuget?

We're using VS 2013 Pro, and C# 4.5

zerofunk
Apr 24, 2004
Yeah. I'm not 100% sure on the best way to go about it, but we do something like that. There is a common code solution and the projects in it get built as nuget packages. We host those on an internal repository. Right now we only have one other solution that actually uses those packages, but in theory there could be more.

You'll want to make sure the debugging symbols are exported as well, so that you can step through anything from the nuget package. I'm not sure if we're doing that strictly through nuget... I just know they're hosted on the same server as our internal repository. I could take a look tomorrow and figure that out though.

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

Does anybody know if Mono can run on FreeBSD (specifically, FreeNAS)?

epswing
Nov 4, 2003

Soiled Meat

zerofunk posted:

I could take a look tomorrow and figure that out though.

That would be awesome, thanks. I'm randomly googling, and it seems like the opportunity and technology is there, but I'm not quite sure how to go about doing it.

Drastic Actions
Apr 7, 2009

FUCK YOU!
GET PUMPED!
Nap Ghost

NihilCredo posted:

Does anybody know if Mono can run on FreeBSD (specifically, FreeNAS)?

Technically you should be able to, but it's maintained by third parties. I asked the runtime team here if anyone has tried it on BSD and no one has in our office, so... yeah, it should work, maybe.

SirViver
Oct 22, 2008

epalm posted:

We have two C# solutions with a small but growing overlap of features. I want to pull the common functionality into a 3rd C# solution, referenced by the two products. Could I somehow do this using Nuget?

We're using VS 2013 Pro, and C# 4.5
In my honest opinion - and take it with a grain of salt, as I have by choice only minimal exposure to NuGet - I've so far found every interaction with NuGet, except for the initial installation of a package, to be an absolute pain in the rear end. And I haven't even installed packages with notable dependencies.

There's packages inexplicably failing to restore, NuGet barfing its files all over your projects, everybody being required to do the exact right thing w/r/t source control to not horribly gently caress things up, stuff "magically" working when you build with Visual Studio but not with MSBuild, etc. It's supposed to make dependency management a non-issue, but, at least for me, it has so far been the exact opposite. :shrug:

Personally I continue to use lib folders for seldom updated libraries and direct project references for stuff that is actively changing - just because code is shared doesn't mean you can't include the same projects in multiple solutions directly. Anything only available from NuGet is downloaded once and then stuffed into a lib folder under source control. These approaches might not be "sexy", but they are far more reliable and straightforward to troubleshoot should anything be amiss.

TheBlackVegetable
Oct 29, 2006

SirViver posted:

In my honest opinion - and take it with a grain of salt, as I have by choice only minimal exposure to NuGet - I've so far found every interaction with NuGet, except for the initial installation of a package, to be an absolute pain in the rear end. And I haven't even installed packages with notable dependencies.

There's packages inexplicably failing to restore, NuGet barfing its files all over your projects, everybody being required to do the exact right thing w/r/t source control to not horribly gently caress things up, stuff "magically" working when you build with Visual Studio but not with MSBuild, etc. It's supposed to make dependency management a non-issue, but, at least for me, it has so far been the exact opposite. :shrug:

Personally I continue to use lib folders for seldom updated libraries and direct project references for stuff that is actively changing - just because code is shared doesn't mean you can't include the same projects in multiple solutions directly. Anything only available from NuGet is downloaded once and then stuffed into a lib folder under source control. These approaches might not be "sexy", but they are far more reliable and straightforward to troubleshoot should anything be amiss.

Nuget can be a pain in the arse, but in my opinion it's still superior to lib folders and shared csproj files. I would absolutely go with nuget packages for sharing internal libraries between solutions.

Paket (sort-of nuget replacement) can help with the dependency hierarchy / conflicting package version issues but has it's own problems

xgalaxy
Jan 27, 2004
i write code
NuGet works great for small projects. Doesn't scale to large complicated projects at all.
.NET needs a maven-like and NuGet falls far short.

Its actually kind of worrisome that Microsoft is moving forward with .NET Core and having a lot of dependencies in NuGet now.

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison
Our standalone Lib folder is like 3GB, I hope someone figures out non-lovely nuget soon.

brap
Aug 23, 2004

Grimey Drawer
My understanding is there are political issues around NuGet at Microsoft that make it difficult to understand who is really responsible for fixing it (let's not mince words, the VS2015 version is broken) and what NuGet is supposed to actually be responsible for in your project.

Adbot
ADBOT LOVES YOU

Mr Shiny Pants
Nov 12, 2012

NihilCredo posted:

Does anybody know if Mono can run on FreeBSD (specifically, FreeNAS)?

Probably, I have it running on Open Indiana ( Solaris ).

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply