Is the core CLR of Silverlight 4 the same as 'classic' .Net 4? - silverlight-4.0

I ask this because I have been chasing down a co/contravariance issue in SL4. I asked it twice in SO and got answers along the lines of - "It just works, make sure you are using .net 4". I tried my failing code (and the samples people posted) in SL4 and .Net 4 and the results are different (work in .net fail in sl). So is SL4 actually running on a < 4 version. Or are there just some features left out (accidentally or on purpose). If so what features
What about SL 5?

The core compiler in Silverlight 4 supports Covariance and Contravariance, but the framework interfaces (ie: IEnumerable<T>) unfortunately were not marked as covariant (note in the docs that it isn't IEnumerable<out T> as it is in .NET 4).
Silverlight 5 fixes this, "officially" supporting Covariance and Contravariance.

Related

which dll or namespace of ASP.net 4 (MVC5) should not be present in ASP.5 (MVC6) after migration

Hi I understood from post available at below link
http://docs.asp.net/en/latest/conceptual-overview/aspnet.html
http://weblogs.asp.net/scottgu/introducing-asp-net-5
that ASP.Net 5 no longer required to have system.web.dll, what are the other namespace it should not have.
My MVC 5 project references system.web.extension.dll perticulary JavaScriptSerializer Class, i am not sure if should be using that or if there is any other alternative to it.
there are other namespaces also start with system.web as below should that also be avoided
using System.Web.Http;
using System.Web.Http.ModelBinding;
using System.Web.OData;
using System.Web.OData.Routing;
is it that only system.web.dll should not be used in ASP.net 5 MVC 6 project.
I believe anything beginning system.web.* shouldn't be there and has been replaced with something within Microsoft.AspNet.
I'm not sure how you are planning on doing the migration but the article Migrating From ASP.NET MVC 5 to MVC 6 on docs.asp.net covers the process pretty well.
Essentially it advises starting with a blank MVC 6 / Asp.Net.Core 1 (the new name for Asp.Net 5) project and porting the content over.
That way you can lean on the compiler to tell you things that aren't available. A lot of what can / can't will depend on wether its Framework 4.6 or .NET Core 1.0 (prevously .NET Core 5).
As for JavaScriptSerializer I believe the recomended alternative is Newtonsoft.Json.
Depending what you use it for there is also now JsonOutputFormatter and JsonInputFormatter
I haven't been through the full process yet, but I strongly suspect moving to Framework 4.6 will be the easier destination :-)

T4MVC alternatives for ASP.NET 5?

T4MVC is not supported yet or ever in ASP.NET 5. Is there any other similar solution ? I need strongly typed views and controllers names.
Looks like there is a side project called R4MVC but it hasn't been updated in 5 months.
R4MVC is a Roslyn code generator for ASP.NET MVC vnext apps that
creates strongly typed helpers that eliminate the use of literal
strings in many places
As Stafford Williams pointed out, a side project was started a long time ago, but was stalled due to (at the time) breaking changes in the Roslyn compiler.
Luckily, the project was revived, and R4MVC has just released it's first alpha build, with more changes coming soon.
While the project works somewhat differently, and isn't using t4 templates, the end result is the same, and we're working to achieve feature parity with T4MVC in the near future.

Loading CLR 2.0 dlls in to CLR 4.0 process, any downsides?

Are there any downsides, like perf, or debugging capability reduction if I'm shoving in a dll linked with the 2.0 CLR?
I'd love to move all our sources to .NET 4.0, but some of our partners are using our base code in 2.0, which is forcing us to either keep multiple binaries of our stuff, or stay within 2.0 realms.
Any ideas on how to use MSBuild to make multiple copies of the same project in 2.0 and 4.0 would be awesome as well.
No, perf and debuggability is not going to be affected.
The only downside is that the assembly will run with .NET framework assemblies that it has never been tested with. The odds that this causes problems is very small but not nil. The .NET 4 assemblies have a handful of obscure bug fixes that alter behavior. And add a few bugs itself. These cases are way too obscure to list or take seriously.

WCF Data Services Toolkit with CTP2

Im trying to use the WCF Data Services Toolkit together with Microsoft WCF Data Services March 2011 CTP 2 for .NET Framework 4 and Silverlight 4. But When i use this release i get multiple compile errors regarding missing reference to System.Data.Services. Of course i can't reference that assembly, since i already reference Microsoft. Data.Services and will get alot of "multiple types" error. To me it seems like WCF toolkit has been compiled against the System.Data.Services that ships with .Net 4 and the compiler needs a reference even though im not using any types from that assembly.
So how on earth is Jonathan Carter in the MIX 11 session able to reference only Microsoft.Data.Services and use the toolkit without any compilation errors?
As expected, the answer is to recompile the source yourself against the CTP binaries.
http://wcfdstoolkit.codeplex.com/workitem/13
I ended up doing that myself, after watching and rewatching the MIX11 session a thousand times following whatever Jonathan did down to the last detail.

Resources needed to start windows programming with C++CLI

I'm already new in C++CLI , although I have been working on VB and C++ for a long time , but I need to start a projects on CLI using it's visual screens and easy codes (just in windows) , But I can't find any good Resource or book to start windows programming (I mean codes that you can give it to buttons or texts without using c++ classes) ,
Can I find any of them ?
thank you
I can suggest you 3 books ( I used them ):
Foundations of C++/CLI The Visual C++ Language for.NET 3.5
Pro Visual C++/CLI and the .NET 3.5 Platform
C++/CLI in Action
They are in order of difficulty.
The first and the 2nd are introductory and advance respectively.
The 3rd is great for advanced topics, like interop, mixed-mode coding etc..
Not sure what you have done in your work with C++ without classes, it is C with classes :). If you want to write Windows Program in C, Programming Windows, 5th Edition written by Charles Petzold could be a good start. Then you can decide which managed GUI to learn. Winform is mature with no future planned beyond .Net 4.0, while WPF is growing and is the main focus of Microsoft.