Could not find the entry point for windows application - winforms

How to find an entry point in the windows application as there will be a Main in the asp.net application where the execution starts to begin.

In Program.cs You will find Main() with Application.Run(new Form1());
Note : I consider you are talking about winforms.

Related

.NET Core 3.0 WPF "Copy Local" Assembly Issue

I've switched my current WPF application to .NET Core 3.0. Everything works fine, except one thing! I added a project reference to my app, and set the "Copy Local" property to "No" (I want to use it as embedded). And now, my application is compiling, seems to be running, than stop. I created a new .NET Core 3.0 WPF project, linked only one also new project, set the reference and the Copy Local to No, and it is the same.
Is it a bug or need some extra parameter in the project file? Any idea?
Thanks,
Zoltan
#mm8, trust me, it has sense. :) But never mind, I solved my problem. I replaced the ProjectReference with simple Reference + EmbeddedResource to the dll + AssemblyResolve, and it worked like in the .NET Framework project before.

Select an entry point with MageUI in the command line

This is related to this article but is not a duplicate.
I have a WPF app deployed via ClickOnce, and one of the projects in the solution is simple UI-less standalone Winforms app. This exe should live in the same directory of the main wpf exe. What happens after deploying is that this app runs instead of the wpf app. When I looked at the manifest, the entry point was set to the winforms app instead of the wpf app. I am not sure if its alphabetically related (the name of the winforms app is listed before the wpf one in the filesystem after deployment), but what I want to do is change the entry point in the manifest programmatically (via commandline arguments).
MageUI lets you define the entry point, just like RobinDotNet reveals, but is there a commandline switch to do this via mage.exe?
No. That's what I found frustrating with the command line version of Mage. Usually you can do more with the command line version of an app, not less. But there are several things MageUI can do that the command line version can't.
Here's what MSDN says about it...
Mage.exe will also use a simple set of heuristics to detect the main
executable for the application, and will mark it as the ClickOnce
application's entry point in the manifest.
I don't know what those heuristics are, but I would start by playing with the names of the exes. If all else fails, you can...
Generate the manifest with mage.
Modify the entry point in the manifest with your own code.
Re-sign the manifest with mage.

Unable to set a reference to System.Data.dll in a Silverlight client project

I created my first Silverlight application. In the client project, I want to define a Dataset object. To do so, I figured I first need to reference the System.Data namespace in the dll of the same name.
When I add a reference to the dll, I get a msg that "it was successfully added," I see thje dll in copied to the bin folder, and then it promptly removes the referenced dll from the bin folder.
Why?
There is no Dataset class in the Silverlight SDK in fact there is no System.Data namespace for Silverlight.
Silverlight only has access to fraction of the features you would find in the full .NET framework. Certainly many of these older concepts such as the DataSet whilst still useful in some places are now being replaced with new approaches such as Entity Framework.
You should consider looking in to WCF RIA Services if you want to do some serious data work with Silverlight.

Out of Browser in Silverlight2

How can I build a Stand Alone Application with Silverlight 2.
1.I know that Silverlight 3 has the Out of Browser Functionality to build such Applications. But it is in beta and I cannot wait for it.
2. I also had a look at
Desklighter(http://www.blendables.com/labs/Desklighter/Default.aspx) which helps to build a executable from a xap file. But it needs .Net Framework to run, which beats the purpose.
just build a winform app and host iexplore ocx ,
point the ocx to an html page that contains the silverlight app.
there is a dotnet example on tamir khasons blog http://khason.net/blog/stand-alone-multiplatform-silverlight-application/
but it can be achived in any language
well! if you want to go for that particular purpose i agree with daniel's solution..
now regarding #James, yep it will defeat the purpose instead try developing the host in c++ then...

XDocument Class in VB.NET

I am learning Silverlight and WPF on my own to expand my programming base. I am following this tutorial, and I am currently stuck on part 3. I am up to the point where my application requests and receives a response from Digg, but I cannot figure out how to properly dimension the XDocument class (as the tutorial shows) to read the xmlcontent that is retrieved.
Granted, the tutorial is in C# (which I know very little about), but I do not see why I cannot access this class. IntelliSense suggested replacing XDocument with Document.Run, but that got me nowhere. I also read that this class was part of the System.Xml.Linq namespace, but even trying to dimension my variable as
Dim xS as System.Xml.Linq.XDocument
Gives me nothing. Anyone know what I can do?
If I recall correctly you need to add the System.Xml.Linq dll in the project references.
What version of .Net/Visual Studio are you using? XDocument wasn't added to the framework until .Net 3.5.
As the above posters mentioned Linq is a .Net 3.5 addition.
I had a very similar problem recently trying to used linq features in what I thought was a 3.5 enabled app but my web.config was from an older project.
If you know you have 3.5 installed, try making a new project and add your code back into it.

Resources