Developing Azure .Net 4.0 Applications - .net-4.0

Presently .Net 4.0 is not supported on Azure.
This thread indicates that you will not be able to use .Net 4.0 with VS 2010 until it is supported in the cloud.
http://social.msdn.microsoft.com
I'd like a way to start developing Azure applications locally utilizing the new features of .Net 4.0. I am fine with not being able to deploy these applications until Azure officially supports it.
From within the VS IDE; I tried replacing .Net 3.5 application references with newer .Net 4.0 references and Visual Studio crashes.
Does anyone have any suggestions?
Thanks,
Paul

An update to this old thread. .Net 4.0 has been supported since Azure SDK 1.2

Some features from .NET 4.0 can be added to your application through other means. For example, the recently-released Reactive Extensions for .NET 3.5 SP1 includes a back ported release of Parallel Extensions. And the Managed Extensibility Framework contains the Lazy class and Tuple struct. As long as you set "Copy Local" to true on any libraries that you add, your application should run (and deploy) successfully.
Obviously, these aren't all the features that are new in .NET 4.0, and not all of them will can be ported back to .NET 3.5 like these can.

Related

Is .NET Core compatible with COM?

I am trying to understand the implications of starting a project on .NET core. One of the requirement I am facing is to use a .NET library that is leveraging COM.
So is COM supported by .NET core (obviously, assuming the OS is Windows)?
I understand that .NET Core is built for interoperability between different OS. But I was wondering if it is to be expected that there are Windows-specific features that may be included for the windows releases such as COM compatibility.
Thanks for your help.
.NET Core is developed to be cross platform and running also on Linux and Mac. COM is a windows specific thing and will not be supported in .NET Core

Accessing the .Net 4.0 Com from .Net 1.1 Project [duplicate]

I have external .net library compiled with .net framework 4 (it's provider moved recently to .net 4)
My code currently runs on .net framework 3.5
How to use that external library in my application ?
Moving whole application to .net 4 needs time and testing, so maybe in a future i will do that, but now, what are the possibilities ?
There are no possibilities, the CLR version that comes with .NET 3.5 cannot load 4.0 assemblies. The metadata format was changed. You have to force your app to use the .NET 4.0 CLR version. Do so by recompiling it with VS2010, targeting 4.0, or by using a .config file that contains the <requestedRuntime> element to ask for "v4.0".
Compatibility for .NET 4.0 is excellent btw.
While you cannot load the .Net DLL directly, you can wrap it in a COM interface, and load that COM interface in your .Net 3.5 process.
See Using a .NET 4 Based DLL From a .NET 2 Based Application
For more background information, Microsoft originally added In-Process Side-by-Side in .Net 4 to better support the scenario where an application loads add-ins via COM, and the add-ins were written with various versions of .Net. The ability to load .Net 4 DLLs in a .Net 3.5 process is just a nice side effect of that.

How can you get a .NET 4.5 website to run on IIS6?

I've got an old Windows 2003 server running IIS 6, and I chose .net 4.5 for my latest web app. Problem is I can't get it to run on the server...
.NET 4.0 framework is installed. I've run aspnet_regiis and deployed the website. I gave it it's own application pool. But I'm getting the following error:
The 'targetFramework' attribute in the <compilation> element of the Web.config
file is used only to target version 4.0 and later of the .NET Framework (for
example, '<compilation targetFramework="4.0">'). The 'targetFramework' attribute
currently references a version that is later than the installed version of the
.NET Framework. Specify a valid target version of the .NET Framework, or install
the required version of the .NET Framework.
I saw the requirements for .NET 4.5 as requiring Windows Server 2008 or later, but I'm seeing lots of posts with people just needing to configure the routing for MVC4 so it seems like this should be possible.
So any ideas what I need to do in order for this to work?
EDIT: The strange thing is we are using an ASP.NET Web API site that works just fine... but that should require .net 4.5...
.Net 4.5 cannot be installed on Windows Server 2003.
Instead, you should use MVC 4.0 on .Net 4.0, which will work fine.

Building 4.5 code without the 4.5 runtime installed on the machine?

We have a large & complex system running under .Net 4.0. We want to start introducing code written for .Net 4.5, but can't (yet) assume that .Net 4.5 is installed on all the developer machines, build machines and test labs. So I'm looking for a way to compile certain projects in MSBuild using assemblies which are available on disk, on machines which have only .Net 4.0 installed.
Per the documentation it seems possible. The 4.5 reference assemblies are available in the msbuild environment, and I've been experimenting with the TargetFrameworkVersion, FrameworkPathOverride and TargetFrameworkMoniker attributes, but so far without success.
Any hints, suggestions or working samples would be most helpful.
To build a .NET Framework 4.5 application, you must also have the .NET Framework 4.5 reference assemblies.
Installation
The .NET Framework 4.5 replaces the common language runtime (CLR), targets, tasks, and tools of the .NET Framework 4 without renaming them. Essentially, it creates a modified and improved .NET Framework 4.

Backwards compatability between .Net 2.0/3.5 and 4.0

I have an app that I've upgraded from 3.5 to 4.0. But not all my 3rd party assemblies are built on .net 4.0. How is it that I'm still able to reference those assemblies without any problems? For instance, if another assembly references system.dll 2.0, and my upgraded project references system.dll 4.0 how does .net handle this?
Obviosly this wasn't a problem upgrading between 2.0 and 3.5 because they use the same BCL and CLR versions, but 4.0 uses a completely different BCL and CLR right?
Here's an example. I have an app built using WF (Windows Workflow) in v3.5. I've upgraded the app to v4.0, but I wasn't required to implement all the breaking changes in the new version of workflow. It still using the old 3.5 version of WF.
.NET 4.0 can reference .NET 2.0 assemblies, but the reverse is not true.
.NET 4.0 assemblies support everything that 2.0 had, but adds in things like optional parameters, dynamic types, and etc...
So, since 2.0 doesn't have anything that 4.0 doesn't, 4.0 can easily support 2.0.
BCL and CLR are different but not completely different. Basically they worked hard to not break backwards compatibility.
You could also force your 3rd party assemblies to run under 3.5, as described in this post.