• 0

.NET Framework


Question

Recommended Posts

  • 0

This .NET Framework will be a pain in the A$$ at first, just like any update that needs bringing into the Windows Community, all Microsoft are trying to do is get it out to almost everyone in the world who owns a Microsoft PC. So soon everyone will have .NET Framework. Of course it's going to be a rough ride at first. Just like anything else ?_?

  • 0
This .NET Framework will be a pain in the A$$ at first, just like any update that needs bringing into the Windows Community, all Microsoft are trying to do is get it out to almost everyone in the world who owns a Microsoft PC. So soon everyone will have .NET Framework. Of course it's going to be a rough ride at first. Just like anything else ?_?

Quite true. Aside from the whole getting users to download it thing, there are other pains that go with .NET for the time being.

For one thing, it's not QUITE as Windows version-neutral as Microsoft would like everyone to believe. Some of my users using XP Home have had some significant problems with .NET code that runs perfectly fine on XP Pro.

And for another, there are a lot of really weird crashing bugs that pop up for no particular reason. For example, changing a selection in a list view will always throw an ArgumentOutOfRangeException. There's nothing actually wrong (you can catch the exception and discard it, and everything will work as it should), but it will still crash the app.

Once the minor stuff like that gets worked out, .NET will be a lot less painful.

--

Danny Smurf

  • 0

Danny, thats also quite true. But what I think Microsoft is trying to do, is get programmers to start getting used to the .NET functionality and the way .NET works, all for the release of Longhorn. Which I'm pretty sure will be using .NET Framework in it's coding. So I guess what Microsoft are trying to do is say "Get ready, look at whats coming"

  • 0
I KNOW that Longhorn's version of Explorer.exe is a .NET app. Play with the latest build and when it crashes, an unhandled .NET exception is displayed. Cool!

I think that's just the CLR debugger that has been integrated along with the normal JIT debugger. Try crashing another normal Win32 app and see if the same message appears as for the Explorer crash.

  • 0
I KNOW that Longhorn's version of Explorer.exe is a .NET app. Play with the latest build and when it crashes, an unhandled .NET exception is displayed. Cool!

Well, my suspicion is that explorer.exe is still same C++ code just with the "Use Managed Extensions for C++" option ticked on build... or maybe I'm totally wrong!

  • 0
I think longhorn is just an XP makeover right now, not hardly enough code to call it a .NET OS

It hardly has any managed code... to be a .NET OS, it should have at least 50%+ managed code... which it clearly doesn't.

But, we still see some shipping Microsoft apps with managed code- eg UUDI, XP Media Center, the Outlook BCM... which is pretty encouraging. And since WinFS is supposed to be based on Yukon, which is supposed to use .NET v2.0, then maybe WinFS will be written in managed code too!

  • 0
It hardly has any managed code... to be a .NET OS, it should have at least 50%+ managed code... which it clearly doesn't.

YET.

Don't forget, it's not even in the beta stage yet. And we don't know how much managed code is really in there. It may just have "the "Use Managed Extensions for C++" option ticked on build," but that would indeed make it managed code, since that will compile it to run on the .NET Framework. And that's all it takes to make a lot of programs managed. We have no idea how much of that Microsoft has done.

--

Danny Smurf

  • 0
And for another, there are a lot of really weird crashing bugs that pop up for no particular reason. For example, changing a selection in a list view will always throw an ArgumentOutOfRangeException. There's nothing actually wrong (you can catch the exception and discard it, and everything will work as it should), but it will still crash the app.

Hey Danny Smurf,

I read your post and checked out that behavior. The reason you're getting that exception is because the list view item that is being deselected is firing the event, as well as the item that is being selected. Just test the SelectedIndices.Count before you do anything.

private void listView1_SelectedIndexChanged(object sender, System.EventArgs e)
{
    if( listView1.SelectedIndices.Count < 1 )
        return;
    // other code

That is probably expected behavior since the event is firing when the index changes, just once for each item being selected and deselected.

Cheers!

  • 0
Having that option ticked doesn't mean it is managed code - it could see be using traditional C++, and not taking any advantages of the Managed Extensions.

It doesn't matter if it's written in "traditional" or not. Ticking that option compiles it to run on the Framework. The language it was actually written in is irrelevant. Managed code is "managed" because the CLR "manages" its execution.

--

Danny Smurf

  • 0
I read your post and checked out that behavior. The reason you're getting that exception is because the list view item that is being deselected is firing the event, as well as the item that is being selected. Just test the SelectedIndices.Count before you do anything.

Thanks for that. That's... rather odd behaviour. I'd think that the event should only fire once, since the selected index is only changing once (one unselect + one select = one change). I'll give that code you posted a try. Thanks. :)

--

Danny Smurf

  • 0
how many people actally have the framework? I mean it wasn't in windows xp but it came on on xp SP1 and it wasn't on windows 2000 sp3. How many people actually have the framework? If microsoft wants people to programme with .NET then they have some work to do...

I have it, it is on windows update, and I always install it after a clean install :p

2k3 is the only OS now to come with it atm :p

Before .net was final, the framework was 34mb, so they have improved it a lot :p

Test: .net framework

  • 0
It doesn't matter if it's written in "traditional" or not. Ticking that option compiles it to run on the Framework. The language it was actually written in is irrelevant. Managed code is "managed" because the CLR "manages" its execution.

--

Danny Smurf

I don't agree - if you are still doing all the memory allocation and other low-level activities yourself, then the CLR does much less and it's not really managed code.

  • 0
I don't agree - if you are still doing all the memory allocation and other low-level activities yourself, then the CLR does much less and it's not really managed code.

But you're not actually doing the memory management yourself any more. When a C++ project is compiled with managed extensions, it's subject to garbage collection just like every other program running on the Framework. The new calls allocate memory from the managed heap, just like new (or equivalent) does in all .NET languages, and the delete calls do the same thing as the Dispose method... everything except the actual memory reclamation.

As for the other "low-level activities," you can do most of them yourself in any .NET language, using Interop. Just because the ability to do low-level things is there does not mean that the app is no longer managed.

--

Danny Smurf

  • 0

From MSDN:

Compiling with the /clr option does not alter the semantics of an existing C++ program. For example, C++ classes do not become garbage collected or seamlessly interoperate with Visual Basic unless they are modified. Such features are only provided for Managed Extensions classes
  • 0

Not unless they've changed its classes to __gc classes or wrapped them in __gc classes, and made other modifications. I would think it would probably be easier and a better idea just to rewrite explorer and other shell features from scratch. It would more than likely eliminate some unknown security problems with the legacy code.

Edited by weenur
  • 0
Not unless they've changed its classes to __gc classes or wrapped them in __gc classes, and made other modifications. I would think it would probably be easier and a better idea just to rewrite explorer and other shell features from scratch. It would more than likely eliminate some unknown security problems with the legacy code.

*THWAPS his forehead* Of course, you're right. My bad. I forgot about switching the classes to __gc. Been spending a bit too much time in C# for the last year.

Which, unless I am mistaken, means that Explorer isn't managed code yet!

Well, we still don't know that, do we? I haven't seen the source code, and I'm willing to bet no one else outside of Microsoft has either. Maybe Microsoft has made all of the appropriate changes already, and Explorer is managed.

As for rewriting the shell from scratch... probably a good idea. Unlikely to happen. The shell isn't just explorer.exe. There are a lot of DLLs that go with the shell, which would also need to be rewritten. And since a good portion of the Windows API resides in those DLLs, changing or rewriting them breaks every app that depends on them (including any app that adds something to recent docs, any app which calls the Browse For Folder dialog, and any app that calls a SHGet function)... which is something I don't THINK Microsoft is going to do. They're including legacy graphics code for older apps in Longhorn, which means other legacy code (shell included) is probably staying as well, which probably means it's going to be impossible to completely scrap and rewrite any system-level components (shell included).

That is, unless Microsoft's got something huge up their sleeve that's going to fix the legacy problem.

--

Danny Smurf

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • About bloody time. I have got PRs with hundred of files and the Web UI just struggling to even load the pages.
    • I wonder if it was applying secure boot certificates/dbx files?
    • I recently tried edge. It seems a lot better. A lot of the junk in it is gone. It seems less bloated and snappy.
    • Lethal fake phone chargers are still being sold on Amazon and eBay, UK watchdog warns by Paul Hill Credit: Pexels The UK consumer rights organization, Which?, is claiming that “potentially lethal knock-off chargers” are still being sold on online marketplaces seven years after it exposed the danger of these chargers. In its latest investigation, it bought 15 USB phone chargers from several online marketplaces and found they were missing key information, meaning they cannot be legally sold in the UK. Which? bought the 15 chargers from seven online marketplaces. These were Amazon (including Amazon Haul), AliExpress, B&Q Marketplace, Debenhams Marketplace, and eBay. It said that the chargers were so badly made that anyone using them was at risk of electric shock. Over half the chargers also posed fire and explosion risks. Of the chargers purchased, one was a fake Apple USB-C 35W power adaptor charger. To confuse buyers, the box was branded with an Apple logo, but testing found it to be a fake. Further testing picked up arcing sounds after 10 seconds of use, where a current jumps between two parts of the electrical circuit, which can cause fires, explosions, or electric shock. The manufacturers of this particular charger also put modeling clay inside it to make it feel more weighty, robust, and genuine. Not all of the chargers were technically faulty; however, some were missing key packaging, markings, and documentation, meaning they can’t be sold in the UK legally. Which? said that it is now campaigning alongside a coalition of safety groups and businesses for new laws that make online marketplaces responsible for ensuring the safety of products that they choose to list on their websites. It also said the government needs to start using powers under the Product Regulation and Metrology Act, which was adopted last July, to impose safety requirements on online marketplaces via secondary legislation, but so far, there have been delays. No matter what country you are in, be sure to properly research what you are buying and only buy authentic chargers to prevent fires. You can read more about Which?’s research here.
    • Visual Studio finally gets long-awaited feature that developers will love by Usama Jawad Visual Studio Code is Microsoft's popular, lightweight, open-source code editor, it is actually Visual Studio that is the company's flagship integrated development environment (IDE). Although the IDE already offers a boatload of useful features for developers, Microsoft has finally introduced a long-requested capability that will be loved by many. While developers have already been able to create Git pull requests (PRs) directly within Visual Studio for the past couple of years, it had not been possible to review a PR without switching to the browser, until now. Microsoft revealed in December 2025 that it is working on UX that enables developers to do just that, and fast-forward to June 2026, and Visual Studio finally has native capabilities to open and inspect a PR, discuss feedback, and wrap up the review, all without switching to the browser. This integration works for both GitHub and Azure DevOps (including on-prem). Developers have access to multiple surfaces to open a PR, including Git Repository, Git Changes, and the Git menu in Visual Studio. Once you open a PR, all the important details will be immediately visible to you, from where you can navigate to various levels of granularity and branch states, depending on the reviews that you are engaged in. As you would expect, you also get a diff view that enables you to see code changes inline or side-by-side in a separate panel. You can also review commit-by-commit. Additionally, this UX fosters collaboration as you can leave comments, reply to threads, and resolve conversations easily. Naturally, you can also leverage Copilot to apply a code suggestion to fix a potential issue. When you are done, you have the ability to approve, complete, and merge the PR. This is a pretty major feature as it has been requested heavily for the past few years. You can try it out in Visual Studio 2026 version 18.7, made available here recently. Microsoft plans to enhance this experience further in future releases with comment filtering, a timeline of PR activity, and more.
  • Recent Achievements

    • Week One Done
      Timaximus earned a badge
      Week One Done
    • One Month Later
      Timaximus earned a badge
      One Month Later
    • Rookie
      FBSPL went up a rank
      Rookie
    • First Post
      davidbazooked earned a badge
      First Post
    • Week One Done
      davidbazooked earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      499
    2. 2
      PsYcHoKiLLa
      174
    3. 3
      +Edouard
      160
    4. 4
      Steven P.
      84
    5. 5
      ATLien_0
      75
  • Tell a friend

    Love Neowin? Tell a friend!