|
Drastic Actions posted:So I tried deploying some of my apps to the Xbox with the new Xbox UWP dev stuff, but I can't get SQLite to load I read about SQLite now being included in Windows itself. http://engineering.microsoft.com/2015/10/29/sqlite-in-windows-10/ I haven't yet had a go with it myself. But do I understand that SQLite.dll files are actually part of the OS? so you don't need to deploy them app-locally? (I wonder if in your case it's picking up the wrong DLL?)
|
# ? Apr 3, 2016 05:54 |
|
|
# ? May 17, 2024 21:56 |
|
Bognar posted:They implemented primary constructors for C# 6 and it was included in multiple beta releases of Roslyn, but they ultimately didn't ship it. We cut primary constructors from C#6 because there was a good bet they'd conflict with the "records" and "pattern-matching" feature we already knew we wanted... The "language feature status doc" for C#7 is here https://github.com/dotnet/roslyn/blob/master/docs/Language%20Feature%20Status.md https://github.com/dotnet/roslyn/pull/undefined "Binary literals, digit separators, local functions, ref returns" are marked as "finishing" and they're obviously the most likely. Of the rest, I'd personally wager money on Tuples making it into C#7; records+pattern-matching seem to be too close to call; and I doubt the rest. Take my personal opinion here (like any software engineering estimates) with a pinch of salt!
|
# ? Apr 3, 2016 06:06 |
|
there seems to be some disagreement about whether that list is a good overview: https://github.com/dotnet/roslyn/pull/10233
|
# ? Apr 3, 2016 13:12 |
|
although I feel a bit guilty about linking that because it's clearly a whither-the-sausage thing...
|
# ? Apr 3, 2016 13:13 |
|
Gul Banana posted:although I feel a bit guilty about linking that because it's clearly a whither-the-sausage thing... Hahah. Wow that guy just completely went against the wishes of everyone there and merged the commit anyway.
|
# ? Apr 3, 2016 18:05 |
|
xgalaxy posted:Hahah. Wow that guy just completely went against the wishes of everyone there and merged the commit anyway. There was only one other person there!
|
# ? Apr 4, 2016 02:42 |
|
I'm keeping an eye on how the new code generator extensions for the compiler are progressing. My main worry is that they're going to be limited by only allowing you to add new translation units during compilation for partial classes using the new 'replace' and 'original' syntax. AddTranslationUnit() is the only method offered and there is no setter for the Compilation property. I see no reason why it should prevent you from replacing the Compilation instance entirely so existing syntax trees, references, or resources can be edited.
|
# ? Apr 4, 2016 14:20 |
|
Inverness posted:I see no reason why it should prevent you from replacing the Compilation instance entirely so existing syntax trees, references, or resources can be edited. I implemented exactly what you describe a couple of years ago. The way I did it was just with msbuild trickery, so it offers up one set of files for a within-IDE build and a different set of files for a produce-the-EXE build. And it invoked a Roslyn-based tool for the latter. The main reason it doesn't work nicely is this: how to get intellisense (and other edit-time smarts) for the code you're writing plus the code that's auto-generated? If the generator has replaced the compilation instance entirely, there's no inherent connection between the stuff in your editor-buffer and what goes into the final compilation. That's why Matt Warren's idea of "supercedes" keyword was so genius - it restores the connection.
|
# ? Apr 4, 2016 15:34 |
|
ljw1004 posted:I implemented exactly what you describe a couple of years ago. The way I did it was just with msbuild trickery, so it offers up one set of files for a within-IDE build and a different set of files for a produce-the-EXE build. And it invoked a Roslyn-based tool for the latter. One of the cases cited on GitHub was adding resources or references to the Compilation instance. You can't do that as things are now. I think it would be a shame to add such a great feature yet not go the extra distance by simply giving the option of replacing the Compilation if the change you want to make isn't satisfied by the current scenario.
|
# ? Apr 4, 2016 23:43 |
|
Inverness posted:I'm keeping an eye on how the new code generator extensions for the compiler are progressing. I realllllly don't like replace & original but I can't verbalize why clearly. Probably because it'll end up being used for more than machine generated code & it's too large an indirection to instantly grok.
|
# ? Apr 5, 2016 03:28 |
|
seems like extending the feature would be backwards compatible, though, if it turns out to be a good idea
|
# ? Apr 5, 2016 06:25 |
|
What's the best .NET web scraping library? HTML Agility Pack?
|
# ? Apr 6, 2016 16:50 |
|
GrumpyDoctor posted:What's the best .NET web scraping library? HTML Agility Pack? Unless something's changed in the past couple of years, yeah that's the one.
|
# ? Apr 6, 2016 16:56 |
|
It's one of the better parsing libraries on any platform. It's what I use for parsing the forums for my apps.
|
# ? Apr 6, 2016 17:02 |
|
I'm writing a custom model binder for MVC (so that I can bind a bunch of ajax posted data to a list of objects). (essentially following this http://www.dotnetcurry.com/ShowArticle.aspx?ID=584 except that I can't just pull a match from a database, this is data that's all client side) I'm like...99% there I think, but I'm drawing a blank here. I have a string array, and an example of one of the items in the array is: quote:"MapId=2&Number=150&EncryptionId=3&TypeId=1&Tag=4F56&SourceId=10001&SourceName=TVCHANNEL&ProviderId=1&ProviderName=CITYNAME&EncryptionName=Full Encryption&Management=1&Device=CMC&P2p=IPADDRESS&Mcast=IPADDREESS&Udp=4705&InPn=807&OutPn=807&QamManagement=IPADDRESS&Ess=SSH54&Qam=1&GigE=3&PortNumber=29&Port=4E&OutTsid=29&Eia=51&Frequency=387000" I need to convert that to a C# class that has those same properties. My initial hunch split on the & and then manually map it but is there an easier/faster way? Uziel fucked around with this message at 17:01 on Apr 7, 2016 |
# ? Apr 7, 2016 16:57 |
|
You could be splitting on the '&' and then splitting on the '=' and hoping nothing blows up. I think it would be like letting a drag car go racing down the track without a driver and hoping it stays straight. Using a RegEx matching routine will give you safer results you can verify before passing it into an object. It would definitely not be faster though.
|
# ? Apr 7, 2016 18:10 |
|
I was able to do this:code:
|
# ? Apr 7, 2016 18:36 |
|
Uziel posted:I'm writing a custom model binder for MVC (so that I can bind a bunch of ajax posted data to a list of objects). (essentially following this http://www.dotnetcurry.com/ShowArticle.aspx?ID=584 except that I can't just pull a match from a database, this is data that's all client side) HttpUtility.ParseQueryString Why are you dealing with a raw qs? Shouldn't that be already mapped to a method by something? (Asp.net does this via model binders )
|
# ? Apr 7, 2016 19:02 |
|
Uziel posted:I need to convert that to a C# class that has those same properties. My initial hunch split on the & and then manually map it but is there an easier/faster way? Do you have control over the POST operation? Can you just post JSON instead? EDIT: Actually, what are you doing? If you generated the form from a list in MVC, it will post back to MVC in the form of a list. It looks something like entity[0].Id=1&entity[0].Name=foo&entity[1].Id=2&entity[1].Name=bar. Bognar fucked around with this message at 21:16 on Apr 7, 2016 |
# ? Apr 7, 2016 21:11 |
|
Yeah I've got to say that doesn't sound like something you would need to write a custom model binder for. Binding a view to a list can be a pain because you need to use a for loop with an index to iterate over your mode rather than a foreach, but after that the binder should handle it properly as long as your controller action takes a list as a parameter. Or, if you want to use a foreach you can do it with this: https://www.nuget.org/packages/BeginCollectionItem/ - this is also really useful if you don't know how long the list is going to be - I use it for places where I want to allow people to add an arbitrary number of list items. You can use AJAX to just return a partial with the editing view for a single item. e: Like this: http://stackoverflow.com/questions/15375800/model-binding-to-a-list-mvc-4 chippy fucked around with this message at 09:10 on Apr 8, 2016 |
# ? Apr 8, 2016 09:03 |
|
Hey so with TFS (hosted if that matters) I'm starting to get into branching. I currently have 3 branches: Main X Feature development branch Release branch Release branch was branched from X Feature development branch, and I gutted it to get it working with the .net native compilation for a store deployment (loving screwed us, our 3rd party libraries weren't even ready for .net native and we were in the middle of a deploy). If I add more changes to the feature development branch, with views that aren't in the release branch but are in X branch, will it push those view changes to the release branch? Basically I want to work on some views for feature development branch, and push those views to the release branch, but release branch currently has them deleted. Any way to do this while preserving history and not copy and pasting files? Would it be best just to rebranch X to another release, and regut sans the view deletions afterwards? e just realized that this should maybe go in the source control thread. Open to input in here if anyone has it though.
|
# ? Apr 8, 2016 18:53 |
|
Knyteguy posted:Hey so with TFS (hosted if that matters) I'm starting to get into branching. If you're using TFVC, branches are hierarchal. You can reparent the branches or perform a baseless merge.
|
# ? Apr 8, 2016 23:43 |
|
chippy posted:Yeah I've got to say that doesn't sound like something you would need to write a custom model binder for. I'll take a look at these thanks. I'm working on something that allows users to edit multiple rows on the client (including find/replace, etc). Before they requested a "save all client changes to db" feature (as opposed to row by row that they initially wanted), I didn't need to worry about model binding to a list, so I'm aware of how to do that from scratch using the consecutive IDs. I'm overdue on this project and my management is loving awful at setting priorities other than "everything is the first priority, including these 3 new projects that are starting today", so it was faster to figure out custom model binding than redo my javascript. I'll know better for the next project. =)
|
# ? Apr 9, 2016 17:45 |
|
https://twitter.com/azurestatusquote:Only confirmed followers have access to @azurestatus's Tweets and complete profile. Click the "Follow" button to send a follow request. Why on earth would I need to be a "confirmed follower" to see Azure's status? I'd rather be pushed tweets than constantly F5ing https://azure.microsoft.com/en-us/status/
|
# ? Apr 10, 2016 22:31 |
|
"The Email field is not a valid e-mail address." Sometimes my users are intermittently seeing this error, with what look like perfectly valid email addresses. When I type their email addresses, I get no error. I've had some of them send me screenshots. Here are a couple examples of the HTML behind the Email fields: code:
code:
What's going on here? I'm having a hard time googling for this because all the Q&A sites just provide information on how to validate email addresses. I'm using MVC 5.2.2
|
# ? Apr 10, 2016 22:50 |
|
epalm posted:"The Email field is not a valid e-mail address." Is it triggering on a leading/trailing space or something silly like that? Or a tab?
|
# ? Apr 10, 2016 23:51 |
|
Ithaqua posted:Is it triggering on a leading/trailing space or something silly like that? Or a tab? Goddammit. vvv leading space >_< epswing fucked around with this message at 03:23 on Apr 11, 2016 |
# ? Apr 11, 2016 00:56 |
|
epalm posted:Goddammit. Which was it?
|
# ? Apr 11, 2016 01:22 |
|
Hey WPF wizards! When I get a program crash, and the stacktrace contains only microsoft code, how would I go about finding the cause? It looks like a DatePicker was left-mouse clicked, and was trying to toggle a pop-up (I'm guessing the calendar widget)? There are lots of DatePickers in this application. I don't even know which one caused the crash. http://pastebin.com/raw/5STZHYLZ epswing fucked around with this message at 22:15 on Apr 11, 2016 |
# ? Apr 11, 2016 22:11 |
|
epalm posted:Hey WPF wizards! When I get a program crash, and the stacktrace contains only microsoft code, how would I go about finding the cause? Elsewhere on the internet, someone said they updated to .NET 4.5 and got a better stack-trace when they encountered this bug. If you can trigger the bug, I'd suggest going that route (if you're not already on 4.5). I suspect the real error is being hidden by the dispatcher executing a delegate. That delegate is probably some code attached in an event handler attached to a DatePicker somewhere. I'd look for any events on DatePickers that happen to modify anything in the view hierarchy.
|
# ? Apr 11, 2016 22:43 |
|
epalm posted:Hey WPF wizards! When I get a program crash, and the stacktrace contains only microsoft code, how would I go about finding the cause? You could use Windbg to figure this out, if you spend the time to learn WIndbg. Do you at least have the Microsoft symbols getting loaded?
|
# ? Apr 12, 2016 06:08 |
|
Ithaqua posted:If you're using TFVC, branches are hierarchal. You can reparent the branches or perform a baseless merge. Thanks. My source control knowledge is a little limited beyond checkouts/checkins/rollbacks. I'm just getting into branching. XML deserialization question: Given the following serialized xml, does anyone know why I'm getting the error below? XML code:
Serializer: C# code:
C# code:
C# code:
Knyteguy fucked around with this message at 17:14 on Apr 12, 2016 |
# ? Apr 12, 2016 17:03 |
|
Knyteguy posted:... Based on the error message, the root element should look like: XML code:
|
# ? Apr 12, 2016 18:15 |
|
Alternatively, if the XML is actually correct, just tell the serializer not to expect a namespace there. This should do it:code:
|
# ? Apr 12, 2016 20:02 |
|
epalm posted:Hey WPF wizards! When I get a program crash, and the stacktrace contains only microsoft code, how would I go about finding the cause? Are any of these DatePickers inside a virtualizing control? EDIT: To clarify there is a current WPF bug where a DatePicker inside of a virtualizing control will cause this issue due to trying to recycle the DatePicker during virtualization and attempting to set a new Parent for the Calendar in the DatePicker when it already has a parent from the last use of it. If this is the case for your app, try one of the following: 1) Disable recycling: VirtualizingStackPanel.VirtualizationMode="Standard" in the virtualizing control's XAML 2) Explicitly set the style on the DatePicker that is encapsulated by the virtualizing control. 1) Stops the re-use by the container but obviously incurs a perf hit. 2) Allows WPF to re-use the control template and also avoids the situation where WPF recycles that bit of the DatePicker. No guarantee this is the same issue that you are seeing, but it's very similar to a bug I have seen come through and that was the resolution (no fix in WPF as of right now). Mister Duck fucked around with this message at 20:42 on Apr 12, 2016 |
# ? Apr 12, 2016 20:20 |
|
I have a system that needs to be able to load multiple versions of the same assembly at the same time. It's working perfectly well by creating a separate appdomain for each version of the assembly, but it's extremely slow. I've improved things a bit by using LoaderOptimization.MultiDomain in the AppDomainSetup, and running NGen on everything, which seems to have cut the overhead by about half, but it looks like most of the processing time is still spent in appdomain overhead. Is there another way to host multiple versions of the same assembly in the same process other than using appdomains? Or are there any other ways to speed up appdomain creation and cross app domain calls?
|
# ? Apr 13, 2016 14:21 |
|
beuges posted:I have a system that needs to be able to load multiple versions of the same assembly at the same time. It's working perfectly well by creating a separate appdomain for each version of the assembly, but it's extremely slow. I've improved things a bit by using LoaderOptimization.MultiDomain in the AppDomainSetup, and running NGen on everything, which seems to have cut the overhead by about half, but it looks like most of the processing time is still spent in appdomain overhead. I have this exact same issue, and I haven't gotten around to even trying to AppDomain approach, so I'm curious if you find anything.
|
# ? Apr 14, 2016 00:09 |
|
GrumpyDoctor posted:I have this exact same issue, and I haven't gotten around to even trying to AppDomain approach, so I'm curious if you find anything. Assembly.LoadFile will load separately based on paths into a single AppDomain. That can do very bad things, but it's the only way I know of loading the same assembly into a single domain. Of course if you are talking win32 or straight COM loading, you can do SxS assembly stuff but I don't think the same works for pure managed assemblies (though you can make a C# assembly COM visible but I never tried SxS with them). Check out this MSDN page.
|
# ? Apr 14, 2016 01:37 |
|
I'm not sure what the consequences of this would be, but is it possible to load the program into a byte array and 'manually' set the version in the clr header, then load it with Assembly.Load()? I've done this a few times but only out of some other curiosity and not with the version. edit: Actually, Assembly.Load(byte[]) will load assemblies of the same version. Maybe you can use some careful reflection? (i.e. MethodInfo.Invoke() or Assembly.CreateInstance()) I'm not sure specifically what you need to do with them though. dougdrums fucked around with this message at 22:27 on Apr 14, 2016 |
# ? Apr 14, 2016 21:47 |
|
|
# ? May 17, 2024 21:56 |
|
I'll take a look at Assembly.LoadFile but I'm not certain that will help in this case because it looks like it only loads that particular assembly, and not all the references as well, and some of the references will likely have the same names as others already loaded, but differ internally. What I'm writing is a transaction processing engine, where each transaction's logic sits in a separate plugin assembly, or more likely, set of assemblies. The complication is that the engine must support multiple versions of the same transaction being made available to different clients. So, I have an assembly called QueryFoo which in turn references a bunch of other assemblies. I'm storing each version of each plugin package (i.e. the QueryFoo.dll + all referenced assemblies) in its own version-numbered folder, then loading the appropriate assembly into its own app domain, so that I can have different versions loaded at the same time. What I may end up doing is moving all the app domains into a separate service, and figuring out a way to pass requests directly into a specific appdomain in that service to avoid the cost of creating the app domain and marshalling data into/out of it in the transaction processor itself.
|
# ? Apr 15, 2016 10:20 |