U4-7909 - 7.4-rc1 is missing references because it's using portable class libraries now

Created by Per Osbeck 05 Feb 2016, 12:31:56 Updated by Sebastiaan Janssen 09 Feb 2016, 16:31:55

Hi,

probably not a bug but I'll log it here if others have the same issue.

After upgrading to 7.4-rc1, our build server starts complaining about

The type 'IEnumerable<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0

Everything compiles and runs fine locally, but not on CI. I still havent figured out what is causing it. Is it something with the new dependencies? For a framework project, this should some from mscorlib.dll, right?

Any insight into this is much appreciated.

1 Attachments

Comments

Sebastiaan Janssen 05 Feb 2016, 13:17:27

Make sure to update your web.config. Attached are the difference between 7.3.7 and 7.4.0.


Per Osbeck 05 Feb 2016, 13:20:19

@sebastiaan thanks, though those things are already added.

The were added during upgrade. But the .models wasn't added. Not sure though that would make a difference for the build.


Sebastiaan Janssen 05 Feb 2016, 13:33:01

I don't know then, seems like your server is doing something weird.. :) Just used our TeamCity to deploy our.umbraco.org and that all worked just fine.. Would be curious to know what it is!


Per Osbeck 05 Feb 2016, 14:00:01

So, the issue seem to arise as Umbraco is now referencing PCL components. Solution is to install the Targeting packs on the build servers.

https://support.microsoft.com/en-us/kb/2971005 http://getdotnet.azurewebsites.net/target-dotnet-platforms.html


Sebastiaan Janssen 09 Feb 2016, 14:20:30

I'm afraid see no other way of fixing than having the whole list of them in web.config by default.. I just installed a package on 7.4RC that needed System.Collections and threw a similar error, we can't magically predict what other dlls will require. This is the whole list: http://stackoverflow.com/a/19942274/5018

So while this won't fix your specific issue @perosb, we can at least make sites not crash when installing packages. So I'll hijack this issue for that purpose, if you don't mind ;-)


Sebastiaan Janssen 09 Feb 2016, 16:31:34

Commit made by '''Sebastiaan Janssen''' on ''2016-02-09T17:10:43+01:00'' https://github.com/umbraco/Umbraco-CMS/commit/5e8200ecb2b48847927f14eaa8964cae1f1662c1

U4-7909 7.4-rc1 is missing references because it's using portable class libraries now

#U4-7909 Fixed


Priority: Normal

Type: Bug

State: Fixed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.4.0

Due in version: 7.4.0

Sprint:

Story Points:

Cycle: