|
another day, another reason to avoid UWP...
|
# ? Sep 13, 2016 10:05 |
|
|
# ? Jun 3, 2024 11:07 |
|
The whole WinRT stuff is just........ A shame really because WPF is pretty good but could have used some more attention from MS.
|
# ? Sep 13, 2016 10:56 |
|
spiderlemur posted:Why does debugging any MVC application take 8 - 9 seconds on a reasonably fast machine (SSD, modern i7, plenty of memory)? I tried Core to see if things improved but I can't get at a point where pressing "start debugging" (or even starting without debugging) gives me a page faster than 7 seconds or so. I'm currently working on a customised version of an open source e-commerce system (nopCommerce). They've mananaged to somehow the structure the project in such a way that unless you do a clean/rebuild every time you make changes to one of the subprojects, it ends up running with the old versions of the DLLs. The build takes 20 seconds and the startup time for the project is 30 seconds. So I'm looking at 50 seconds to your 7 every time I want to test a one-line bug fix. Sorry this isn't helpful but hopefully it shows you that things could be worse.
|
# ? Sep 13, 2016 12:44 |
|
I could be wrong as I don't work much with ASP but maybe try to keep IIS express running after you close the debugger? If I where to guess having to start IIS express everytime would cause a bit of dely. http://stackoverflow.com/questions/19568762/how-can-i-prevent-visual-studio-2013-from-closing-my-iis-express-app-when-i-end
|
# ? Sep 13, 2016 14:28 |
|
This may be an appropriate question for the infosec thread, but since it's .NET specific, I'm dropping it here: I need to encrypt some data with AES 128 or higher. Looking at the System.Security.Cryptography namespace, I see 3 implementations of the abstract AES class. Does anyone have any experience with any of these implementations, or suggestions on which one may be the safest to use?
|
# ? Sep 13, 2016 15:27 |
|
I would just use Aes.Create() and let the platform pick the most appropriate one, unless you have some special requirements. As for what they are, AesManaged is a fully-managed-code (C#) implementation of AES. AesCryptoServiceProvider uses the older CSP API from Windows, AesCng uses the newer CNG API. The latter two might be relevant if you care about things like FIPS compatibility or hardware acceleration. They all work fine, though.
|
# ? Sep 13, 2016 15:40 |
|
Mr Shiny Pants posted:The whole WinRT stuff is just........ I've been trying to learn UWP for a few weeks in my spare time, I wish I knew it was actually going to be worth it. I hope it doesn't go the way of Silverlight. Maybe I should stick with WPF....
|
# ? Sep 13, 2016 18:18 |
|
EssOEss posted:I would just use Aes.Create() and let the platform pick the most appropriate one, unless you have some special requirements. Oh, good call. Didn't notice that.
|
# ? Sep 13, 2016 18:22 |
|
microsoft needs to loving figure out their UI poo poo because im like vaguely panicking about winforms being shot in the fuckin head
|
# ? Sep 13, 2016 18:22 |
|
Hate to say it but the OS X / iOS UI developer story is miles ahead of anything Microsoft has right now.
|
# ? Sep 13, 2016 18:33 |
|
Baloogan posted:microsoft needs to loving figure out their UI poo poo because im like vaguely panicking about winforms being shot in the fuckin head Is this even a remote possibility? I thought WinForms was already largely just an abandoned technology(from the MS perspective) but due to how they support everything forever, it'll be another decade before WinForms apps are just plain broken? Plus, it isn't like UWP is *too* far gone, is it? I mean, isn't it just a weird next step in the evolution of Win8 tech? So even if it gets retired, it'll just be in favor of some NEW XAML-based framework with a slightly different C# library? Plus I mean, they seem to care about it - Anniversary Update finally gives a native Boolean-to-Visibility converter - nearly a decade late but, you know, better late than never
|
# ? Sep 13, 2016 22:39 |
|
Cuntpunch posted:Is this even a remote possibility? I thought WinForms was already largely just an abandoned technology(from the MS perspective) but due to how they support everything forever, it'll be another decade before WinForms apps are just plain broken? WPF was the official replacement for WinForms, so they've been legacy for about 8 years now. I don't know that UWP is going anywhere any time soon, MS appears to be pushing it as the next successor. But they did this to Silverlight too, so who knows what will happen? I imagine both WPF and UWP will be properly maintained for at least the next several years.
|
# ? Sep 13, 2016 22:44 |
|
Zero The Hero posted:WPF was the official replacement for WinForms, so they've been legacy for about 8 years now. I don't know that UWP is going anywhere any time soon, MS appears to be pushing it as the next successor. But they did this to Silverlight too, so who knows what will happen? I imagine both WPF and UWP will be properly maintained for at least the next several years. Eh, Silverlight was a late-to-the-party attempt to fight Flash. If it had shown up 5 years earlier it probably would have had some sticking power - but instead it was just too late to matter - Flash itself was already showing its age and being replaced by HTML5, etc, and then suddenly a "oh boy another plugin for rich web content!" shows up. Just old-school Microsoft lovely timing.
|
# ? Sep 13, 2016 23:03 |
|
Cuntpunch posted:Eh, Silverlight was a late-to-the-party attempt to fight Flash. If it had shown up 5 years earlier it probably would have had some sticking power - but instead it was just too late to matter - Flash itself was already showing its age and being replaced by HTML5, etc, and then suddenly a "oh boy another plugin for rich web content!" shows up. Just old-school Microsoft lovely timing. mystes fucked around with this message at 02:35 on Sep 14, 2016 |
# ? Sep 14, 2016 02:32 |
|
Zero The Hero posted:I've been trying to learn UWP for a few weeks in my spare time, I wish I knew it was actually going to be worth it. I hope it doesn't go the way of Silverlight. Maybe I should stick with WPF.... To be honest I have no clue. I've created a nice application for Windows 8 using WinRT and it is working pretty well actually, the problem is that on Windows 10 the whole charms bar and stuff that actually makes it really nice to use on a tablet doesn't work anymore or is stupidly converted. Instead of the Slide in options menu you have a "Hamburger" menu on the application, it looks really really terrible. I tried to built it in WPF at first but the touch stuff and camera stuff is non existent or broken. WPF does have the best Xaml though, DataTemplate selector on DataType? Yes please..... So Xamarin forms............ Some consistency would have been awesome....
|
# ? Sep 14, 2016 11:22 |
|
Mr Shiny Pants posted:To be honest I have no clue. I've created a nice application for Windows 8 using WinRT and it is working pretty well actually, the problem is that on Windows 10 the whole charms bar and stuff that actually makes it really nice to use on a tablet doesn't work anymore or is stupidly converted. Instead of the Slide in options menu you have a "Hamburger" menu on the application, it looks really really terrible. Maybe it was a mistake to assume UWP would be Universal. Idk.
|
# ? Sep 14, 2016 16:11 |
|
Zero The Hero posted:Maybe it was a mistake to assume UWP would be Universal. Idk. Nah the UWP stuff is fine, it is the applications written specifically for Windows 8 that are stuck with broken UX.
|
# ? Sep 14, 2016 16:33 |
|
What's the best practice for setting the DbConfiguration for EF6 when you have multiple referenced projects that each connect to different data sources and defined their own DbConfiguration? What I'm seeing is that the DbConfiguration gets set for the entire app domain and one or the other data library blows up because it can't find that DbConfiguration implementation in its own assembly. So far, the bulk of google/SO results have you effectively hard-coding the DbConfiguration in the app's config file. Then, I have to go across all of these dependency projects and remove the DbConfigurationType attributes from their DbContext classes. Maybe the correct way to do this is that DbConfiguration extensions shouldn't be happening at the same layer as setting up the DbContext?
|
# ? Sep 14, 2016 17:11 |
|
Mr Shiny Pants posted:Nah the UWP stuff is fine, it is the applications written specifically for Windows 8 that are stuck with broken UX. I see. I guess I misunderstood
|
# ? Sep 14, 2016 18:04 |
|
chippy posted:I'm currently working on a customised version of an open source e-commerce system (nopCommerce). They've mananaged to somehow the structure the project in such a way that unless you do a clean/rebuild every time you make changes to one of the subprojects, it ends up running with the old versions of the DLLs. The build takes 20 seconds and the startup time for the project is 30 seconds. So I'm looking at 50 seconds to your 7 every time I want to test a one-line bug fix. Actually, I've got a question about this if anyone can help - since moving this project to Visual Studio 2015, I get C#6 everywhere but my views. In my controllers, service layer, etc, I can use what I want, but if I try to use it in my views I get messages like 'Feature 'interpolated strings' is not available in C# 5. Please use language version 6 or greater.'. Clearly it's some sort of project configuration issue. Does anyone know what setting I might need to change?
|
# ? Sep 15, 2016 10:14 |
|
do this:
|
# ? Sep 15, 2016 11:07 |
|
Gul Banana posted:do this: Hmmm. Thanks for the tip, unfortunately all it got me was this in my output window: code:
edit: And I no longer have the option in my Project menu either. Bravo, Microsoft! chippy fucked around with this message at 11:28 on Sep 15, 2016 |
# ? Sep 15, 2016 11:26 |
|
o_o well, all that menu item does really is install the nuget package. if it's already installed, the menuitem will go away.. but it looks like in your case it failed to run the install script. i have no idea why. you could instead try following the manual instructions at https://blogs.msdn.microsoft.com/webdev/2014/05/12/enabling-the-net-compiler-platform-roslyn-in-asp-net-applications/
|
# ? Sep 15, 2016 18:36 |
|
Ithaqua posted:Specify an explicit package path in nuget.config. I think this won't work because for this solution I need the "main" projects to put their packages in the usual place but I need the submodule project to put its packages in a different place, and apparently you can't set that per-project. ljw1004 posted:I think the most sane way is to switch over to project.json to list your NuGet dependencies (rather than project.config that you're using now). And I can't get this to work because one of my dependencies (System.Data.SQLite) has a native part and I guess isn't constructed right to work with project.json?
|
# ? Sep 15, 2016 23:55 |
|
there's a Microsoft.Data.Sqlite which works I think
|
# ? Sep 16, 2016 00:18 |
|
Hmm, I'd like to avoid totally switching a dependency just for this, if possible. But I think I got it working on my own: I migrated to Automatic Package Restore, and then changed the hint paths for the NuGet package dependencies in my .csproj files from "../packages/whatever" to "$(SolutionDir)packages/whatever".
|
# ? Sep 16, 2016 00:47 |
|
raminasi posted:Hmm, I'd like to avoid totally switching a dependency just for this, if possible. But I think I got it working on my own: I migrated to Automatic Package Restore, and then changed the hint paths for the NuGet package dependencies in my .csproj files from "../packages/whatever" to "$(SolutionDir)packages/whatever". When it comes to NuGet I'm always needing to fix package paths to use $(SolutionDir)packages instead of relative paths so things will actually work when compiling projects in subrepos.
|
# ? Sep 16, 2016 01:10 |
|
Anyone have strong opinions on Azure app service for MVC projects?
|
# ? Sep 16, 2016 03:58 |
|
After how many months now of App Service existing, Microsoft still fails the basic step of actually stopping the web app when you deploy a new version. "Deployment failed: file MyBusinessLogic.dll is in use by another process!" is not funny when "Stop the web site before you deploy a new version" is basically ASP.NET deployment 101 knowledge. Instead, you have to first stop it yourself, then run your Resource Manager deployment script, then start it again manually. Ugh. This sort of thing makes me hesitant. I love the *idea* but the implementation makes me feel like it is not really conscientiously done.
|
# ? Sep 16, 2016 08:05 |
|
I've got a winforms app with an ElementHost that I resize based on the size of a WPF UIElement inside the ElementHost. Then I get an exception sometimes when this resizing is triggered I guess this leads to an infinite loop where changing the size of the ElementHost changes the WPF UIEelement's size that thus then changes the ElementHost's size and then looping over and over I get quote:An unhandled exception of type 'System.InvalidOperationException' occurred in PresentationCore.dll I want to size the ElementHost dynamically, but I want to avoid this exception. Any ideas?
|
# ? Sep 16, 2016 08:42 |
|
So I just discovered that you if you try and set a lazy loaded navigation property to null if it hasn't previously been accessed, the change doesn't save because the next time the property is accessed it's lazy loaded using the foreign key, reverting it from null to whatever it was previously. Sources: http://stackoverflow.com/questions/25169678/set-navigation-property-to-null-ef-6 http://stackoverflow.com/questions/22557699/entity-framework-5-does-not-clear-navigation-property The workarounds are to either load eager load the property in the first place, or set the foreign key property instead of the navigation property. But doesn't this go against the idea that Entity Framework is meant to let you just work with objects without having to worry about the details of how its actually being persisted? If you're having to make a point of doing stuff like this, then surely you're having to pollute your domain with the specifics or your data access layer. It feels wrong to me. Am I wrong? I also find it strange that I've only just run into this after years of working with EF. chippy fucked around with this message at 13:23 on Sep 16, 2016 |
# ? Sep 16, 2016 11:41 |
|
Leaky abstractions are leaky! It is not nice but it is a fact of life.
|
# ? Sep 16, 2016 12:37 |
|
Baloogan posted:I want to size the ElementHost dynamically, but I want to avoid this exception. Any ideas? Assuming you want the UIElement to drive the show completely, you could put the UIElement you want to host inside a ScrollViewer to insulate it from the size changes of the ElementHost. That will allow the UIElement to dictate its size without going into an unfortunate loop of responding to the size changes, since being inside a ScrollViewer will result in the target UIElement always getting infinite as the layout available size.
|
# ? Sep 16, 2016 21:33 |
|
Is an indexer that creates a new object every time it's called as much as an API horror as I intuitively feel like it is? I was expecting Object.ReferenceEquals(customCollection[0], customCollection[0]) to always return true, but I just got burned by something because it actually always returns false.
|
# ? Sep 16, 2016 22:35 |
|
raminasi posted:Is an indexer that creates a new object every time it's called as much as an API horror as I intuitively feel like it is? I was expecting Object.ReferenceEquals(customCollection[0], customCollection[0]) to always return true, but I just got burned by something because it actually always returns false. If customCollection is a collection of structs I think this makes sense. Object.ReferenceEquals doesn't have an overload for value types which means if you're passing in two structs like this they'll be boxed separately, which means you now have two references to different boxes containing the same value which means they aren't actually the same reference. If it's a collection of objects then what the gently caress.
|
# ? Sep 18, 2016 01:14 |
|
Night Shade posted:If customCollection is a collection of structs I think this makes sense. Object.ReferenceEquals doesn't have an overload for value types which means if you're passing in two structs like this they'll be boxed separately, which means you now have two references to different boxes containing the same value which means they aren't actually the same reference. Nope, it's a reference type. In verifying this by checking the API documentation, I also learned that they're IDisposable, despite not once being used as such in a single shred of example code
|
# ? Sep 18, 2016 06:41 |
|
raminasi posted:Nope, it's a reference type. So the indexer of a collection is counter-intuitively generating new instances of a class that wants timely cleanup, and even that part is an afterthought in the documentation. Part of me doesn't want anything to do with whatever it is you're using and part of me is morbidly curious about what it is. Night Shade fucked around with this message at 07:22 on Sep 18, 2016 |
# ? Sep 18, 2016 07:20 |
|
I am legitimately curious about the intent here. Like is myClass[0] going to have a different return than myClass[1]? Is this used in some sort of factory-type manner? myFactoryClass[MyEnum.Flag] ?
|
# ? Sep 18, 2016 17:10 |
|
There wasn't an intent; I reported it on their forums and they said it was a bug. The "fix," of course, wasn't to fix the bizarre indexer behavior, but to change the way these temporary objects work so that you wouldn't notice they were temporary unless you were looking real hard. Basically, the following example code was originally given:C# code:
C# code:
So now, in the next version of the API, CommitSettingChanges will be automatically called whenever you set a property.
|
# ? Sep 18, 2016 17:43 |
|
|
# ? Jun 3, 2024 11:07 |
|
What's the point of a getter and setter if the syntax for calling them is the same as getting the variable if it were a public variable? I thought the point of getters and setters was to make sure that nothing outside that class could access the variable without going through a specific method call. Also, why can't I set a variable to be private and then make the getters and setters public? Coming from Java, this whole thing seems weird.
|
# ? Sep 18, 2016 21:46 |