When I create a new Silverlight Application (C# if that matters) using Silverlight 4 (with or without WCF RIA Services Checked) and open the MainPage.xaml in the designer I receive an Unhandled Exception has occurred. Stack is below. This is on an unmodified project.
I have uninstalled all Silverlight and reinstalled the tools listed above. I the same error when I open the App.xaml file as well. When I compile it completes without error, however when I run the application it always comes up that Silverlight is not installed.
I have installed Visual Web Developer Express 2010 (v10.0.30319.1 RTMRel) and Silverlight Tools for VS2010 (v10.0.30319.332) on a 32bit Windows XP machine. The IDE works fine in other regards, only issue seems to be with xaml files.
Anybody run into this?
System.NullReferenceException
Object reference not set to an instance of an object.
at Microsoft.Expression.Platform.Silverlight.SilverlightDomainManager.CreateDomainCore()
at Microsoft.Expression.Platform.Silverlight.SilverlightDomainManager.CreateDomainInitial()
at Microsoft.Expression.Platform.Silverlight.SilverlightPlatformCreator.Initialize()
at MS.Internal.Platform.SilverlightPlatformImpl.Initialize()
at MS.Internal.Package.VSIsolationProviderService.RemoteReferenceProxy.EnsurePlatformInitialized()
at MS.Internal.Package.VSIsolationProviderService.RemoteReferenceProxy.EnsurePlatformInitialized()
at MS.Internal.Package.VSIsolationProviderService.CreateIsolationProvider(String originalIdentifier, Boolean isGlobal, String identity, FrameworkName frameworkName, AssemblyName appAssemblyName, IVsHierarchy hierarchy)
at MS.Internal.Package.VSIsolationProviderService.CreateIsolationProviderWorker(String identifier, IServiceProvider provider)
at MS.Internal.Package.VSIsolationProviderService.CreateIsolationProvider(String identifier, IServiceProvider provider)
at MS.Internal.Providers.VSDesignerContext.CreateIsolationProvider(IServiceProvider provider, IVsHierarchy hierarchy)
at MS.Internal.Providers.VSDesignerContext.<>c__DisplayClass1.b__0(IsolationProviderProxy i)
at MS.Internal.Providers.IsolationProviderProxy.get_RealProvider()
at MS.Internal.Providers.IsolationProviderProxy.add_UnhandledException(UnhandledExceptionEventHandler value)
at MS.Internal.Designer.DesignerPane.LoadDesignerView()
After hours of pulling my hair out I found the following post that led me on the path to solving my problem. I had to uninstall the standard version of silverlight and then install the developer runtime and it solved all my problems. Go Figure.
Posted by Microsoft on 2/26/2010 at
12:40 PM Is what is likely
happening is that you have the
standard version of the Silverlight
runtime and you need to install the
developer runtime for Silverlight.
Blend will install and run with the
standard verison of the silverlight
runtime, but Visual Studio requires
the developer version of the runtime.
This issue is fixed in the RTM version
of Visual Studio.
For now, if you hit this issue, please
install the silverlight developer
runtime from this link:
http://go.microsoft.com/fwlink/?LinkId=146060
download Silverlight_Developer.exe
Did you install the latest Silverlight SDK?
http://www.microsoft.com/downloads/details.aspx?FamilyID=40ef0f31-cb95-426d-9ce0-00dcfabf3df5&displaylang=en
Related
I intend to build simple Winform application just to allow user to automate their file creation and store the last filled form in a file to keep it for next run.
thus, I'm not interested in creating installer for this simple Winform application. I expected to only compile it to .exe and let it run on other computers.
I develop the application using VS2019 community with target .net 4.6.1
It won't run on computer with Windows 10 with only .net framework 4.8
We are not able to install framework 4.6.1 since it says an earlier version of .net framework is already installed.
Should I recompile my application with target .net framework 4.8?
Can't I compile my application to run on any computer which at least has 4.6.1 or newer? without installer.
(I don't really understand the .net framework backward compatibility truly mean)
my application uses:
library of user32.dll for SetForegroundWindow function
to create .ini file
Finally it works. Even compiled to target .NET 4.6.1 still work on .NET 4.8 computer actually.
The issue is because my application is targeting to another application using interope COM interface, while the license is not sufficient for the user to allow COM interface.
we notice it when we finally create a pure simple windows form, then step-by-step compiling while adding each feature.
Sorry Every Body for this silly case. And my special apologize to evry1falls for spending your time.
I'm thinking to change this Question or delete it. because it is not the issue at all
The Actual Issue is:
I created Windows Form Application starting from a blank Project. And I don't know that the .NET Unhandled Exception is not activated by default.
When created from Windows Form Project Template, the Unhandled Exception message shown.
I created another Question about it: Here
I have a windows forms application running on .NET 4 that communicates with a WCF web service. The application is compiled to run with X86 as the platform target. The application was deployed on a network of hundreds of computers, and there are only a couple, that happen to have a windows XP version installed (Microsoft Windows Embedded POSReady 2009, service pack 3 to be more precise) that launch the error "Common Language Runtime detected an invalid program" upon calling the constructor of the WCF proxy class object. In order to isolate the problem, I created a small console application that the only thing it does is to call the constructor of the web service proxy class, like:
ItesWebServiceClient m_webService = new ItesWebServiceClient("BasicHttpBinding_IItesWebService");
And the exception is then thrown:
stacktrace output
The same console app runs on all other computers, even the ones with the same windows version.
We've already tried repairing and re-installing .Net framework on the failing computers but so far nothing fixes it. I also used the PEVerify tool to validate MSIL and ran the code in debug mode (no optimizations) as suggested on other posts.
Is there something I'm missing? could there be a key .Net framework component or hot fix that needs to be installed?
Thanks
Ok it turns out that the person who was re-installing the .Net framework on the machines was always installing the .net client profile version. Uninstalling that version and installing the full .net 4 version solved it.
I am really new to Xamarin.Forms and trying to learn using this nice tutorial.
I have managed to set up everything in Visual Studio 2017 Community Edition and successfully deploy to both emulated and physical devices (Android only).
During various trials, I have noticed that some XAML errors are not highlighted and build is successfully performed, but XAML failed at runtime, crashing the app. E.g. misspell a style name or any an attribute value.
Running in debug mode will just hang the app. Breaking it indicates the following line:
public partial class MainPage : global::Xamarin.Forms.ContentPage { [System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Forms.Build.Tasks.XamlG", "0.0.0.0")]
private void InitializeComponent() {
// this is the last line from my code that hands when XAML is invalid
this.LoadFromXaml(typeof(MainPage));
}
}
Resuming the execution shows a hint of what is wrong (no fancy details as provided by the new VS2017 exception interface):
Unhandled Exception:
Xamarin.Forms.Xaml.XamlParseException: occurred
Question: Is there a way to catch invalid XAML errors earlier? Or at least obtain more relevant information? Or is this a known limitation of Xamarin.Forms?
To make things worse, autocomplete for attribute values does not seem to work in VS2017 (it works in VS2015), but this is another issue for another question.
Further details about installed software:
Microsoft Visual Studio Community 2017
Version 15.0.26228.9 D15RTWSVC
Microsoft .NET Framework
Version 4.6.01586
Installed Version: Community
Xamarin 4.3.0.795 (aece090)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin.Android SDK 7.1.0.41 (9578cdc)
Xamarin.Android Reference Assemblies and MSBuild support.
Xamarin.iOS and Xamarin.Mac SDK 10.4.0.123 (35d1ccd)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
To catch XAML errors at compilation time you have to add one line to AssemblyInfo.cs :
[assembly: XamlCompilation(XamlCompilationOptions.Compile)]
More information on this can be found here.
Unfortunately Xamarin.Forms XAML intellisense support in VS is not like for WPF or SilverLight, it's very limited currently. One suggestion can be to write your ui in code, this way you will get a feedback faster and if you are very new to Xamarin.Forms XAML you can get familiar with it much easier because of intellisense in code behind.
Another option is to use IDE extensions, in your case as I understand it is VS 2017 for Windows so it will not help you, but for Xamarin Studio for MC you have tools like mfractor, that build to solve the issues you addressed.
I have a web in ASP.Net Core (4.6.1 framework) that uses Facebook and MS external login that I created with Visual Studio 2015 and opened in the new Visual Studio 2017 that came out yesterday. VS2017 made a few changes related to the csproj, project.json, etc files.
The site compiled and executed fine except for one part. If I did a Facebook or Microsoft external login, the site displayed this trap:
FileLoadException: Could not load file or assembly 'System.Diagnostics.DiagnosticSource, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
System.Net.Http.WinHttpHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
AggregateException: Unhandled remote failure.
Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler+<HandleRemoteCallbackAsync>d__6.MoveNext()
The url in the browser showed that it was attempting to return from the external login to the local (https://localhost:44321/signin-facebook?code=... or /signin-microsoft).
The version number of the System.Diagnostics.DiagnosticSource.dll (and System.Net.Http.dll) is 4.6.24705.1.
I started a new VS2017 project from scratch with Facebook and MS login added and it worked fine - getting me logged on without the trap. The dll's were the same versions.
Comparing the two csproj files showed differences but nothing obvious (nothing related to System dlls):
What solved it for me was to add a NuGet reference to System.Net.Http (version 4.3.1) to the newly migrated project.
https://www.nuget.org/packages/System.Net.Http/
The recommended answer did not resolve my issue. I was getting this error when trying to reference a .Net 4.6.2 lib in a .Net Core 2 project.
To resolve the issue I had to add the Microsoft.Windows.Compatibility nuget package.
Credit to: https://medium.com/#ans_ashkan/asp-net-core-and-windows-event-log-75770a80a666
In References 'System.Diagnostics.DiagnosticSource' not included in solution
On installing latest version "5.0.1" of 'System.Diagnostics.DiagnosticSource' in NUget solved my issue. Hope it will fix yours also.
I had the same issue and weirdly enough, problem resolved with updating Microsoft.ApplicationInsights versions. 2.20.0 is the version to go (for me). I don't know the connection between these packages but that's what happened.
People using .NET Core web applications monitored with Application Insights hosted in App Services facing this issue
This when .NET Core web application has a dependency on 'System.Diagnostics.DiagnosticSource%u2019 binary and has this binary file deployed to /wwwroot/ folder, which is rare.
Work Around: Please set previous version of monitoring extension by changing this app setting if you experience the above issue: ApplicationInsightsAgent_EXTENSIONVERSION=2.8.24
After doing this please restart the application.
Here is the source
I am trying to open silverlight project. It has 12 projects inside.last two projects does not load properly. i am trying to reload those two project a pop up window opened and that is asking download silverlight runtime(silverlight developer.exe). while downloading this software it is giving error message : A 64 bit version of silverlight is already installed.
I closed visual studio i reopned same project again last two projects not loadded properly.
Can you please give me any suggestions why i am getting issue.
I think you developed the application in old version of silverlight. And you laptop/computer has now the latest version.
OR
You have corrupted silverlight runtime. So remove the current installation and re-install silverlight runtime again.