Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

coremvcjquery using netcore11 fails to download nuget packag #3367


User avatar
0
mdonogma created

trying clean template on osx to confirm abp runs cross platform now. using visual studio for mac

Package Abp.Zero.Ldap 2.0.1 is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Package Abp.Zero.Ldap 2.0.1 supports: net46 (.NETFramework,Version=v4.6) One or more packages are incompatible with .NETCoreApp,Version=v1.1.

????


4 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    I suppose Visual Studio for Mac tries to download conditionally added packages too which is not a true behaviour.

    See this: <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/blob/dev/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Core/MyCompanyName.AbpZeroTemplate.Core.csproj#L40">https://github.com/aspnetzero/aspnet-ze ... csproj#L40</a>

    It's added like that:

    <ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
        <Reference Include="System" />
        <Reference Include="Microsoft.CSharp" />
        <Reference Include="System.Configuration" />
        <Reference Include="System.ComponentModel.DataAnnotations" />
        <Reference Include="System.Transactions" />
        
        <PackageReference Include="Abp.Zero.Ldap" Version="2.1.2" />
      </ItemGroup>
    

    It should be only added when you target to net framework 4.6.1. But seems that it tries to download Ldap package even it doesn't use it, strange.

    If you created your solution with .net core 1.1. you don't need these packages. You can safely delete all conditionally added packages (in all .csproj files) and related code.

    Why we have done like that is to provide a solution than has more features when you select .net framework 4.6.1 but also works with .net core with less features (LDAP and SignalR are not available for .net core for example). AspNet Zero can run cross platform, but developing cross platform is a bit different, sorry.

  • User Avatar
    0
    mdonogma created

    Can you add these kind of notes to your release notes so we know in advance.

    Each time we run into issues like this it takes hours to troubleshoot which would be unnecessary if checked in advance on windows and osx.

    As a customer i'd expect to download a new template and it builds on Windows or OSX since you are not cross platform.

    what other issues can i expect with running this on osx?

  • User Avatar
    0
    mdonogma created

    suggest you guys create a seperate template for osx developers with the conditional references excluded.

    <a class="postlink" href="https://docs.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files">https://docs.microsoft.com/en-us/nuget/ ... ject-files</a>

    Conditional references only work in visual studio 2017 not Visual Studio for Mac (osx) or visual studio code (osx). (This means everyone who tries to use your "cross platform project" templates are going to run into issues when building for first time.

    suggest your source an osx machine (even cloud based like macincloud) - that way you can do some automated test runs for osx environment before shipping releases.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @Mdonogma,

    Actually in our website we have this text:

    .Net Framework 4.6.1 / .Net Core 1.1 (cross platform support)
    

    We wanted to say that AspNet Zero can run on different platforms but we didn't mean to say that it can be developed because as you metioned we didn't try it on MAC. Maybe we are not clear about this and really sorry for the problems you had.

    The reason we didn't create a seperate solution for VS for MAC is we have some code sections in the project which is not supported in .Net core like LDAP and SignalR.

    But I assume you can run AspNet Zero on MAC after removing conditionaly dependencies. If you have tried it and had other problems, we can help you to get you started with AspNet Zero as fast as possible.

    Thanks.