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.
    Kate W.NinjaTrader Customer Service

    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 bortz, 11-06-2023, 08:04 AM
        47 responses
        1,604 views
        0 likes
        Last Post aligator  
        Started by jaybedreamin, Today, 05:56 PM
        0 responses
        8 views
        0 likes
        Last Post jaybedreamin  
        Started by DJ888, 04-16-2024, 06:09 PM
        6 responses
        18 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by Jon17, Today, 04:33 PM
        0 responses
        4 views
        0 likes
        Last Post Jon17
        by Jon17
         
        Started by Javierw.ok, Today, 04:12 PM
        0 responses
        13 views
        0 likes
        Last Post Javierw.ok  
        Working...
        X