How to solve a Flex 4.5.1 runtime exception that did not happen in Flex 4.1 - flex4.5

I am trying to upgrade a Flex 4.1 web application to Flex 4.5.1 but am having the following runtime issue:
I have a an mx tree-panel control, with underlying datasource of an xml.
When calling maintree.app_tree.validateNow() (to refresh the UI)
I now get a runtime exception
return types dont match
virt mx.collections::ISort mx.collections::ICollectionView/get mx.collections:ICollectionView::sort()
over mx.collections::Sort mx.controls.treeClasses::HierarchicalCollectionView/get sort()
The same code works with Flash Builder 4.0 and FlashDevelop 4.0B that I upgraded to use 4.5.1 SDK.
Having a look at Flex 4.5 and Flex 4.5.1 release notes didn't provide any 'breaking changes'
http://opensource.adobe.com/wiki/display/flexsdk/Flex+4.5+Backwards+Compatibility
Has anyone else encountered this?
How can I overcome the exception?

Related

The current .NET SDK does not support targeting .NET Core 2.1.3

I want to make sure that my application is built against .NET Core 2.1.3, so I installed version 2.1.401 of the SDK and set the TargetFrameworkVersion of the project to 2.1.3.
This gives me the following error message (emphasis mine):
C:\Program Files\dotnet\sdk\2.1.401\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(137,5): error NETSDK1045: The current .NET SDK does not support targeting .NET Core 2.1.3. Either target .NET Core 2.1 or lower, or use a version of the .NET SDK that supports .NET Core 2.1.3.
So the interesting thing is that the build seems to use the freshly installed SDK (2.1.401) - which is supposed to support .NET Core 2.1.3 - but it is still complaining that .NET Core 2.1.3 is not supported. This doesn't make sense to me...
What could be wrong here?
(For my answer I will assume that you're building a framework-dependent application and not a self-contained application.)
You cannot set 2.1.3 directly as the <TargetFramework> in the .csproj because it's just the patch version that's different.
Only the following entries are allowed: https://learn.microsoft.com/en-us/dotnet/standard/frameworks
So in your case the .csproj needs to have <TargetFramework>netcoreapp2.1</TargetFramework>.
But as Damir pointed out in the comment, you can force the version if you also add <RuntimeFrameworkVersion>2.1.3</RuntimeFrameworkVersion> to the <PropertyGroup>.
You can check the effect of this change if you open the "Manage NuGet Packages" dialog and look at the version of the metapackage Microsoft.NETCore.App that is implicitly being used.
Without the <RuntimeFrameworkVersion> it's 2.1.0, otherwise it should be 2.1.3.
But aside from that there are sometimes other factors as well that will implicitly determine the version that's being used.
For example, if you want to build a self-contained application you have to specify the <RuntimeIdentifier> which will also force the framework version to 2.1.3 because it will publish the highest patch runtime on your machine automatically.
That said, I wouldn't recommend to set any <RuntimeFrameworkVersion> manually for the most part.
Starting with .NET Core 2.1 all framework-dependent applications (that are built using .NET Core 2.0 or later) will automatically roll forward to the latest minor version that is installed if the original version of the runtime isn't present on the system.
So if you only have .NET Core 2.1.3 installed on the target system, your framework-dependent .NET Core 2.1.0 application will automatically use that runtime and framework.
You can read a bit more about the .NET Core version selection mechanism here.
I had the same issue and and was at the time using visual studio 2017 and had latest .net sdk installed(which at time of the post 2.2.401). Installing sdk 2.2.107 and adding it to the global.json file (I have it my project root) solved
the problem for me.
{
"sdk": {
"version": "2.2.107"
}
}
Also see this related post on the visual studio developer community forum.

Asp.Net MVC How to prevent HttpCompileException exception

In our production server there are sometimes an exception that occurs suddenly:
Error: System.Web.HttpCompileException (0x80004005): External component has thrown an exception
The solution is to clean the Asp.Net Temporary files or recycle the IIS pool.
But we don't know the reason for this exception, so that we can't prevent it happens in the future again and again, and this exception occurs one time in month approximately.
What could be the reason for it? And what is a good solution to handle it?
You can resolve these issues by upgrading to the .NET Framework 4.6.1
Alternatively, You can uninstall updates 3098779 and 3097997 if you have upgraded your system to the .NET Framework 4.6 or have installed Visual Studio 2015 from a fully updated .NET 4.5.1 or 4.5.2 system that has updates 3098779 and 3097997 installed.

Running executables produced by F# 3 under Mono

I would like to compile an executable using the F# 3.0 command-line compiler, and then run it under Mono.
The code starts to execute, but Mono dies almost immediately complaining it cannot load System.Core. Googling this suggests that I should be targeting .net 3.5, and not version 4. Further Googling suggests that the F# compiler used to take option --cli-version, but it no longer seems to accept that.
I am sure there is a way, seeing as if I were to use MSVC there would be somewhere I could click to set the desired CLR version.
What should I do please? Many thanks.
EDIT:
I have tried targeting .net 3.5 on a simpler project developed in the MSVC GUI. The executable then asked for FSharp.Core 2.0.0, and got further than before. The F# 3 compiler seems to come with a .net 2.0 core library, so I would expect that it is supposed to be able to generate code compatible with obsolete versions of the framework. The question this leaves is "if the GUI can do it, how do I do the same thing from the command line", please?
If you're using F# 3.0 there's no reason not to use .NET 4.0 by default (unless, of course, you need to interoperate with existing .NET 2.0 or 3.5 assemblies).
Which version of Mono are you running on? F# 3.0 requires Mono 2.10 or newer, but I'd strongly suggest you use Mono 3.0 or newer.

Can I compile and run a MVC1.0 application under .NET 4.0?

We have an MVC1.0 application that is compiled against and runs with .Net Framework 3.5.
The application was scanned for security and the scanning organisation reported
Microsoft ASP.NET ValidateRequest Filters Bypass Cross-Site Scripting
Vulnerability
https://community.qualys.com/docs/DOC-3495
What versions of Microsoft ASP.NET are vulnerable? Microsoft has
confirmed that ASP.NET versions 1 and 2 are both vulnerable.
Additionally, Qualys has confirmed that ASP.NET version 3 is also
vulnerable, as it includes the vulnerable component from version 2 by
default. We have tested this in our Labs and confirmed the exploit
works on a fully patched version 3.
We are already upgrading our application to MVC3, but that takes some more time to finish.
Is there any chance I can run and compile a MVC1.0 application against .NET 4.0?
This may arise compatibility issues, Even though there are very few dependencies over the .net framework.
You can refer the following posts.
Is ASP.NET MVC 1 forwards compatible with ASP.NET MVC 2?
ASP.Net MVC 1.0 in Visual Studio 2010
From what I understand, anything that runs on .NET 3.5 should function and complile just fine in .NET 4.0, with perhaps some warnings about depreciated functions, but they will still work.
In case you are still curious/not comfortable, there are some tools available to help verify dependencies and other items such at NDepend
Best recommendation... try it! I can't think of any other reason than what Tommy mentioned about deprecated functions. Also, you can update most of your references with
Update-Package
without arguments.
If it compiles fine, do a quick test run over the views. If nothing seems broken, then it probably isn't.

When I click to open a ViewPage or a ViewUserControl Visual Studio 2008 hangs for me

When I double click on a ViewPage or a ViewUserControl in Visual Studio 2008 the whole application hangs for me, I have no idea why...
The only error log I can find in the Event Log is this:
.NET Runtime version 2.0.50727.3053 - Fatal Execution Engine Error (7A035E00) (80131506)
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Googling the hex error (7A035E00) and/or the version number 2.0.50727.3063 brings up some promising results.
The most likely fix appears to be to reinstall the .NET framework.
http://www.techdreams.org/microsoft/fixing-the-error-net-runtime-version-20507273053-fatal-execution-engine-error-net/370-20080926
Make sure you are using the latest version of the .NET framework. The 2.0 version is available at Microsoft .NET Framework Version 2.0 Redistributable Package (x86), and the 3.5 version is available at Download Microsoft .NET Framework 3.5

Resources