We have moved to GitHub Issues
Created by Craig Stevens 16 Jan 2016, 00:03:24 Updated by Sebastiaan Janssen 04 Feb 2016, 18:56:57
Nuget install of 7.4 beta 2 into an empty .net 4.5.2 project in VS2015 gave the following error:-
"Error An error occurred while applying transformation to 'web.config' in project 'umb74' No element in the source document matches '/configuration/system.web/compilation/assemblies/add[@assembly='Umbraco.ModelsBuilder']'"
This is a W10 machine with latest updates and VS2015 Community Edition.
Same here, steps I performed: New project - Asp.net Web Application. I choose Umbraco-7.4 as name Choose asp.net project template: Empty (NOT the Asp.net 5 one). Nuget command: install-package umbracocms -pre
Errors about the modelsbuilder and Microsoft.Bcl.Build packages appear (I included the full Nuget log as attachement). Furthermore a yellow bar appears in the Nuget console with the message: "The package at 'c:\Build\Umbraco-7.4\packages\Microsoft.Bcl.Build.1.0.14'failed to uninstall. Restart Visual Studio to finish the process." Restarting VS does not help. I also tried installing the modelsbuilder package install-package Umbraco.ModelsBuilder -pre before installing Umbraco but this didn't help either.
Software versions: Windows 10 Pro Visual Studio 2015 Professional update 1 .Net Framework 4.6.1 (I tried targeting 4.5, 4.5.2 and 4.6.1)
I got the exact same error installing 7.4.0-beta2 via NuGet. Windows 10, VS2015Update1
Update: The specific problem resides in the Umbraco.ModelsBuilder.AspNet Nuget package (version 2.2.0-beta003) - if the assemblies or buildProviders elements are missing from system.web -> compilation then it can't add the necessary assembly and extension elements. (See the web.config.install.xdt file in the Nuget Package)
In my case, I'm trying to upgrade a site from 7.4.0 Beta to 7.4.0 Beta 2 - the problem is that 4.5 Beta 2 is trying to update a non-existent element in the web.config:
An error occurred while applying transformation to 'web.config' in project 'Key2Co.Code' No element in the source document matches '/configuration/system.web/compilation/assemblies/add[@assembly='Umbraco.ModelsBuilder']'
Specifically, it's expecting the Umbraco.ModelsBuilder assembly to be present but the previous version doesn't include it.
There's also another problem: If the system.web -> compilation -> buildProviders element is missing it will error out on that too. This was the case on my code project.
To workaround this issue, make sure the following configuration is set up in the web.config file at a minimum:
In my Web project the buildProviders element was already present due to System.Web.Http etc. but my Code project didn't have those references.
Shoot! I tested everything relating to upgrades, but not a clean install with besically an empty web.config. This will be fixed when this PR is accepted and a new release is out - https://github.com/zpqrtbnk/Zbu.ModelsBuilder/pull/76
The workaround for now is indeed to add this section to your web.config before installing the nuget package.
Note to self: update the ModelsBuilder dependency when a new build is available. Also, the dependency needs to be on a stable version and can't be on a pre-release version else UmbracoCms will also be marked as a pre-release.
I also get this error on a clean new install:
Install failed. Rolling back... Unable to uninstall 'Newtonsoft.Json 6.0.8' because 'Microsoft.Owin.Security.OAuth 3.0.1, Microsoft.AspNet.WebApi.Client 5.2.3' depend on it.
@email@example.com That's nothing to do with this error, you need to start with a completely blank project, you can't use an MVC5 project. See docs for this: https://our.umbraco.org/documentation/Getting-Started/Setup/Install/install-umbraco-with-nuget
@sebastiaan I will open a new issue. This is happening when installing umbraco in a brand new blank web application. I've installed umbraco this way at least 50 times and never had this issue.
@firstname.lastname@example.org Same here and it sometimes happens to me too, even on a blank install. Nothing we can do about it though, I'd just try to close all VS instances and try again.
@ssebastiaan isn't this the error that was fixed in ModelsBuilder where we needed to ensure that system.web/compilation/assemblies was there first before adding anything to it?
@zpqrtbnk Yeah it's all fixed, but I'm just keeping it Open until we have semi-final builds of ModelsBuilder
Backwards Compatible: True
Affected versions: 7.4.0
Due in version: 7.4.0
Sprint: Sprint 8