Predefined type CallSite is defined in multiple locations - asp.net-mvc-4

I get errors from both build and website precompile on App Harbor that seem to originate from multiple versions of the C# dynamic assemblies. They both start with warnings that look like:
2>CSC : warning CS1685: The predefined type 'System.Runtime.CompilerServices.CallSite' is defined in multiple assemblies in the global alias; using definition from 'd:\temp\qb3ydb5o.xoq\input\packages\IronJS.Core.0.2.0.1\lib\net40\Microsoft.Scripting.Core.dll' [D:\temp\qb3ydb5o.xoq\input\...csproj]
The build passes, but website precompile has these warnings but fails:
(0): error CS0656: Missing compiler required member 'Microsoft.CSharp.RuntimeBinder.Binder.InvokeMember'
d:\temp\qb3ydb5o.xoq\output\_PublishedWebsites\...cshtml(4): error CS1969: One or more types required to compile a dynamic expression cannot be found. Are you missing a reference?
I wonder if it has anything to do with how IronJS is packaged? Can someone help me troubleshoot this error?

I fixed this by removing references to Microsoft.Scripting.Core and Microsoft.Scripting.ExtensionAttribute. These were added by the IronJS NuGet package. I still have AppHarbor build errors, but those are because AppHarbor isn't doing a clean build (different problem).
Edit: I submitted an issue with IronJS: https://github.com/fholm/IronJS/issues/92

Related

scenarios of openflow in omnet are not working properly

I download openflow. It successfully been built. However, only scenario_Small is correctly working, when try to run other scenarios error runtime appears such as that:
Cannot add statistic 'numOutOfOrderArrivals' to module MultiController.Vancouver.client[0].pingApp[0] (NED type: openflow.apps.PingAppRandom): Error in source=numOutOfOrderArrivals: Signal 'numOutOfOrderArrivals' is not declared on type 'openflow.apps.PingAppRandom' (you can turn off this check by adding checkSignals=false to the #statistic property in the NED file) -- in module (PingAppRandom) MultiController.Vancouver.client[0].pingApp[0] (id=161), during network setup
when trying to run "szenario_Domains_multiController"
I tried to fix the error following the hint mentioned in error, but another errors appeared. How to fix those endless errors.
It seems that the codebase of this openflow project is already old and does not correspond to the new builds of OmNET++ and the INET framework.
I was success to build and run test scenarios from this project on Win 10 and OmNET++ 5.6.2 and INET 3.6.6.

Cocoapod fails to build on Travis-CI - "expected a type"

Objective: Build a cocoapod with CI support through travis-ci and coveralls.
Sub Objective: Keep git repo cleared of Pods/, while still including Podfile and Podfile.lock
Referenced repo: SRRandomUser
note: while indeed there exists a simple workaround solution (just removing Pod/ from my .gitignore, I ask this question because it will likely be helpful to understand this issue for future work.
Here is the situation I find myself in:
Using FSNetworking for network requests.
One of its classes, FSNData, has a class method withImage:jpegQuality:fileName: that accepts a UIImage and CGFloat as parameters.
Building this file without adding #import for UIKit and CoreGraphics results in a compiler error of expected a type with reference to the UIImage and CGFloat parameters
Locally, this is not a problem because I can add the module #imports, however since I am not committing the entirety of the Pods/ directory, these changes don't get pushed
Travis received the build and attempts to build, but since the FSNData doesn't have CoreGraphics or UIKit imported, when Travis goes to build the project, it throws the error in SRRandomUserGenerator since that class is #importing the affected FSNData class:
✗ Compile SRRandomUserGenerator.m (73 ms)
In file included from /Users/travis/build/spacedrabbit/SRRandomUser/Random Strangers/SRRandomUser/SRRandomUser/SRRandomUserAPIManager.h:10:
In file included from /Users/travis/build/spacedrabbit/SRRandomUser/Random Strangers/SRRandomUser/../../Pods/Headers/Public/FSNetworking/FSNConnection.h:36:
/Users/travis/build/spacedrabbit/SRRandomUser/Random Strangers/SRRandomUser/../../Pods/Headers/Public/FSNetworking/FSNData.h:42:18: error: expected a type
+ (id)withImage:(UIImage*)image jpegQuality:(CGFloat)quality fileName:(NSString*)fileName;
^
/Users/travis/build/spacedrabbit/SRRandomUser/Random Strangers/SRRandomUser/../../Pods/Headers/Public/FSNetworking/FSNData.h:42:46: error: expected a type
+ (id)withImage:(UIImage*)image jpegQuality:(CGFloat)quality fileName: (NSString*)fileName;
^
2 errors generated.
So, my questions are:
How do I either silence that warning so that the build runs anyhow or
How do I get that Pod to include the correct frameworks for building?
Many thanks in advance, SO.
I would recommend trying to search for the framework you need via Cocoapods.org. If you're using Cocoapods it usually means that it's been linked to your project (so there's really no way to silence the error, especially in this case where it seems that the framework you're using depends on other frameworks)

ccrewrite fails on the build machine due to nuget references having contract assemblies

Here is the whole context:
I build two nuget packages containing
A.nupkg: A.dll, A.Contracts.dll
B.nupkg: B.dll, B.Contracts.dll; B depends on A
I create a new project and solution C depending on A and B, and set "Contract Reference Assembly" to Build.
Locally, everything compiles just fine. However, on the build server (MSBuild 2012.2), an exception is thrown from ccrewrite, saying ccrewrite : error : Rewrite aborted due to metadata errors. Check output window. Setting the logging to Diagnostics, I get the following:
Reading assembly 'B' from 'C:\Builds\1\Product\Build-Dev-CI\Sources\packages\B.1.2.13156.9\lib\net40\B.dll' resulted in errors. (TaskId:1284)
Could not resolve type reference: [A.Class]A.Class. (TaskId:1284)
Any ideas why this does not work on the build server?

MonoDevelop and AjaxControlToolkit: Register Server Tag in Mono

I know that Mono supports the AjaxControlToolkit but I don't know how to integrate it into MonoDevelop. I added AjaxControlToolkit.dll, System.Web.Extensions.dll and System.Web.Extensions.Design.dll as References in the project but when I build the project I get the warning:
/Users/user1/Projects/FirstProject/Default.aspx(1,1): Warning: Parser failed with error The tag type 'ajaxToolkit:TabContainer' has not been registered.. CodeBehind members for this file will not be added. (FirstProject)
and I when I deploy it I get the error: Unknown server tag 'ajaxToolkit:TabContainer'.
How do I register the server tag in MonoDevelop?
You can use either the <%#Register directive, or add some lines to your Web.config. See here for instructions on either approach.
Using the Web.config mechanism has the advantage that you don't need to add a directive to every page where you want to use the controls.

Team Build sends error when trying to compile a Structuremap method

I'm getting a strange error when trying to compile a solution that is using StructureMap on Team Build.
When I try to compile the solution locally on Visual Studio it works fine, but when trying to queue a new build in Team Build I get the following error:
Overload resolution failed because no accessible 'Use' can be called with these arguments:
The line of code that gets this error is the second one:
ForSingletonOf(Of ISessionFactory)().Use(NHibernateSessionFactory.SessionFactory)
Me.For(Of ISession)().lifecycleIs(New HybridLifecycle()).Use(Function(x) x.GetInstance(Of ISessionFactory)().OpenSession())
It's a standard registration for the NHibernate session, so I don't really get why this error pops up.
Thanks in advance for the clues.
Make sure you have the correct version of NHibernate on the build server, and that your hint paths are all appropriately set in your project file. We haven't had this specific issue (as we're not using NHibernate), but we've had weird issues like that being related to version mismatches of "infrastructure" DLLs between local and build.