|
GrumpyDoctor posted:It's fine. Everyone else does it, so you won't be any more hosed than the rest of us if there's a problem. Unrelated to that: it's really annoying that .net exceptions, compiler errors and warnings etc are all forcibly localized to my system's language, and there doesn't seem to be a way to get rid of that. Forgall fucked around with this message at 19:00 on Dec 11, 2014 |
# ? Dec 11, 2014 18:54 |
|
|
# ? May 22, 2024 10:54 |
|
Please help! When I run an MVC .net web app VS 2013 instantly freezes and the sites takes ages bur it does run. VS remains frozen even when I shut down the site in the browser. I have the following error in event viewer. It mentions something about TestProjectHelper but it has the problem with the boilerplate mvc app with no test project. Simple console apps run as expected. I have vs 2013 Ultimate Update 4 quote:The description for Event ID 0 from source VSTTExecution cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer. followed by this warning quote:The directory specified for caching compressed content C:\Users\Brian\AppData\Local\Temp\iisexpress\IIS Temporary Compressed Files\Clr4IntegratedAppPool is invalid. Static compression is being disabled. I've repaired and reinstalled vs 2013 already. I've googled to the best of my ability but found nothing.
|
# ? Dec 11, 2014 20:36 |
|
This is pretty old but when I used to get that error in the past I'd follow some of it: http://blogs.msdn.com/b/dougste/archive/2006/09/05/741329.aspx The use of FUSELOG and FILEMON especially. Maybe someone will contradict me but I've seen the second warning all the time and generally ignore it, if it occurs in development.
|
# ? Dec 11, 2014 21:27 |
|
Having trouble googling for this for some reason. http://msdn.microsoft.com/en-us/library/4fkewx0t I always find what I'm looking for immediately after I post, so thanks, thread. Eggnogium fucked around with this message at 22:21 on Dec 11, 2014 |
# ? Dec 11, 2014 22:18 |
|
wwb posted:If you are deploying applications this way you are probably retarded. Use a build server. Harsh much? I was just wondering about the way it does the actual copying and the convoluted way of setting extra permissions.
|
# ? Dec 11, 2014 23:29 |
|
Scaramouche posted:This is pretty old but when I used to get that error in the past I'd follow some of it: Fuslog has loads of entries every time i run vs. quote:*** Assembly Binder Log Entry (11/12/2014 @ 23:35:27) *** That sql dll is actually here... C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\120\Microsoft.Data.Tools.Schema.Utilities.Sql.dll Help!
|
# ? Dec 12, 2014 00:50 |
|
I uninstalled an old version of c# express. I think thats what hosed it all up. Anyway, all the problems were fixed by deleting C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files http://stackoverflow.com/questions/3394106/gac-assembly-is-in-the-gac-but-could-not-load-file-or-assembly
|
# ? Dec 12, 2014 03:00 |
|
Ithaqua posted:It's because (IMO) the IDE-based deployment stuff is targeted at solo developers who just push software to an arbitrary environment on an arbitrary schedule with no formal build/CI process, not actual businesses. There are some more enterprisey offerings for release management these days, but they're not a great fit for solo developers. So, speaking as the only full-time dev at my workplace, I definitely do not want something with a complex formal build/CI process. What's the benefit for such small-time shops, really? We have a private nuget server for in-house dependencies so I'll just keep a canonical git branch for any actual production release and it'll be referencing the right versions of dependencies.
|
# ? Dec 12, 2014 03:59 |
|
Dromio posted:We’ve had an issue where we changed our deployment to support testing an upcoming release in development and QA, but then had to re-deploy the older Production build and couldn’t without a good deal of work. If you run into similar again one way of mitigating a bit is to just add new tags to your servers and target the new steps to them. If there's no servers matching those tags in production those steps can be skipped. You might be able to target config transforms to tags as well but I'm not 100% on that.
|
# ? Dec 12, 2014 07:15 |
|
RICHUNCLEPENNYBAGS posted:So, speaking as the only full-time dev at my workplace, I definitely do not want something with a complex formal build/CI process. What's the benefit for such small-time shops, really? Exactly, and IIS express is not IIS.
|
# ? Dec 12, 2014 10:38 |
|
GrumpyDoctor posted:.NET Megathread 3.5: you won't be any more hosed than the rest of us if there's a problem.
|
# ? Dec 12, 2014 15:56 |
|
Beep bop boop double post
|
# ? Dec 12, 2014 15:58 |
|
I want to find an object in a collection by a property, but return another property of that found object, with LINQ. This is trickier than I'd have anticipated.code:
|
# ? Dec 12, 2014 16:47 |
|
Select() returns an IEnumerable, even if it only has one item. So you're calling ToString on IEnumerable<string> which just returns the type info. What you probably want is this: gimmeAString = collectionOfFoo.First(foo => foo.LookupId == vendorId).LookupDescription This will throw an exception if collectionOfFoo doesn't have a foo where the LookupId matches the vendorId, though, so you could call FirstOrDefault, do a null check, then assign the LookupDescription if it has been found - if you can't rely on a matching value always being present in the collection.
|
# ? Dec 12, 2014 16:50 |
|
Wardende posted:Select() returns an IEnumerable, even if it only has one item. So you're calling ToString on IEnumerable<string> which just returns the type info. What you probably want is this: That's what I ended up doing. Know of a good LINQ book for santa to order on amazon for me? I really need to do more than just cargo cult it.
|
# ? Dec 12, 2014 17:06 |
|
Honestly there's not that much to it. Select to apply a function to the elements of a sequence, Where to filter down to elements that satisfy a predicate, First to get the first element that satisfies the predicate, FirstOrDefault to keep your program from blowing up if one isn't found, Last similarly gets the last item matching a predicate, OrderBy and ThenBy to sort a list, Any to see if any elements in the list satisfy a predicate, All to see if all items in a list match a predicate. Those are what you'll use like 90% of the time. There is some interesting SQL-like stuff you can do with GroupBy but I've found it pretty confusing in the context of C#.
|
# ? Dec 12, 2014 17:22 |
|
RICHUNCLEPENNYBAGS posted:So, speaking as the only full-time dev at my workplace, I definitely do not want something with a complex formal build/CI process. What's the benefit for such small-time shops, really? Automated CI / build is vastly more important in a one man shop than a big shop for a few reasons: * It keeps you honest and makes sure you don't skip a step. Which is really easy when nobody is even capable of looking over your shoulder. * Keeps the bus factor a bit under control -- the best source control in the world is worthless if nobody can build / deploy the app effectively. * As the only full-time dev do you want to spend your time babysitting deployments or writing features / quashing bugs? * All the normal advantages apply beyond this.
|
# ? Dec 12, 2014 17:22 |
|
Space Whale posted:That's what I ended up doing. I'd recommend C# in Depth by Jon Skeet. It's got a chapter on LINQ, but it also has tons of other useful information if you're getting started with C#. Read it cover to cover if you have the time.
|
# ? Dec 12, 2014 17:22 |
|
Im learning linq at the moment. This is a good quick reference.. https://code.msdn.microsoft.com/101-linq-samples-3fb9811b Automapper/ view model question. I want to add a calculated field to a view model. Lets say I have a viewmodel like code:
code:
code:
Now I want to add a calculated field "int NumberOfDogs" to the view model code:
code:
|
# ? Dec 13, 2014 02:26 |
|
wwb posted:Automated CI / build is vastly more important in a one man shop than a big shop for a few reasons: I mean... there aren't really that many steps or babysitting. I branch, commit, right-click my project and click "publish to Azure," and it's live. We do releases roughly quarterly (although obviously bug fixes or whatever can happen sooner); maybe I'd feel differently if I were pushing out changes more regularly.
|
# ? Dec 13, 2014 02:46 |
|
bpower posted:I want to do something like the following sql and put it in my new updated PersonViewModel You can nest linq expressions inside linq expressions. See http://stackoverflow.com/questions/9334919/linq-nested-query
|
# ? Dec 13, 2014 03:39 |
|
Nice. So, is there a way to AutoMapper to help with the following? Pretend the subquery is on tables not so closely related to People. code:
|
# ? Dec 13, 2014 04:11 |
|
You know you can use blocks as Func arguments, right?
|
# ? Dec 13, 2014 04:32 |
|
Space Whale posted:That's what I ended up doing. C# In Depth by Jon Skeet is the canonical reference. Once you understand anonymous functions, the LINQ extension methods are a cinch.
|
# ? Dec 13, 2014 04:44 |
|
Wardende posted:C# In Depth by Jon Skeet is the canonical reference. Once you understand anonymous functions, the LINQ extension methods are a cinch. Well, the lazily evaluated thing bites people too. But yeah, it's not magic.
|
# ? Dec 13, 2014 05:28 |
|
RICHUNCLEPENNYBAGS posted:Well, the lazily evaluated thing bites people too. But yeah, it's not magic. I dunno man. I looked at the Entity source once. Pretty sure Black Magic.
|
# ? Dec 13, 2014 06:17 |
|
InfernoJack posted:I dunno man. I looked at the Entity source once. I'd love to do runtime-generated classes like EF does but you gotta gently caress with Reflection.Emit and basically write assembly. Maybe Roslyn will make it easier to do that kinda thing.
|
# ? Dec 13, 2014 07:12 |
|
InfernoJack posted:I dunno man. I looked at the Entity source once. Take a look at F# type providers, that will cook your noodle.
|
# ? Dec 13, 2014 08:26 |
|
I've got a question / concern about HttpWebRequest. Keep in mind I'm working in Unity3d so I only have access to .Net 3.5 features, so no async/await or HttpClient. I want to use HttpWebRequest BeginGetResponse but there is a note on it saying that this call can block for various reasons and that I shouldn't call it from a UI thread. May I ask what is the loving point of this call then? How should I deal with this? It seems kind of stupid to spin up a thread just so I can call what is supposed to be an asynchronous call in the first place. If I have to spin up a thread to make this call I might as well save the hassle of working in callbacks and just make my own thread and use the synchronous version GetResponse instead. xgalaxy fucked around with this message at 17:25 on Dec 13, 2014 |
# ? Dec 13, 2014 17:20 |
|
bpower posted:Im learning linq at the moment. This is a good quick reference.. Look at writing a ValueResolver.
|
# ? Dec 13, 2014 19:54 |
|
Kind of a dumb bikeshedding-ish question but what is more idiomatic C#?code:
code:
xgalaxy fucked around with this message at 23:05 on Dec 14, 2014 |
# ? Dec 14, 2014 23:02 |
|
/\/\/\ I'd go for the second one. Less code, easier to understand. Someone looking over the code won't have to refer back to the ScheduleCallback delegate to figure out what it is. --- Kind of unrelated, but I thought I'd share some cool stuff I found out about System.Linq.Expressions. If anyone has used a javascript graphics/game library(such as Phaser or EaselJS) in the past, they know how tweening is done there. Tweening or in-betweening, is taking an initial value and a target value, and coming up with intermediate values so it looks like a smooth transition over time instead of a jump. It's typically used for animation stuff but it doesn't have to be. I wanted to see if this was possible to do in C# in a generic way and it turns out the answer is yes. I started out with the goal of having code that looks something like this: code:
How can this be done you ask? With System.Linq.Expressions. Here's some very gutted sample code showing the mechanism of how I did it: code:
I also stole this guy's easing functions. An easing function gives the path for the transition to occur. The simplest case of a linear easing function just takes a linear path from the initial value to the target value. If you want to get more fancy, there's sine wave based functions and other stuff that you can also steal from the site linked above. E: If it's not immediately obvious why I shouldn't just convert everything to double and go from there, this technique can be used for non-numeric types as well(any type really). For example, you could create a handler for string that takes an initial string and target string and adds letters smoothly over the duration: code:
code:
Okita fucked around with this message at 03:04 on Dec 15, 2014 |
# ? Dec 15, 2014 01:51 |
|
Okita posted:
|
# ? Dec 15, 2014 07:25 |
|
Does anyone know whether it is possible to do an upgrade install from windows 7 to 8 while preserving an installed copy of Visual Studio?
|
# ? Dec 15, 2014 07:34 |
|
Yes, an upgrade install of Windows will leave any existing Visual Studio installation in an operational state, barring exceptional circumstances.
|
# ? Dec 15, 2014 09:58 |
|
xgalaxy posted:Kind of a dumb bikeshedding-ish question but what is more idiomatic C#? 2nd one x1000. I can't think of a compelling reason to use the delegate signature over Action or Func, it might as well be deprecated. Action<int,object> would be preferable to answer your first question.
|
# ? Dec 15, 2014 15:49 |
|
Mr. Crow posted:2nd one x1000. If you were exposing an API and the usage wasn't clear, being able to put XML docs on the delegate signature could be beneficial. That's the only reason I can think of.
|
# ? Dec 15, 2014 16:47 |
|
Forgall posted:Looks like expression is being compiled every time you call setter. I think you can make an expression that takes parameter and compile it just once. That's a good point. For anyone interested, here's how to do this: code:
|
# ? Dec 15, 2014 17:44 |
|
I have a simple question I think. What is the control used to do user field mapping (like in a mail merge) in a word document? I tried to google it but I keep getting stuff for word document automation. My project is mapping excel columns to a SQL Server database, where the excel columns can vary from sheet to sheet. That control is exactly what I'm looking for.
|
# ? Dec 15, 2014 19:24 |
|
|
# ? May 22, 2024 10:54 |
|
So when you guys (in the last thread, or maybe it was somewhere else) said that at some point unit testing would just "click" and all of a sudden completely make sense and you will never want to code a different way again... You guys were right. Holy poo poo. TDD is like crack. Every time another test goes green I get a little buzz. Thanks again goons
|
# ? Dec 15, 2014 20:22 |