Adding Reactive Extensions 2.1.30214.0 with Nuget breaks my class library when doing a gated check-in on TFS 2012 Express.
-
Monday, February 25, 2013 7:25 AM
Hi,
I have problems with the latest version (2.1.30214.0) of Rx - Main package from Nuget. I get no errors on my development machine but when I try to do a gated check-in of my source code on TFS it gets rejected and with a couple of build errors such as:
Objects\Localization\TextViewModel.cs (91): The type 'System.Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
View\ED\Lookup\ElementLookupDialogViewModel.cs (79): The type 'System.Exception' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
View\ED\Lookup\ElementLookupDialogViewModel.cs (79): The type 'System.IComparable`1<T0>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
View\ED\Lookup\ElementLookupDialogViewModel.cs (79): The type 'System.IDisposable' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
View\ED\Lookup\ElementLookupDialogViewModel.cs (79): The type 'System.IObservable`1<T0>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
View\ED\Lookup\ElementLookupDialogViewModel.cs (79): The type 'System.Collections.Generic.IEnumerable`1<T0>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
View\ED\Lookup\ElementLookupDialogViewModel.cs (79): The type 'System.IServiceProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ComponentModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
View\ED\Lookup\ElementLookupDialogViewModel.cs (82): 'System.Linq.IQueryable<Domain.Model.Element>' does not contain a definition for 'ToObservable' and no extension method 'ToObservable' accepting a first argument of type 'System.Linq.IQueryable<Domain.Model.Element>' could be found (are you missing a using directive or an assembly reference?)
View\ED\Lookup\ElementLookupDialogViewModel.cs (179): The type 'System.Action`2<T0,T1>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
View\ED\Lookup\ElementLookupDialogViewModel.cs (189): 'System.Linq.IQueryable<Domain.Model.ElementType>' does not contain a definition for 'ToObservable' and no extension method 'ToObservable' accepting a first argument of type 'System.Linq.IQueryable<Domain.Model.ElementType>' could be found (are you missing a using directive or an assembly reference?)I found a similar post of this problem at http://social.msdn.microsoft.com/Forums/en-US/rx/thread/2f64582f-c2af-481e-9d04-37b5445b94bd but the solution is for a ASP.NET MVC-project. I have a regular class library project, hence, adding System.Runtime assembly to Web.config won't solve my problem.
I find it quite odd since the project compiles properly on my development machine but not on the build server.
Any suggestions?
All Replies
-
Tuesday, February 26, 2013 4:46 PM
Is this a portable class library (I know you said "regular" class library ... double-checking ...)?
Richard Hein
-
Tuesday, February 26, 2013 5:02 PMFor a class library, you may still add an app.config file that will allow you to add the assembly reference to System.Runtime, just as specified in the answer above for the MVC project. For portable class libraries, Application Configuration file templates are not listed, but you can add one manually; not sure if that will resolve your issue however.
Richard Hein
-
Wednesday, February 27, 2013 4:36 AMYes, it's a regular class library, not a portable class library.
-
Wednesday, February 27, 2013 4:38 AMOkey, frankly, I didn't know that but as you suspected, that does not seem to resolve my issue.
-
Wednesday, February 27, 2013 4:41 AM
I've found a solution to my problem!
I manally had to add references to the missing assemblies to the .csproj file of the project.
<Reference Include="System.Runtime" />
When I added that reference, some additional references where needed as well:
<Reference Include="System.ComponentModel" />
<Reference Include="System.Threading" />
<Reference Include="System.Threading.Tasks" />Then it actually built just fine on my build server and the check-in was comitted.
- Marked As Answer by Slaaker Wednesday, February 27, 2013 4:41 AM

