Referenced library is registered as other nuget reference in Nuspec using VS 2017 Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experienceDifferences between nuget-packing a csproj vs. nuspecNuGet - adding group dependencies in .nuspec file when using the “Create New NuGet Package after each build” packageNuGet Packages are missingVisual Studio incorrectly referencing assembly from nuget package /build directoryVS 2017 RC : I Can not update NETStandard.Library in NugetNuget scripting in VS 2017Force project references to be included in netstandard nuget packagePackage on build in VS 2017 does not pack referenced assembliesHow to remove the dependencies section from nuspec file in the generated nuget package using msbuild 15Is there a way to get the latest version of a dependent package in NuGet 3.x through a .Nuspec file?

How is simplicity better than precision and clarity in prose?

How are presidential pardons supposed to be used?

Why don't the Weasley twins use magic outside of school if the Trace can only find the location of spells cast?

Stars Make Stars

What is the electric potential inside a point charge?

Interesting examples of non-locally compact topological groups

How did the aliens keep their waters separated?

Losing the Initialization Vector in Cipher Block Chaining

Mortgage adviser recommends a longer term than necessary combined with overpayments

What to do with post with dry rot?

Can't figure this one out.. What is the missing box?

Limit for e and 1/e

Complexity of many constant time steps with occasional logarithmic steps

If A makes B more likely then B makes A more likely"

Aligning matrix of nodes with grid

Replacing HDD with SSD; what about non-APFS/APFS?

What did Darwin mean by 'squib' here?

Keep going mode for require-package

ELI5: Why do they say that Israel would have been the fourth country to land a spacecraft on the Moon and why do they call it low cost?

Why is "Captain Marvel" translated as male in Portugal?

Is above average number of years spent on PhD considered a red flag in future academia or industry positions?

Writing Thesis: Copying from published papers

I'm thinking of a number

How to market an anarchic city as a tourism spot to people living in civilized areas?



Referenced library is registered as other nuget reference in Nuspec using VS 2017



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
The Ask Question Wizard is Live!
Data science time! April 2019 and salary with experienceDifferences between nuget-packing a csproj vs. nuspecNuGet - adding group dependencies in .nuspec file when using the “Create New NuGet Package after each build” packageNuGet Packages are missingVisual Studio incorrectly referencing assembly from nuget package /build directoryVS 2017 RC : I Can not update NETStandard.Library in NugetNuget scripting in VS 2017Force project references to be included in netstandard nuget packagePackage on build in VS 2017 does not pack referenced assembliesHow to remove the dependencies section from nuspec file in the generated nuget package using msbuild 15Is there a way to get the latest version of a dependent package in NuGet 3.x through a .Nuspec file?



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















So I have Project B referencing on Project A. Both are .net standard libraries. I want to create a nuget package using VS 2017.
I simply filled Properties->Package settings by checking "Generate Nuget Package on build" on Project A.



I even added for Project B



 <PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>


But once I build and nuget package for Project A is created. It displays as Project B is another nuget package reference. if i unzip the nupkg file, in the nuspec, I can see following lines



 <dependencies>
<group targetFramework=".NETStandard2.0">
<dependency id="ProjectB" version="1.0.0" exclude="Build,Analyzers" />
<dependency id="NETStandard.Library" version="2.0.3" exclude="Build,Analyzers" />
</group>
</dependencies>


you can see that projectB is taken as nuget package reference. On install it fails also saying "cannot find ProjectB nuget"
Why is this happening? is it a bug in VS 2017?
I even added below settings in ProjectA that it should include ProjectB as dll which works fine. But despite that it also register as nuget dependency



<Target Name="IncludeP2PAssets">
<ItemGroup>
<BuildOutputInPackage Include="..ProjectBbinReleasenetstandard2.0ProjectB.dll" />
</ItemGroup>
</Target>


my project A csproj file doesnt have any packagereference as Project B, as below it is set as Projectreference



 <ItemGroup>
<ProjectReference Include="..ProjectBProjectB.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="NETStandard.Library" Version="2.0.3" />
</ItemGroup>









share|improve this question






























    0















    So I have Project B referencing on Project A. Both are .net standard libraries. I want to create a nuget package using VS 2017.
    I simply filled Properties->Package settings by checking "Generate Nuget Package on build" on Project A.



    I even added for Project B



     <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
    <IsPackable>false</IsPackable>
    </PropertyGroup>


    But once I build and nuget package for Project A is created. It displays as Project B is another nuget package reference. if i unzip the nupkg file, in the nuspec, I can see following lines



     <dependencies>
    <group targetFramework=".NETStandard2.0">
    <dependency id="ProjectB" version="1.0.0" exclude="Build,Analyzers" />
    <dependency id="NETStandard.Library" version="2.0.3" exclude="Build,Analyzers" />
    </group>
    </dependencies>


    you can see that projectB is taken as nuget package reference. On install it fails also saying "cannot find ProjectB nuget"
    Why is this happening? is it a bug in VS 2017?
    I even added below settings in ProjectA that it should include ProjectB as dll which works fine. But despite that it also register as nuget dependency



    <Target Name="IncludeP2PAssets">
    <ItemGroup>
    <BuildOutputInPackage Include="..ProjectBbinReleasenetstandard2.0ProjectB.dll" />
    </ItemGroup>
    </Target>


    my project A csproj file doesnt have any packagereference as Project B, as below it is set as Projectreference



     <ItemGroup>
    <ProjectReference Include="..ProjectBProjectB.csproj" />
    </ItemGroup>

    <ItemGroup>
    <PackageReference Include="NETStandard.Library" Version="2.0.3" />
    </ItemGroup>









    share|improve this question


























      0












      0








      0








      So I have Project B referencing on Project A. Both are .net standard libraries. I want to create a nuget package using VS 2017.
      I simply filled Properties->Package settings by checking "Generate Nuget Package on build" on Project A.



      I even added for Project B



       <PropertyGroup>
      <TargetFramework>netstandard2.0</TargetFramework>
      <IsPackable>false</IsPackable>
      </PropertyGroup>


      But once I build and nuget package for Project A is created. It displays as Project B is another nuget package reference. if i unzip the nupkg file, in the nuspec, I can see following lines



       <dependencies>
      <group targetFramework=".NETStandard2.0">
      <dependency id="ProjectB" version="1.0.0" exclude="Build,Analyzers" />
      <dependency id="NETStandard.Library" version="2.0.3" exclude="Build,Analyzers" />
      </group>
      </dependencies>


      you can see that projectB is taken as nuget package reference. On install it fails also saying "cannot find ProjectB nuget"
      Why is this happening? is it a bug in VS 2017?
      I even added below settings in ProjectA that it should include ProjectB as dll which works fine. But despite that it also register as nuget dependency



      <Target Name="IncludeP2PAssets">
      <ItemGroup>
      <BuildOutputInPackage Include="..ProjectBbinReleasenetstandard2.0ProjectB.dll" />
      </ItemGroup>
      </Target>


      my project A csproj file doesnt have any packagereference as Project B, as below it is set as Projectreference



       <ItemGroup>
      <ProjectReference Include="..ProjectBProjectB.csproj" />
      </ItemGroup>

      <ItemGroup>
      <PackageReference Include="NETStandard.Library" Version="2.0.3" />
      </ItemGroup>









      share|improve this question
















      So I have Project B referencing on Project A. Both are .net standard libraries. I want to create a nuget package using VS 2017.
      I simply filled Properties->Package settings by checking "Generate Nuget Package on build" on Project A.



      I even added for Project B



       <PropertyGroup>
      <TargetFramework>netstandard2.0</TargetFramework>
      <IsPackable>false</IsPackable>
      </PropertyGroup>


      But once I build and nuget package for Project A is created. It displays as Project B is another nuget package reference. if i unzip the nupkg file, in the nuspec, I can see following lines



       <dependencies>
      <group targetFramework=".NETStandard2.0">
      <dependency id="ProjectB" version="1.0.0" exclude="Build,Analyzers" />
      <dependency id="NETStandard.Library" version="2.0.3" exclude="Build,Analyzers" />
      </group>
      </dependencies>


      you can see that projectB is taken as nuget package reference. On install it fails also saying "cannot find ProjectB nuget"
      Why is this happening? is it a bug in VS 2017?
      I even added below settings in ProjectA that it should include ProjectB as dll which works fine. But despite that it also register as nuget dependency



      <Target Name="IncludeP2PAssets">
      <ItemGroup>
      <BuildOutputInPackage Include="..ProjectBbinReleasenetstandard2.0ProjectB.dll" />
      </ItemGroup>
      </Target>


      my project A csproj file doesnt have any packagereference as Project B, as below it is set as Projectreference



       <ItemGroup>
      <ProjectReference Include="..ProjectBProjectB.csproj" />
      </ItemGroup>

      <ItemGroup>
      <PackageReference Include="NETStandard.Library" Version="2.0.3" />
      </ItemGroup>






      visual-studio-2017 nuget .net-standard nuspec






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 8 at 14:56







      batmaci

















      asked Mar 8 at 14:50









      batmacibatmaci

      2,42643052




      2,42643052






















          1 Answer
          1






          active

          oldest

          votes


















          0














          When packing a project, project to project references are considered by default as nuget package references. I can think of two reasons why this is a good thing.



          1. it's recommended to pack one assembly per package

          2. to simplify development experience for package authors

          Let's consider these two reasons



          1. it's recommended to pack one assembly per package

          Imagine there's some utility assembly utility.dll and I use it in my package, PackageA. If I put both PackageA.dll and utlity.dll in my package, but later create a PackageB which also contains utility.dll, then there will be conflicts if a single project uses both PackageA and PackageB because there will be two different utility.dlls. By having one assembly per package, there would be a PackageA and PackageB, both of which depend on different versions of the utility package, and NuGet can use it's versioning rules to pick one.



          1. to simplify development experience for package authors

          Imagine I have PackageB which depends on PackageA, and I want to make a change that requires changes to both PackageA and PackageB. If PackageB has a PackageReference to PackageA, that means I have to guess what changes I'm going to need in PackageA to finish the changes in PackageB, change, commit, pack and publish PackageA, then change PackageB to use the new version of PackageA. However, if my guess about the needed changes in PackageA were wrong, then I'll need to again change, commit, pack, publish PackageA and then change PackageB to use the new, new version. It's slow and painful to make a multi-package feature when using package references.



          However, by making PackageA a project reference from PackageB, I can modify PackageA and the changes are immediately available in PackageB without having to create multiple versions of PackageA.nupkg.






          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55065663%2freferenced-library-is-registered-as-other-nuget-reference-in-nuspec-using-vs-201%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            When packing a project, project to project references are considered by default as nuget package references. I can think of two reasons why this is a good thing.



            1. it's recommended to pack one assembly per package

            2. to simplify development experience for package authors

            Let's consider these two reasons



            1. it's recommended to pack one assembly per package

            Imagine there's some utility assembly utility.dll and I use it in my package, PackageA. If I put both PackageA.dll and utlity.dll in my package, but later create a PackageB which also contains utility.dll, then there will be conflicts if a single project uses both PackageA and PackageB because there will be two different utility.dlls. By having one assembly per package, there would be a PackageA and PackageB, both of which depend on different versions of the utility package, and NuGet can use it's versioning rules to pick one.



            1. to simplify development experience for package authors

            Imagine I have PackageB which depends on PackageA, and I want to make a change that requires changes to both PackageA and PackageB. If PackageB has a PackageReference to PackageA, that means I have to guess what changes I'm going to need in PackageA to finish the changes in PackageB, change, commit, pack and publish PackageA, then change PackageB to use the new version of PackageA. However, if my guess about the needed changes in PackageA were wrong, then I'll need to again change, commit, pack, publish PackageA and then change PackageB to use the new, new version. It's slow and painful to make a multi-package feature when using package references.



            However, by making PackageA a project reference from PackageB, I can modify PackageA and the changes are immediately available in PackageB without having to create multiple versions of PackageA.nupkg.






            share|improve this answer



























              0














              When packing a project, project to project references are considered by default as nuget package references. I can think of two reasons why this is a good thing.



              1. it's recommended to pack one assembly per package

              2. to simplify development experience for package authors

              Let's consider these two reasons



              1. it's recommended to pack one assembly per package

              Imagine there's some utility assembly utility.dll and I use it in my package, PackageA. If I put both PackageA.dll and utlity.dll in my package, but later create a PackageB which also contains utility.dll, then there will be conflicts if a single project uses both PackageA and PackageB because there will be two different utility.dlls. By having one assembly per package, there would be a PackageA and PackageB, both of which depend on different versions of the utility package, and NuGet can use it's versioning rules to pick one.



              1. to simplify development experience for package authors

              Imagine I have PackageB which depends on PackageA, and I want to make a change that requires changes to both PackageA and PackageB. If PackageB has a PackageReference to PackageA, that means I have to guess what changes I'm going to need in PackageA to finish the changes in PackageB, change, commit, pack and publish PackageA, then change PackageB to use the new version of PackageA. However, if my guess about the needed changes in PackageA were wrong, then I'll need to again change, commit, pack, publish PackageA and then change PackageB to use the new, new version. It's slow and painful to make a multi-package feature when using package references.



              However, by making PackageA a project reference from PackageB, I can modify PackageA and the changes are immediately available in PackageB without having to create multiple versions of PackageA.nupkg.






              share|improve this answer

























                0












                0








                0







                When packing a project, project to project references are considered by default as nuget package references. I can think of two reasons why this is a good thing.



                1. it's recommended to pack one assembly per package

                2. to simplify development experience for package authors

                Let's consider these two reasons



                1. it's recommended to pack one assembly per package

                Imagine there's some utility assembly utility.dll and I use it in my package, PackageA. If I put both PackageA.dll and utlity.dll in my package, but later create a PackageB which also contains utility.dll, then there will be conflicts if a single project uses both PackageA and PackageB because there will be two different utility.dlls. By having one assembly per package, there would be a PackageA and PackageB, both of which depend on different versions of the utility package, and NuGet can use it's versioning rules to pick one.



                1. to simplify development experience for package authors

                Imagine I have PackageB which depends on PackageA, and I want to make a change that requires changes to both PackageA and PackageB. If PackageB has a PackageReference to PackageA, that means I have to guess what changes I'm going to need in PackageA to finish the changes in PackageB, change, commit, pack and publish PackageA, then change PackageB to use the new version of PackageA. However, if my guess about the needed changes in PackageA were wrong, then I'll need to again change, commit, pack, publish PackageA and then change PackageB to use the new, new version. It's slow and painful to make a multi-package feature when using package references.



                However, by making PackageA a project reference from PackageB, I can modify PackageA and the changes are immediately available in PackageB without having to create multiple versions of PackageA.nupkg.






                share|improve this answer













                When packing a project, project to project references are considered by default as nuget package references. I can think of two reasons why this is a good thing.



                1. it's recommended to pack one assembly per package

                2. to simplify development experience for package authors

                Let's consider these two reasons



                1. it's recommended to pack one assembly per package

                Imagine there's some utility assembly utility.dll and I use it in my package, PackageA. If I put both PackageA.dll and utlity.dll in my package, but later create a PackageB which also contains utility.dll, then there will be conflicts if a single project uses both PackageA and PackageB because there will be two different utility.dlls. By having one assembly per package, there would be a PackageA and PackageB, both of which depend on different versions of the utility package, and NuGet can use it's versioning rules to pick one.



                1. to simplify development experience for package authors

                Imagine I have PackageB which depends on PackageA, and I want to make a change that requires changes to both PackageA and PackageB. If PackageB has a PackageReference to PackageA, that means I have to guess what changes I'm going to need in PackageA to finish the changes in PackageB, change, commit, pack and publish PackageA, then change PackageB to use the new version of PackageA. However, if my guess about the needed changes in PackageA were wrong, then I'll need to again change, commit, pack, publish PackageA and then change PackageB to use the new, new version. It's slow and painful to make a multi-package feature when using package references.



                However, by making PackageA a project reference from PackageB, I can modify PackageA and the changes are immediately available in PackageB without having to create multiple versions of PackageA.nupkg.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 9 at 0:21









                zivkanzivkan

                1,7691918




                1,7691918





























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55065663%2freferenced-library-is-registered-as-other-nuget-reference-in-nuspec-using-vs-201%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    AWS Lex not identifying response if by a variable The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experienceEnforcing custom enumeration in AWS LEX for slot valuesHow to give response based on user response in Amazon Lex?Intercepting AWS Lambda Response to a AWS Lex QueryLex chat bot error: Reached second execution of fulfillment lambda on the same utteranceamazon lex showing invalid responseLambda response send back to Lex slot?Response card in Amazon lexAmazon Lex - Lambda response return HTML to botHow can I solve 424 (Failed Dependency) (python) obtained from Amazon lex?

                    Алба-Юлія

                    Захаров Федір Захарович