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 DayTradingDEMON, Today, 09:28 AM
        2 responses
        15 views
        0 likes
        Last Post DayTradingDEMON  
        Started by Stanfillirenfro, Today, 07:23 AM
        8 responses
        23 views
        0 likes
        Last Post Stanfillirenfro  
        Started by navyguy06, Today, 09:28 AM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by cmtjoancolmenero, Yesterday, 03:58 PM
        8 responses
        32 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by helpwanted, Today, 03:06 AM
        2 responses
        22 views
        0 likes
        Last Post NinjaTrader_LuisH  
        Working...
        X