|
Chiming in to bitch about VS2015 and package management. It's now impossible to install the package MvvmCross into a Xamarin.iOS or Xamarin.Android app. I have to open up VS2013 and use NuGet there to get things working.
|
# ? Aug 13, 2015 14:37 |
|
|
# ? Jun 7, 2024 11:39 |
|
Gul Banana posted:it's a new world out there. What do you mean by "supports .NET45"? I don't understand... There are two basic ideas: (1) .NET45 refers to the desktop framework. This can be used by a regular class library, or a DNX class library, or by any of the traditional desktop app types (e.g. console app, WPF, WinForms, ...). It can also be used by a Portable Class Library, although depending on your choice of targets you might get only a subset of .NET45. I don't know what you're targeting, but if you want .NET45 then there's definitely a ClassLibrary or PortableClassLibrary out there that you can use. (2) Theoretically it's possible to use project.json in any project type. First, for any project type, it can be used as an alternative to packages.config for referencing NuGet packages. Second, for UWP+DNX+ModernPCL only so far, it's also used as the means to reference .NET runtime+framework themselves. (in all other project types the reference to runtime+framework is implicit or done differently). The first aspect I called out isn't yet finished. But you can see it in action, e.g. start with a new console app targeting .NET46, then add this project.json and unload+reload the project. code:
|
# ? Aug 13, 2015 17:00 |
|
I am really struggling to make sense of what people speak of now with this proliferation of different types of .NET. For example, when you say "UWP+DNX+ModernPCL", what exactly do you mean? Is there a standard reference to understand the different variations? I have seen various blog posts that aim to explain but then I see other posts use different but similar terminology and get all confused. This is the first I hear of ModernPCL. On another topic, I noticed the Universal Windows Platform presentation had a tidbit that Microsoft no longer cares so much for nitpicking about UX rules, just makes recommendations. Can anyone confirm this appears to be the case in practice (and not just some dev-schmoozing in the video)? Right now, customers get all sort of headaches when we have to tell them that their apps violate Windows Phone rules and will not be accepted; not to mention Xbox, which is on a whole other level of crazy. Would be pretty sweet if this hassle is now reduced. EssOEss fucked around with this message at 17:16 on Aug 13, 2015 |
# ? Aug 13, 2015 17:11 |
|
Seconding Paket. It's not as well integrated with VS as nuget, but you can import your packages.config as a start. Also I think I should write a Type Provider for GraphQL, it looks neat.
|
# ? Aug 13, 2015 17:18 |
|
Is there any rough estimate as to when VS 2015 SP1 will come out yet? Or any way to join a beta program of sorts to get developer builds faster (like it was done for Windows 10)? I think I'll go back to VS 2013 for the time being, as I feel it's just too buggy and slow to use for daily development . There seem to be a lot more situations where the UI just hangs completely for 2-3 seconds (also freezing other VS 2015 instances for some reason), which gets really irritating after a while. Also I have to say Edit & Continue has proven rather useless to me so far:
|
# ? Aug 13, 2015 17:24 |
|
EssOEss posted:I am really struggling to make sense of what people speak of now with this proliferation of different types of .NET. For example, when you say "UWP+DNX+ModernPCL", what exactly do you mean? Is there a standard reference to understand the different variations? I have seen various blog posts that aim to explain but then I see other posts use different but similar terminology and get all confused. This is the first I hear of ModernPCL. Sorry, ModernPCL was a lazy non-standard word I used. UWP = "Universal Windows Platform" = Windows 10 DNX = ASP.NET Core 5.0 PCL = "Portable Class Library". There is a new kind of portable class library that was introduced with VS2015 (so long as you install the Win10 tools). Look at these two PCLS... The one on the left is what you're familiar with, and is how PCLs have always worked. The one on the right is what you get if you write a PCL which targets either all or a subset of .NET4.6 + Windows10 + ASP.NET Core 5.0. What's different about it is that it doesn't have a normal implicit reference to a fixed version of the .NET framework. Instead it references the .NET framework via a NuGet package. I've been informally calling this new kind a "NuPCL" or a "ModernPCL" but they're both bad names and I should find a better name...
|
# ? Aug 13, 2015 17:39 |
|
ljw1004 posted:What do you mean by "supports .NET45"? I don't understand... i mean, supports targetting the full .net 4.5 API set, such that it can be referenced by desktop applications without requiring an update to 4.6. existing class library builds can do this, as can xproj (but not for VB code). pcl cannot. therefore, i can't use project.json yet. it's not that the new stuff is bad, but like, the reality of the market.. most of our clients are using windows 7 and .net 4.5, maybe 4.5.1 or 4.5.2. you know how conservative business can be about upgrades, so it'll be maybe a year or two before i can depend on newer stuff than that (for these libraries). not quoting the rest of your post because i already understand that stuff and don't want to get in the way of the explanations
|
# ? Aug 13, 2015 17:40 |
|
SirViver posted:woe SirViver, could you email me please lwischik@microsoft.com because I'd like to put you in touch directly with the perf devs and EnC devs to dig deeper into what you observed. The general feedback we've heard has actually been that VS2015 is faster than VS2013 - faster IDE and faster build - so I suspect there's something specific going on with your machine, maybe related to a faulty upgrade/install or maybe to a third-party tool. * "When is the next VS2015 update coming out?" - sorry we haven't announced anything yet. If the past is anything to go by, updates come out quarterly. But really the intent of your question is "when will the problems you encountered be fixed?" and that requires us to identify the problems first, so please do email! * "Is there any kind of a beta program to get builds faster?" - we were releasing VS2015 builds publically all along (CTP1...6) basically like the "fast track". We released the RC, kind of like the "slow track". At some points the quality of our internal builds was too low for either track but still needed testing, so we also did private drops for folks who were willing to soldier through bad known bugs. That required a high degree of commitment! I believe the same thing will happen going forwards.
|
# ? Aug 13, 2015 18:23 |
|
Gul Banana posted:i mean, supports targetting the full .net 4.5 API set, such that it can be referenced by desktop applications without requiring an update to 4.6. I see. I mentioned that this isn't finished yet. Here's what you can do, and how to work around the "not finished yet" part... (1) Create a normal ClassLibrary targeting .NET4.5. (2) Add this project.json file, unload then reload, then build. This lets you use project.json in your class library. code:
What's not finished yet: if you try to run the result, you'll see that Json.Net (which was referenced by the class library) is needed by the app for it to run. And it's failing to pick up this fact. So you have to work around it. One way to work around it is if you release your class library as a NuGet itself, one which pulls in Json.Net as a dependency via its NuSpec. Another way is to add a reference to Json.Net from the console app itself. This same workaround is needed for any kind of reference that your ClassLibrary pulls in via NuGet. It's needed because the console app isn't itself also a project.json thing, and we only implemented transitive NuGet restore wholly within the project.json world.
|
# ? Aug 13, 2015 18:37 |
|
Bognar posted:Chiming in to bitch about VS2015 and package management. It's now impossible to install the package MvvmCross into a Xamarin.iOS or Xamarin.Android app. I have to open up VS2013 and use NuGet there to get things working. Thanks Bognar. We chatted internally and I filed this bug to track it: https://github.com/NuGet/Home/issues/1172
|
# ? Aug 13, 2015 18:43 |
|
that workaround would be sufficient for some layers of our stack, so i'll try it out some time! if project.json is going to be supported in arbitrary projects (specifically, desktop and old-ASP.NET projects), it would neatly take care of all my problems; the transitive internal+external update would just be a matter of editing a version at the top level. we could just have a script that goes through a solution and changes "OurCompany.Package.92.0" to "OurCompany.Package.93.0-pre".. Gul Banana fucked around with this message at 19:10 on Aug 13, 2015 |
# ? Aug 13, 2015 19:06 |
|
SirViver posted:Is there any rough estimate as to when VS 2015 SP1 will come out yet? Or any way to join a beta program of sorts to get developer builds faster (like it was done for Windows 10)? Microsoft doesn't do service packs anymore, they do (roughly) quarterly updates. So I'd expect VS 2015 Update 1 to come out late October/early November.
|
# ? Aug 13, 2015 19:40 |
|
ljw1004 posted:Thanks Bognar. We chatted internally and I filed this bug to track it: https://github.com/NuGet/Home/issues/1172 Awesome, thanks for looking into it!
|
# ? Aug 13, 2015 20:49 |
|
You'd think unzipping a file in a PCL would be a solved problem by now. Anybody know of a good unzipper for PCLs? I've tried a few and they seem to suck, so now I just use System.IO.Compression but I seem to have to handle extracting manually instead of just saying: "Here is a Zip file, extract its contents to this directory" and be done. The extractarchive extension method does not seem to work in a PCL (The one from system.io.compression.filesystem).
|
# ? Aug 13, 2015 21:14 |
|
I'm having trouble getting ILMerge to work. I can execute the merge fine, but at a certain point in my code a TypeInitializationException is thrown, with a CryptographicException ("Specified key is not a valid size for this algorithm") as its inner exception. My application doesn't deal with crypto at all, so I assume this is some kind of assembly resolution/loading thing. What's weird is that this exception isn't thrown from any of the assemblies that went into the merge. (Later in this code path that assembly will be called into, but it hasn't yet. The type that failed to load is called "<Module>" which I assume is CLR-speak for "who knows," and I can't figure it what it is any other way. Any ideas? e: By screwing around in the Immediate window, I have learned that this exception is thrown whenever I try to use a type found in the merged-in library. edit 2: I believe the culprit is the fact that the library I am attempting to merge in has been obfuscated. raminasi fucked around with this message at 23:31 on Aug 13, 2015 |
# ? Aug 13, 2015 23:03 |
|
Is locally hosted Katana (I had OWIN here but that's the auth stuff, right? Whoops) + WebAPI a viable solution for desktop (well, single user I guess) apps? I have a bunch of code generation tools that make writing Angular stuff really quick, I hate Windows Forms, and I'm kind of on the fence about learning WPF just for personal projects when I don't like writing UI stuff very much in the first place. I guess I'm imagining something a bit like SANZBD where the UI is all through a browser window.
RICHUNCLEPENNYBAGS fucked around with this message at 03:19 on Aug 14, 2015 |
# ? Aug 14, 2015 03:17 |
|
that's feasible. the ui might not be very nice but it's a tested approach.
|
# ? Aug 14, 2015 05:26 |
|
ljw1004 posted:... In the meanwhile, a short documentary about the EnC bug I mentioned. Start with a bog-standard ASP.NET Web Form (derived from a base class that ultimately derives from Page), with some business object members: Then EnC the Page_Load method, for example I added a dummy if (true) { } below there. The method is barely 20 lines long and contains nothing fancy; no LINQ or lambda expressions or anything. Boom, all the member fields are broken now and you will get NullRef exceptions when trying to access them. Looking at them in Watch reveals a really strange error: After some further digging it appears the fields have somehow been duplicated during the EnC recompile, quite rightfully confusing both debugger and runtime: (duplicated configBPO member not shown). Welp.
|
# ? Aug 14, 2015 09:54 |
|
HA, I found the bug! I was trying to create a minimal repro case, and the error somehow seemed to be related to the specific assembly the referenced member's type is defined in - if I put the same dummy class I used for testing in in a new class library it worked. Having members referencing both the "broken" assembly and the newly created one resulted in only the broken-assembly-members being screwed up after EnC. On a hunch I decided to make sure the assembly properties are equal between the both and suddenly I could reproduce the error even with the new class library. Turns out if you use an auto-generated assembly version number EnC breaks member references to types defined in that assembly. The repro code is literally this: Main console project... Program.cs C# code:
AssemblyInfo.cs C# code:
C# code:
|
# ? Aug 14, 2015 11:50 |
|
I am trying to POST a file with HttpClient from my PCL and I keep getting "204 No Content" back from my WebApi server. I've been scouring the internet, but I keep coming up empty with why this is. I ripped out all the using statements figuring I might dispose too soon, but no luck. It might be that I am staring too long at this already and missing something obvious. Code: code:
code:
Edit: Well I am stupid, you need to handle the files in the Controller otherwise it won't work. I don't know why I assumed I would see the files in the request. Probably because of working with NancyFX. It works now. Mr Shiny Pants fucked around with this message at 15:45 on Aug 14, 2015 |
# ? Aug 14, 2015 15:26 |
|
Captain Capacitor posted:I'm doing an internal move today to a team that has put me in the position of being able to talk to the Azure product teams more directly. I've sent a message, but this applies to anyone who has an issue. I can't guarantee anything but I can now yell at people louder. Can you get a definitive statement whether "error 19 - physical connection not usable" is a normal thing when accessing Azure SQL Database? Really, I understand that occasional interruptions are fine in Azure and we deal with it by using retry logic but interestingly enough, this and some other (timeout) exceptions are not handled by SqlAzureExecutionStrategy and we have no far not been able to determine if this is something to expect during normal operations or some abnormality to push harder to get fixed. If it's normal, we can either retry or to tell our customers it is normal Azure behavior but right now, our ops team is rather uncertain on how to even interpret this situation. Such failures occur 4-5 times a day.
|
# ? Aug 15, 2015 08:55 |
|
I've got some code that tries to start up a new app domain, then load an assembly (whose path is passed in by string), then reflect over it, then dispose of the app domain, but it fails to load the specified DLL because of dependency issues. I have to admit I don't know a lot about AppDomains and assembly loading so I'm not sure where to start looking for the issue. Ideas?
|
# ? Aug 15, 2015 20:33 |
|
I've now also managed reproduce the EnC slowness independently from my work environment; simply put, VS2015 EnC can't deal with large assemblies. I wrote a small tool that generates random classes with some properties, methods, and a member variable of the previously generated class, to have some class coupling (broken up every 10 classes, so the hierarchy doesn't get ridiculous). I let it churn out some 2000 classes that I put into a class library, which ended up being about 400K LOC that compiles to a 17.5MB assembly. That's pretty much exactly twice the size of our actual business logic assembly, but if anything it just demonstrates the issue even better. I tested this on my home machine - which is a fair bit faster than my work machine, so the results would be even worse there - with a completely fresh install of VS2015 Enterprise. Here are the results when I try to EnC some code in one of the generated classes: pre:VS2013 Start editing code: immediate Apply changes: 4 seconds VS2015 Start editing code: 63 seconds on first edit, afterwards immediate Apply changes: 1 second Note that removing the class coupling entirely significantly speeds this up (about 3 seconds to start editing), but then again a completely flat hierarchy wouldn't exactly be a realistic test. Reducing the project to "only" 1000 classes (half LOC + size) also significantly reduces the delay down to a mere 10 seconds, which is closer to the hang times I'm seeing on my work machine with our actual project. It does suggest that there are some areas in the code parser that have algorithmic complexity issues, seeing how doubling the amount of classes produces six times longer hangs. Incidentally, if I regenerate those 2000 classes while VS is open, VS2013 will immediately detect the changes and ask to reload, whereas VS2015 will reproducibly hang (presumably for 63ish seconds) before it does anything - though I didn't wait it out but force killed the process instead. In general it seems VS2015 has a lot more operations tied to some background compilation/parsing process that, if it takes long to complete, will freeze the entire UI. I believe this may also be the cause for the hanging issues I have with the New Project respectively Extensions and Updates dialogs, as both work fine without a project loaded, but hang when I first open our main project. Once the hang resolves, opening the dialog again works as it should, which is similar behavior as seen with EnC. In fact, let me just try this right now... YES, the New Project dialog also hangs on my home machine with the large generated project opened. So I think that one's confirmed too. Now, I'm not saying it is desirable to have such large assemblies in the first place, but the reality of the matter is that it does happen and that VS2013 deals with it without complaint, whereas '15 chokes and dies. Though looking at the problem also seems to suggest a common source, so maybe a single fix is all that's needed to squash a wide array of performance issues. Doesn't mean that the fix will be easy, though. @ljw1004: I'll send you the details and repro code Monday morning (CET).
|
# ? Aug 15, 2015 21:49 |
|
SirViver posted:HA, I found the bug! ... On a hunch I decided to make sure the assembly properties are equal between the both and suddenly I could reproduce the error even with the new class library. Turns out if you use an auto-generated assembly version number EnC breaks member references to types defined in that assembly. SirVivier, thanks for the clean and simple bug report. I took the liberty of filing it on github: https://github.com/dotnet/roslyn/issues/4575. (Edit: wow, more of the compiler devs are piling on. Looks like auto-generated assembly versions have wider implications.) The main EnC dev seems to have a fix for it, under testing. If he fixes it now then I guess it will get into the next VS2015 update. Edit: Thanks also for investigating the slowness. We did perf tests on projects as big as yours but we generally tried to do it on "real-world" projects rather than synthesized assemblies. Maybe our test suites were off. I look forward to your email on Monday and we'll chat further. ljw1004 fucked around with this message at 00:28 on Aug 16, 2015 |
# ? Aug 15, 2015 22:19 |
|
I'm making a boardgame in C#, and I have the following function to reset the board:code:
|
# ? Aug 16, 2015 13:05 |
|
The two ways I see are with a generic method:code:
code:
e: to call the first one: code:
code:
Kekekela fucked around with this message at 02:02 on Aug 17, 2015 |
# ? Aug 16, 2015 13:45 |
|
Boz0r posted:I'm making a boardgame in C#, and I have the following function to reset the board: You can call a constructor on an interface? Is there some activation-chicanery going on or did the actual class get anonymized away?
|
# ? Aug 16, 2015 14:19 |
|
RICHUNCLEPENNYBAGS posted:I've got some code that tries to start up a new app domain, then load an assembly (whose path is passed in by string), then reflect over it, then dispose of the app domain, but it fails to load the specified DLL because of dependency issues. I have to admit I don't know a lot about AppDomains and assembly loading so I'm not sure where to start looking for the issue. Ideas? if you use Assembly.LoadXXX methods which take a file argument, they won't automatically resolve dependencies. the methods which take an assembly *name* will look it up (and its dependencies) by the normal resolution mechanisms. you may also be able to use Assembly.ReflectionOnlyLoad().
|
# ? Aug 16, 2015 14:22 |
|
Nth Doctor posted:You can call a constructor on an interface? It's a new instance of array, set to default(IFoo) iirc.
|
# ? Aug 16, 2015 14:26 |
|
Nth Doctor posted:You can call a constructor on an interface? He's initializing a multidimensional array.
|
# ? Aug 16, 2015 14:26 |
|
dougdrums posted:It's a new instance of array, set to default(IFoo) iirc. Kekekela posted:He's initializing a multidimensional array. Christ. Of course. That will teach me to read C# before coffee.
|
# ? Aug 16, 2015 14:29 |
|
Wrong thread, oops.
|
# ? Aug 16, 2015 16:16 |
|
Gul Banana posted:if you use Assembly.LoadXXX methods which take a file argument, they won't automatically resolve dependencies. the methods which take an assembly *name* will look it up (and its dependencies) by the normal resolution mechanisms. My program exists to reflect over arbitrary assemblies... how can I deal with resolving dependencies? I think I can pretty much assume the dependencies are always in the same directory as the assembly I'm reflecting over. I don't think ReflectionOnlyLoad will work because I need to reflect into the depndencies to get some classes. It seemed like it might work to switch to LoadFrom from LoadFile (it worked in a test), but then it didn't work in the actual program. >:[ RICHUNCLEPENNYBAGS fucked around with this message at 16:45 on Aug 16, 2015 |
# ? Aug 16, 2015 16:41 |
|
RICHUNCLEPENNYBAGS posted:My program exists to reflect over arbitrary assemblies... how can I deal with resolving dependencies? I think I can pretty much assume the dependencies are always in the same directory as the assembly I'm reflecting over. The answer depends a lot on what you're aiming to do. The thing is, Assembly.Load is kind of heavyweight. It really means getting the CLR to load the assembly and do all its stuff. If you merely need metadata from the assembly, you might consider either CCI, or the newly released System.Reflection.Metadata (you can get it via NuGet) which is what the Roslyn compilers themselves use to read metadata. Here's some code I wrote that uses System.Reflection.Metadata to read all the assemblies in an appx package, and enumerate all their types: https://github.com/ljw1004/blog/blob/master/Appx/AnalyseAppxFiles/Module1.vb code:
Of course, if your code actually requires things to be properly resolved, then this lightweight approach won't help you as much since you'd have to resolve them yourself.
|
# ? Aug 16, 2015 19:56 |
|
I already have the code written that works with the regular Assembly class so really I'm trying to retro-fit it so it doesn't lock the file.
|
# ? Aug 17, 2015 01:46 |
|
I'm trying to find resources on developing an OAuth 2.0 service provider and coming up short. Everything seems to be geared around the client side of things but where can I find some kind of guide for developing the server side? So I want people to be able to use OAuth 2.0 to authenticate with our user database. Has anyone done anything like this? Any resources you can point me to?
|
# ? Aug 17, 2015 02:25 |
|
The Wizard of Poz posted:I'm trying to find resources on developing an OAuth 2.0 service provider and coming up short. Everything seems to be geared around the client side of things but where can I find some kind of guide for developing the server side? So I want people to be able to use OAuth 2.0 to authenticate with our user database. Has anyone done anything like this? Any resources you can point me to? Never done it but I've heard of Dotnetopenauth which seems to support both. http://dotnetopenauth.net/
|
# ? Aug 17, 2015 02:39 |
|
RICHUNCLEPENNYBAGS posted:Never done it but I've heard of Dotnetopenauth which seems to support both. http://dotnetopenauth.net/ I came across that but I can't find any documentation whatsoever to support the theory that it can be used to build an OAuth 2.0 server. This is the frustration I keep encountering, it seems like no one in the world is interested in building their own OAuth server, they're only interested in talking to existing OAuth servers like Google and Facebook etc.
|
# ? Aug 17, 2015 03:03 |
|
The Wizard of Poz posted:I came across that but I can't find any documentation whatsoever to support the theory that it can be used to build an OAuth 2.0 server. This is the frustration I keep encountering, it seems like no one in the world is interested in building their own OAuth server, they're only interested in talking to existing OAuth servers like Google and Facebook etc. Here you go.
|
# ? Aug 17, 2015 04:34 |
|
|
# ? Jun 7, 2024 11:39 |
|
RICHUNCLEPENNYBAGS posted:Here you go. Open ID is not the same as OAuth 2.0. Edit: and even if it were, the documentation on same is virtually non-existent. putin is a cunt fucked around with this message at 04:55 on Aug 17, 2015 |
# ? Aug 17, 2015 04:50 |