Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • David Veksler 81 posts 166 karma points
    Feb 29, 2016 @ 16:02
    David Veksler
    0

    Umbraco.Core junks my class library projects with web files

    This behavior seems to be new to Umbraco 7.4.

    I have separate my business logic from my display logic into class library projects in Visual Studio. I added UmbracoCms.Core via NuGet in these projects.

    The problem is that the UmbracoCms.Core reference tries to create a complete Umbraco web installation in each of my DLL projects., It creates the AppBrowsers,Config,Umbraco,umbracoclient folders every time I build.

    How do I stop this? All I need is access to the Umbraco.Core namespace.

    enter image description here

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Mar 01, 2016 @ 08:18
    Sebastiaan Janssen
    0

    Are you sure you only installed UmbracoCms.Core?

    If I do a -WhatIf then NuGet tells me it will install the following packages (and it does, if I leave out the -WhatIf). Any other packages installed that have a dependency on UmbracoCms (not .Core)?

    PM> Install-Package UmbracoCms.Core -WhatIf
    Attempting to gather dependencies information for package 'UmbracoCms.Core.7.4.1' with respect to project 'ClassLibrary4', targeting '.NETFramework,Version=v4.5.2'
    Attempting to resolve dependencies for package 'UmbracoCms.Core.7.4.1' with DependencyBehavior 'Lowest'
    Resolving actions to install package 'UmbracoCms.Core.7.4.1'
    Resolved actions to install package 'UmbracoCms.Core.7.4.1'
    Install AutoMapper.3.0.0 : 
    Install ClientDependency.1.8.4 : 
    Install HtmlAgilityPack.1.4.9 : 
    Install ImageProcessor.2.3.3 : 
    Install ImageProcessor.Web.4.5.3 : ImageProcessor [2.3.3, )
    Install Markdown.1.14.4 : 
    Install Microsoft.AspNet.Identity.Core.2.2.1 : 
    Install Microsoft.AspNet.Razor.3.2.3 : 
    Install Microsoft.Web.Infrastructure.1.0.0 : 
    Install Microsoft.AspNet.WebPages.3.2.3 : Microsoft.AspNet.Razor [3.2.3, 3.3.0), Microsoft.Web.Infrastructure [1.0.0, )
    Install Microsoft.AspNet.Mvc.5.2.3 : Microsoft.AspNet.Razor [3.2.3, 3.3.0), Microsoft.AspNet.WebPages [3.2.3, 3.3.0)
    Install ClientDependency-Mvc5.1.8.0 : ClientDependency [1.8.0, ), Microsoft.AspNet.Mvc [5.0.0, )
    Install MiniProfiler.2.1.0 : 
    Install MySql.Data.6.9.8 : 
    Install Newtonsoft.Json.6.0.8 : 
    Install Microsoft.AspNet.WebApi.Client.5.2.3 : Newtonsoft.Json [6.0.4, )
    Install Microsoft.AspNet.WebApi.Core.5.2.3 : Microsoft.AspNet.WebApi.Client [5.2.3, )
    Install Microsoft.AspNet.WebApi.WebHost.5.2.3 : Microsoft.AspNet.WebApi.Core [5.2.3, 5.3.0)
    Install Microsoft.AspNet.WebApi.5.2.3 : Microsoft.AspNet.WebApi.WebHost [5.2.3, 5.3.0)
    Install Owin.1.0.0 : 
    Install Microsoft.Owin.3.0.1 : Owin [1.0.0, )
    Install Microsoft.Owin.Host.SystemWeb.3.0.1 : Microsoft.Owin [3.0.1, ), Owin [1.0.0, )
    Install Microsoft.Owin.Security.3.0.1 : Microsoft.Owin [3.0.1, ), Owin [1.0.0, )
    Install Microsoft.Owin.Security.Cookies.3.0.1 : Microsoft.Owin [3.0.1, ), Microsoft.Owin.Security [3.0.1, ), Owin [1.0.0, )
    Install Microsoft.Owin.Security.OAuth.3.0.1 : Microsoft.Owin [3.0.1, ), Microsoft.Owin.Security [3.0.1, ), Newtonsoft.Json [6.0.4, ), Owin [1.0.0, )
    Install Microsoft.AspNet.Identity.Owin.2.2.1 : Microsoft.AspNet.Identity.Core [2.2.1, ), Microsoft.Owin.Security [2.1.0, ), Microsoft.Owin.Security.Cookies [2.1.0, ), Microsoft.Owin.Security.OAuth [2.1.0, )
    Install semver.1.1.2 : 
    Install SharpZipLib.0.86.0 : 
    Install Lucene.Net.2.9.4.1 : SharpZipLib [0.86.0, )
    Install Examine.0.1.68 : Lucene.Net [2.9.4.1, )
    Install UrlRewritingNet.2.0.7 : 
    Install xmlrpcnet.2.5.0 : 
    Install UmbracoCms.Core.7.4.1 : AutoMapper [3.0.0, 3.1.0), ClientDependency [1.8.4, 2.0.0), ClientDependency-Mvc5 [1.8.0, 2.0.0), Examine [0.1.68, 1.0.0), HtmlAgilityPack [1.4.9, 2.0.0), ImageProcessor [2.3.3, 3.0.0), ImageProcessor.Web [4.5.3, 5.0.0), Lucene.Net [2.9.4.1, 3.0.0), Markdown [1.14.4, 2.0.0), Microsoft.AspNet.Identity.Owin [2.2.1, 3.0.0), Microsoft.AspNet.Mvc [5.2.3, 6.0.0), Microsoft.AspNet.WebApi [5.2.3, 6.0.0), Microsoft.Owin.Host.SystemWeb [3.0.1, 4.0.0), Microsoft.Owin.Security.Cookies [3.0.1, 4.0.0), Microsoft.Owin.Security.OAuth [3.0.1, 4.0.0), MiniProfiler [2.1.0, 3.0.0), MySql.Data [6.9.8, 7.0.0), Newtonsoft.Json [6.0.8, 9.0.0), semver [1.1.2, 2.0.0), SharpZipLib [0.86.0, 1.0.0), UrlRewritingNet [2.0.7, 3.0.0), xmlrpcnet [2.5.0, 3.0.0)
    

    enter image description here

  • David Veksler 81 posts 166 karma points
    Mar 01, 2016 @ 22:21
    David Veksler
    0

    I think my misunderstanding was that I must install all the Umbraco.Core dependencies if I need to use Umbraco.Core in a class library project.
    But that is wrong - if I just need Umbraco.Core, I should tell NuGet to ignore dependencies.

    I just used ResolveUR to remove all unused referenced and packages in my project.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Mar 01, 2016 @ 22:56
    Sebastiaan Janssen
    0

    I don't know how you're installing Umbraco.Core but as per the output above:

    PM> Install-Package UmbracoCms.Core
    

    This will not install dependencies and there's no need to tell NuGet to ignore them. Maybe I'm missing something?

  • David Veksler 81 posts 166 karma points
    Mar 01, 2016 @ 23:20
    David Veksler
    0

    I am getting different behavior. I believe this is the default NuGet setting:

    I used the "quick install package" menu to install Umbraco.Core: quick install option

    This is what it did:

    diff

    I then discarded my changed and ran " Install-Package UmbracoCms.Core"

    This is the console output:

    PM> Install-Package UmbracoCms.Core
    Package 'UmbracoCms.Core.7.4.1' already exists in project 'FEE.ContentMigration'
    PM> Install-Package UmbracoCms.Core
    Attempting to gather dependencies information for package 'UmbracoCms.Core.7.4.1' with respect to project 'ContentMigration\FEE.ContentMigration', targeting '.NETFramework,Version=v4.6'
    Attempting to resolve dependencies for package 'UmbracoCms.Core.7.4.1' with DependencyBehavior 'Lowest'
    Resolving actions to install package 'UmbracoCms.Core.7.4.1'
    Resolved actions to install package 'UmbracoCms.Core.7.4.1'
    Package 'AutoMapper.3.0.0' already exists in folder 'C:\Web\fee-cms\Source\FEE\packages'
    Added package 'AutoMapper.3.0.0' to 'packages.config'
    Successfully installed 'AutoMapper 3.0.0' to FEE.ContentMigration
    Package 'ClientDependency.1.8.4' already exists in folder 'C:\Web\fee-cms\Source\FEE\packages'
    Added package 'ClientDependency.1.8.4' to 'packages.config'
    Successfully installed 'ClientDependency 1.8.4' to FEE.ContentMigration
    Package 'HtmlAgilityPack.1.4.9' already exists in folder 'C:\Web\fee-cms\Source\FEE\packages'
    Added package 'HtmlAgilityPack.1.4.9' to 'packages.config'
    Successfully installed 'HtmlAgilityPack 1.4.9' to FEE.ContentMigration
    Package 'ImageProcessor.2.3.3' already exists in folder 'C:\Web\fee-cms\Source\FEE\packages'
    Added package 'ImageProcessor.2.3.3' to 'packages.config'
    Successfully installed 'ImageProcessor 2.3.3' to FEE.ContentMigration
    Package 'ImageProcessor.Web.4.5.3' already exists in folder 'C:\Web\fee-cms\Source\FEE\packages'
    Added package 'ImageProcessor.Web.4.5.3' to 'packages.config'
    Successfully installed 'ImageProcessor.Web 4.5.3' to FEE.ContentMigration
    Package 'Markdown.1.14.4' already exists in folder 'C:\Web\fee-cms\Source\FEE\packages'
    Added package 'Markdown.1.14.4' to 'packages.config'
    Successfully installed 'Markdown 1.14.4' to FEE.ContentMigration
    Package 'Microsoft.AspNet.Identity.Core.2.2.1' already exists in folder 'C:\Web\fee-cms\Source\FEE\packages'
    Added package 'Microsoft.AspNet.Identity.Core.2.2.1' to 'packages.config'
    Successfully installed 'Microsoft.AspNet.Identity.Core 2.2.1' to FEE.ContentMigration
    Package 'Microsoft.AspNet.Razor.3.2.3' already exists in folder 'C:\Web\fee-cms\Source\FEE\packages'
    Added package 'Microsoft.AspNet.Razor.3.2.3' to 'packages.config'
    Successfully installed 'Microsoft.AspNet.Razor 3.2.3' to FEE.ContentMigration
    Package 'Microsoft.Web.Infrastructure.1.0.0' already exists in folder 'C:\Web\fee-cms\Source\FEE\packages'
    Added package 'Microsoft.Web.Infrastructure.1.0.0' to 'packages.config'
    Successfully installed 'Microsoft.Web.Infrastructure 1.0.0' to FEE.ContentMigration
    Package 'Microsoft.AspNet.WebPages.3.2.3' already exists in folder 'C:\Web\fee-cms\Source\FEE\packages'
    Added package 'Microsoft.AspNet.WebPages.3.2.3' to 'packages.config'
    Successfully installed 'Microsoft.AspNet.WebPages 3.2.3' to FEE.ContentMigration
    Package 'Microsoft.AspNet.Mvc.5.2.3' already exists in folder 'C:\Web\fee-cms\Source\FEE\packages'
    Added package 'Microsoft.AspNet.Mvc.5.2.3' to 'packages.config'
    Successfully installed 'Microsoft.AspNet.Mvc 5.2.3' to FEE.ContentMigration
    Package 'ClientDependency-Mvc5.1.8.0' already exists in folder 'C:\Web\fee-cms\Source\FEE\packages'
    Added package 'ClientDependency-Mvc5.1.8.0' to 'packages.config'
    Successfully installed 'ClientDependency-Mvc5 1.8.0' to FEE.ContentMigration
    Package 'MiniProfiler.2.1.0' already exists in folder 'C:\Web\fee-cms\Source\FEE\packages'
    Added package 'MiniProfiler.2.1.0' to 'packages.config'
    Successfully installed 'MiniProfiler 2.1.0' to FEE.ContentMigration
    Package 'MySql.Data.6.9.8' already exists in folder 'C:\Web\fee-cms\Source\FEE\packages'
    Added package 'MySql.Data.6.9.8' to 'packages.config'
    Successfully installed 'MySql.Data 6.9.8' to FEE.ContentMigration
    Package 'Newtonsoft.Json.6.0.8' already exists in folder 'C:\Web\fee-cms\Source\FEE\packages'
    Added package 'Newtonsoft.Json.6.0.8' to 'packages.config'
    Executing script file 'C:\Web\fee-cms\Source\FEE\packages\Newtonsoft.Json.6.0.8\tools\install.ps1'
    Successfully installed 'Newtonsoft.Json 6.0.8' to FEE.ContentMigration
    Package 'Microsoft.AspNet.WebApi.Client.5.2.3' already exists in folder 'C:\Web\fee-cms\Source\FEE\packages'
    Added package 'Microsoft.AspNet.WebApi.Client.5.2.3' to 'packages.config'
    Successfully installed 'Microsoft.AspNet.WebApi.Client 5.2.3' to FEE.ContentMigration
    Package 'Microsoft.AspNet.WebApi.Core.5.2.3' already exists in folder 'C:\Web\fee-cms\Source\FEE\packages'
    Added package 'Microsoft.AspNet.WebApi.Core.5.2.3' to 'packages.config'
    Successfully installed 'Microsoft.AspNet.WebApi.Core 5.2.3' to FEE.ContentMigration
    Package 'Microsoft.AspNet.WebApi.WebHost.5.2.3' already exists in folder 'C:\Web\fee-cms\Source\FEE\packages'
    Added package 'Microsoft.AspNet.WebApi.WebHost.5.2.3' to 'packages.config'
    Successfully installed 'Microsoft.AspNet.WebApi.WebHost 5.2.3' to FEE.ContentMigration
    Adding package 'Microsoft.AspNet.WebApi.5.2.3', which only has dependencies, to project 'FEE.ContentMigration'.
    Package 'Microsoft.AspNet.WebApi.5.2.3' already exists in folder 'C:\Web\fee-cms\Source\FEE\packages'
    Added package 'Microsoft.AspNet.WebApi.5.2.3' to 'packages.config'
    Successfully installed 'Microsoft.AspNet.WebApi 5.2.3' to FEE.ContentMigration
    Package 'Owin.1.0.0' already exists in folder 'C:\Web\fee-cms\Source\FEE\packages'
    Added package 'Owin.1.0.0' to 'packages.config'
    Successfully installed 'Owin 1.0.0' to FEE.ContentMigration
    Package 'Microsoft.Owin.3.0.1' already exists in folder 'C:\Web\fee-cms\Source\FEE\packages'
    Added package 'Microsoft.Owin.3.0.1' to 'packages.config'
    Successfully installed 'Microsoft.Owin 3.0.1' to FEE.ContentMigration
    Package 'Microsoft.Owin.Host.SystemWeb.3.0.1' already exists in folder 'C:\Web\fee-cms\Source\FEE\packages'
    Added package 'Microsoft.Owin.Host.SystemWeb.3.0.1' to 'packages.config'
    Successfully installed 'Microsoft.Owin.Host.SystemWeb 3.0.1' to FEE.ContentMigration
    Package 'Microsoft.Owin.Security.3.0.1' already exists in folder 'C:\Web\fee-cms\Source\FEE\packages'
    Added package 'Microsoft.Owin.Security.3.0.1' to 'packages.config'
    Successfully installed 'Microsoft.Owin.Security 3.0.1' to FEE.ContentMigration
    Package 'Microsoft.Owin.Security.Cookies.3.0.1' already exists in folder 'C:\Web\fee-cms\Source\FEE\packages'
    Added package 'Microsoft.Owin.Security.Cookies.3.0.1' to 'packages.config'
    Successfully installed 'Microsoft.Owin.Security.Cookies 3.0.1' to FEE.ContentMigration
    Package 'Microsoft.Owin.Security.OAuth.3.0.1' already exists in folder 'C:\Web\fee-cms\Source\FEE\packages'
    Added package 'Microsoft.Owin.Security.OAuth.3.0.1' to 'packages.config'
    Successfully installed 'Microsoft.Owin.Security.OAuth 3.0.1' to FEE.ContentMigration
    Package 'Microsoft.AspNet.Identity.Owin.2.2.1' already exists in folder 'C:\Web\fee-cms\Source\FEE\packages'
    Added package 'Microsoft.AspNet.Identity.Owin.2.2.1' to 'packages.config'
    Successfully installed 'Microsoft.AspNet.Identity.Owin 2.2.1' to FEE.ContentMigration
    Package 'semver.1.1.2' already exists in folder 'C:\Web\fee-cms\Source\FEE\packages'
    Added package 'semver.1.1.2' to 'packages.config'
    Successfully installed 'semver 1.1.2' to FEE.ContentMigration
    Package 'SharpZipLib.0.86.0' already exists in folder 'C:\Web\fee-cms\Source\FEE\packages'
    Added package 'SharpZipLib.0.86.0' to 'packages.config'
    Successfully installed 'SharpZipLib 0.86.0' to FEE.ContentMigration
    Package 'Lucene.Net.2.9.4.1' already exists in folder 'C:\Web\fee-cms\Source\FEE\packages'
    Added package 'Lucene.Net.2.9.4.1' to 'packages.config'
    Successfully installed 'Lucene.Net 2.9.4.1' to FEE.ContentMigration
    Package 'Examine.0.1.68' already exists in folder 'C:\Web\fee-cms\Source\FEE\packages'
    Added package 'Examine.0.1.68' to 'packages.config'
    Successfully installed 'Examine 0.1.68' to FEE.ContentMigration
    Package 'UrlRewritingNet.2.0.7' already exists in folder 'C:\Web\fee-cms\Source\FEE\packages'
    Added package 'UrlRewritingNet.2.0.7' to 'packages.config'
    Successfully installed 'UrlRewritingNet 2.0.7' to FEE.ContentMigration
    Package 'xmlrpcnet.2.5.0' already exists in folder 'C:\Web\fee-cms\Source\FEE\packages'
    Added package 'xmlrpcnet.2.5.0' to 'packages.config'
    Successfully installed 'xmlrpcnet 2.5.0' to FEE.ContentMigration
    Package 'UmbracoCms.Core.7.4.1' already exists in folder 'C:\Web\fee-cms\Source\FEE\packages'
    Added package 'UmbracoCms.Core.7.4.1' to 'packages.config'
    Executing script file 'C:\Web\fee-cms\Source\FEE\packages\UmbracoCms.Core.7.4.1\tools\install.ps1'
    installPath: C:\Web\fee-cms\Source\FEE\packages\UmbracoCms.Core.7.4.1
    toolsPath: C:\Web\fee-cms\Source\FEE\packages\UmbracoCms.Core.7.4.1\tools
    
    projectPath: C:\Web\fee-cms\Source\FEE\FEE.ContentMigration\
    backupPath: C:\Web\fee-cms\Source\FEE\FEE.ContentMigration\App_Data\NuGetBackup\20160301-181756
    copyLogsPath: C:\Web\fee-cms\Source\FEE\FEE.ContentMigration\App_Data\NuGetBackup\20160301-181756\CopyLogs
    umbracoBinFolder: C:\Web\fee-cms\Source\FEE\FEE.ContentMigration\bin
    Successfully installed 'UmbracoCms.Core 7.4.1' to FEE.ContentMigration
    PM> 
    

    So as far as I can tell, installing UmbracoCms.Core will install all the dependencies unless you tell NuGet not to.

Please Sign in or register to post replies

Write your reply to:

Draft