Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Visual Studio compiler error related to NET framework

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

    Visual Studio compiler error related to NET framework

    I installed the latest version of NT8. I have all updates of Windows 10 installed. I have also the latest version of Visual Studio. When I compile from the Ninjascript editor it works fine. When I use VS and want to build in VS, I am getting the following error in the NinjaScript Editor:

    \NETFramework,version=v4\6\1AssemblyAttributes.cs Error Duplicate'global::System.Runtime.Versioning.Target FramwrokAttribute' attribute CODE CS0579


    The error code is not helpful to me

    Any help is appreciated,

    Thanks

    Ruurd




    #2
    Hello Rugosoft,

    Thank you for your note.

    The error looks like you may have an AssemblyAttributes.cs file in the Custom folder which is conflicting with a .NET file. This may occur when building something in Visual Studio

    Check in Documents > NinjaTrader 8 > bin > Custom >obj > Debug for a file named AssemblyAttributes.cs. If you find this file, delete the obj as well as the bin folders within the Custom folder.

    This can occur when trying to run the project from Visual Studio or building from Visual Studio instead of saving and running the compile in the NinjaScript Editor. When using Visual Studio if you do so there's a generated folder that gets created and that's what's causing the error. You should always compile from the Editor and not build the project in VS.

    Removing this file should allow you to compile.

    Please let us know if we may be of further assistance to you.
    Last edited by NinjaTrader_ChelseaB; 01-30-2023, 08:27 AM.

    Comment


      #3
      Thank You Kat W. This solved the problem.!

      Comment


        #4
        Brilliant!! Thank you Rugosoft for raising the question and NinjaTrader_Kate for the solution.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        581 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        338 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        103 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        554 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        552 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X