Base solution for your next web application
Open Closed

Build Problem #3916


User avatar
0
jgtait created

I have just downloaded the latest version - ASP.NET MVC 5.X & jQuery (v4.5.1, .NET Framework 4.61) but am having problems with the initial build.

I have 300 errors like this -

The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. flex.Core

Any idea why? I haven't made any changes at all, just downloaded.

Thanks


17 Answer(s)
  • User Avatar
    0
    strix20 created

    Did you install the .net core 2.0 runtime and SDK? Sometimes the VS2017 update fails to install them properly.

  • User Avatar
    0
    jgtait created

    Thanks, but would I need that? I didn't download the .NET core version and was trying to open with VS 2015

  • User Avatar
    0
    aaron created
    Support Team

    For VS2015, install NETStandard.Library.NETFramework package.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @jgtait,

    You can open it with VS 2017, we work in that way with MVC 5.x project.

    Thanks.

  • User Avatar
    0
    jgtait created

    Thanks for the info, I can't get it to work in 2015 or 2017. Will keep looking though. Cheers.

  • User Avatar
    0
    jgtait created

    OK, I've now tried on my other laptop, exact same errors. Using VS 2017 and have installed .net core 2.0 runtime and SDK as suggested (though wouldn't have thought this was necessary)

    Any other suggestions?

    Thanks

  • User Avatar
    0
    aaron created
    Support Team

    Is your VS version 15.3.5?

  • User Avatar
    0
    jgtait created

    It's 15.2. I'll see it I can upgrade. :)

  • User Avatar
    0
    jgtait created

    Well, upgrading has got rid of most of the errors so moving in the right direction. I'd like to know why I need to have the most upto date version of VS to get this to build? I'm not even trying to use the ,#.NET core version so unsure why this is needed. Down to one issue now, none of my references are there in the test project. Will look at that tomorrow.

    It is very frustrating though, brand new download I would imaging working.

  • User Avatar
    0
    strix20 created

    My guess is the MVC5 version references ABP 3.0 now, which targets .net standard 2.0.

    To use .net standard 2.0 (which is part of .net core 2.0) you need the VS 2017 15.3 update (or, as others have pointed out, the appropriate VS2015 update.)

  • User Avatar
    0
    aaron created
    Support Team

    I could no longer get it to work in VS2015 with the NETStandard.Library.NETFramework package nor the NuGet client 3.6 update.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Thanks @strix20.

  • User Avatar
    0
    jseger created

    I cannot get v3.0 to work either.

    I've installed VS2017 -version 15.3.5.
    I've installed .net core 2.0 SDK and Runtime.

    It appears that any references that are .net core are having problems loading. System.Data.Common System.Runtime.Serialization.Formatters System.Runtime.Serialization.Primitives System.Security.Claims System.Xml.Path System.Xml.XmlDocument

  • User Avatar
    0
    jseger created

    I should note. The solution builds. When I start the application I get an exception.

    [BadImageFormatException: Could not load file or assembly 'netfx.force.conflicts' or one of its dependencies. Reference assemblies should not be loaded for execution. They can only be loaded in the Reflection-only loader context. (Exception from HRESULT: 0x80131058)]

  • User Avatar
    0
    aaron created
    Support Team

    Delete the bin folder in your Web project and rebuild the solution.

  • User Avatar
    0
    jseger created

    Deleting the bin folder worked.

    I still have a bunch of missing references in the solution.

  • User Avatar
    0
    aaron created
    Support Team

    It builds and runs, right?