Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Upgrading Custom Assembles to .Net 8/9

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • MiCe1999
    replied
    Originally posted by bltdavid View Post

    Correct.

    Realize most commercial assemblies will connect to some
    internet host somewhere to verify your license with them.

    Otherwise, as far as nefarious intentions from your commercial
    assembly, that's more paranoia than reality.

    Reputable vendors simply don't do that.
    Rhetorical question: how one figures who is reputable? That's the issue that NT should look more into as it affects third party business, IMO. One bad apple can spoil the whole platform. On the other hand, my distrust pushed me to learn C# and I love the NT platform, thanks in big part to AI.

    Leave a comment:


  • bltdavid
    replied
    Originally posted by MiCe1999 View Post
    My impression is that custom assembly can do anything that ninjatrader process can, including connecting to any internet hosts. Is that not correct?
    Correct.

    Realize most commercial assemblies will connect to some
    internet host somewhere to verify your license with them.

    Otherwise, as far as nefarious intentions from your commercial
    assembly, that's more paranoia than reality.

    Reputable vendors simply don't do that.

    Leave a comment:


  • MiCe1999
    replied
    Originally posted by bltdavid View Post

    Unless you can be much more specific with your concerns,
    I would say, yes, you are generally uninformed, and, uh,
    quite wrong.

    Have you any experiences that made you feel this way?

    What happened?

    Come, sit down on the couch ...

    My impression is that custom assembly can do anything that ninjatrader process can, including connecting to any internet hosts. Is that not correct?

    Leave a comment:


  • bltdavid
    replied
    Originally posted by MiCe1999 View Post
    Interesting thread. From the user POV, I avoid assemblies made by others, including commercial, because of perceived lack of security/inability to control what assembly can do. Am I wrong about that?
    Unless you can be much more specific with your concerns,
    I would say, yes, you are generally uninformed, and, uh,
    quite wrong.

    Have you any experiences that made you feel this way?

    What happened?

    Come, sit down on the couch ...

    Leave a comment:


  • MiCe1999
    replied
    Interesting thread. From the user POV, I avoid assemblies made by others, including commercial, because of perceived lack of security/inability to control what assembly can do. Am I wrong about that?

    Leave a comment:


  • Leeroy_Jenkins
    replied
    Personally, I think we won't see NT9 anytime soon, at least not the PC version. We live in the mobile/web era, sadly, and most efforts will be focused there.​

    Leave a comment:


  • bltdavid
    replied
    Originally posted by ntbone View Post
    In hindsight it makes sense that NinjaTrader hasn't switched to .net8/9. Those frameworks do support WPF and WPF apps can typically be ported over but there .Net API's that are going to be different and it would break the addon eco system for all addon's that are external assemblies. They would all need to be rebuilt and republished.
    Moving away from .NET Framework to .NET Core would surely
    happen only on a future major new release, like NT9 or NT10.

    And, absolutely, I'd thoroughly expect the .NET Core version of
    NT9/10 to break absolutely everything before it -- just like NT8
    broke everything before it.

    C'est la vie.



    Leave a comment:


  • ntbone
    replied
    Originally posted by NinjaTrader_Jesse View Post
    Hello ntbone,

    NinjaTrader currently uses C# 9 however that won't require you to update anything in your code, your existing code will work. Changing the target framework in visual studio will cause problems so you would not want to do that specifically. When you install NinjaTrader the NinjaTrader.Custom project already targets the correct framework and should not be modified. Keep in mind C# version is not the same as .net version. NinjaTrader uses C# language version 9, .net framework version 4.8
    I was referring to assemblies that are external to NinjaTrader that are then added as references (or by other means). I was not referring to any changes to the NinjaTrader.Custom project.

    Leave a comment:


  • ntbone
    replied
    For those looking to use the latest language version in their external assemblies you set
    Code:
    <TargetFramework>net48</TargetFramework>
    <LangVersion>9.0</LangVersion>
    This will allow you to use the latest language features. This is for the new SDK style project. If you do not set a language version, Visual Studio will default to 7.3.

    In hindsight it makes sense that NinjaTrader hasn't switched to .net8/9. Those frameworks do support WPF and WPF apps can typically be ported over but there .Net API's that are going to be different and it would break the addon eco system for all addon's that are external assemblies. They would all need to be rebuilt and republished.

    Leave a comment:


  • bltdavid
    replied
    Originally posted by ntbone View Post
    The latest release notes for 8.1.4 include "The NinjaScript Editor has been updated to support C# 9"

    Does this mean that NinjaTrader supportes C# version 9 the language, but not .net 9?
    Correct.

    Originally posted by ntbone View Post
    ​When building custom assemblies, does it need to target net48?
    Yes.

    Leave a comment:


  • bltdavid
    replied
    Within the .NET universe, Microsoft has muddied the waters a bit.

    '.NET 4.8' is shorthand way of saying 'version 4.8 of the .NET Framework'.

    The others, such as '.NET 8', are usually just versions of the much
    newer '.NET Core' libraries.

    '.NET Framework' and '.NET Core' are two completely different things.

    NinjaTrader has always used .NET Framework, since it came first, ya
    know, like, almost 25 years ago when .NET itself first came out.

    .NET Core represents an attempt to modernize and make a more
    portable set of class libraries, but they are wildly incompatible with
    the older .NET Framework libraries.

    Seeing NinjaTrader port their codebase to .NET Core would be an
    amazing accomplishment, but I suspect that may never happen.

    'Porting code' can be extremely non-trivial if it really means an almost
    total rewrite, which is probably what the NT engs would have to do.

    But, we can always hope NT9 is secretly in progress and represents
    a rewrite using the new .NET Core libraries -- since .NET Framework
    has been considered legacy and obsolete for quite some time, there
    is no future left in that direction.

    -=o=-

    And, yes, the C# language has a version number that has absolutely
    nothing to do with any of the version numbering you see in any of
    the .NET version numbers in any of the various .NET class libraries
    in any .NET world in any .NET universe you've ever been a part of.

    If the numbers happen to be the same, that's just a coincidence.



    EDIT: A extended note about the muddy waters: Microsoft is trying
    to rebrand/recast the phrasing '.NET Core' as simply '.NET' -- which
    potentially adds more confusion to new comers unaware of the naming
    hell that preceded this consolidated name approach. This kinda does
    work, though, because .NET Framework is obsolete and .NET Core
    (since it's cross-platform) is the only direction for the future.
    Last edited by bltdavid; 02-19-2025, 09:59 AM. Reason: Add note on current naming hell landscape, typos

    Leave a comment:


  • NinjaTrader_Jesse
    replied
    Hello ntbone,

    NinjaTrader currently uses C# 9 however that won't require you to update anything in your code, your existing code will work. Changing the target framework in visual studio will cause problems so you would not want to do that specifically. When you install NinjaTrader the NinjaTrader.Custom project already targets the correct framework and should not be modified. Keep in mind C# version is not the same as .net version. NinjaTrader uses C# language version 9, .net framework version 4.8

    Leave a comment:


  • pjsmith
    replied
    Yep - C#, the language syntax. Totally different from the framework, which is still 4.8 - You'll never see .net 9, lol

    Leave a comment:


  • ntbone
    started a topic Upgrading Custom Assembles to .Net 8/9

    Upgrading Custom Assembles to .Net 8/9

    NinjaTrader has recently upgraded to using C# 9. I proceeded to upgrade and rebuild my custom assemblies but in doing so they no longer load.

    I took a clean copy of NinjaTrader and my simplest assembly containing one class that has no references to any NinjaTrader types. With the target framework set to net48 it loads as expected but when set to net8.0, net9.0, net8.0-windows or net9.0 windows I get the following error.

    Unable to retrieve type info for 'NinjaTrader.NinjaScript.AddOnBase' from assembly...

    The latest release notes for 8.1.4 include "The NinjaScript Editor has been updated to support C# 9"

    Does this mean that NinjaTrader supportes C# version 9 the language, but not .net 9? When building custom assemblies, does it need to target net48?

Latest Posts

Collapse

Topics Statistics Last Post
Started by hunghnguyen2016, Today, 08:00 PM
0 responses
6 views
0 likes
Last Post hunghnguyen2016  
Started by cbentrikin, Today, 03:49 PM
0 responses
11 views
0 likes
Last Post cbentrikin  
Started by MiCe1999, 04-14-2025, 06:54 PM
7 responses
76 views
0 likes
Last Post b.j.d
by b.j.d
 
Started by NISNOS69, Today, 02:20 PM
0 responses
18 views
0 likes
Last Post NISNOS69  
Started by hunter7, Today, 01:09 PM
0 responses
27 views
0 likes
Last Post hunter7
by hunter7
 
Working...
X