Skip to content

Instantly share code, notes, and snippets.

View JakeGinnivan's full-sized avatar
:shipit:

Jake Ginnivan JakeGinnivan

:shipit:
View GitHub Profile
@JakeGinnivan
JakeGinnivan / gist:1039545
Created June 22, 2011 05:11
WP7 NuGet issues
Unable to find assembly references that are compatible with the target framework 'Silverlight,Version=v4.0,Profile=WindowsPhone'
structure
lib\SL3-WP\Foo.dll
lib\SL4-WindowsPhone71\Foo.dll
//In app.xaml.cs
public void AppStartup()
{
var containerBuilder = new ContainerBuilder();
containerBuilder
.RegisterAssembly(typeof(App).Assembly)
.AssignableTo<IView>()
.AsImplementedInterfaces();
var container = containerBuilder.Build();
container.Resolve<IUIService>().ShowDialog(container.Resolve<IMainView>());
public partial class App
{
private void Application_Startup(object sender, StartupEventArgs e)
{
var containerBuilder = new ContainerBuilder();
containerBuilder
.RegisterAssemblyTypes(typeof (App).Assembly)
.AssignableTo<Window>()
.AsSelf()
.OnActivating(ae =>
30/09/2011 09:42:45.251 - Info [NavigationApplication ] - Starting Application
30/09/2011 09:42:45.251 - Info [NavigationApplication ] - {
30/09/2011 09:42:45.325 - Debug [NavigationApplication ] - Navigation Application Initialising
30/09/2011 09:42:45.325 - Debug [NavigationApplication ] - {
30/09/2011 09:42:45.333 - Debug [NavigationApplication ] - Construcing MVC Infrastructure
30/09/2011 09:42:45.333 - Debug [NavigationApplication ] - {
30/09/2011 09:42:45.443 - Debug [NavigationApplication ] - Creating PhoneApplicationFrame... 87ms
30/09/2011 09:42:45.453 - Debug [NavigationApplication ] - Creating PhoneApplicationService... 2ms
30/09/2011 09:42:45.508 - Debug [NavigationApplication ] - } 174ms
30/09/2011 09:42:45.542 - Debug [NavigationApplication ] - Starting NavigationApplication Service
NSubstitute.Exceptions.ReceivedCallsException: Expected to receive a call matching:
InvokeComplete()
Actually received 1 matching call:
InvokeComplete()
Successfully installed 'System.Threading.Tasks 2.1.2'.
Successfully uninstalled 'System.Threading.Tasks 2.1.2'.
Install failed. Rolling back...
Could not install package 'System.Threading.Tasks 2.1.2'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.0', but the package does not contain any assembly references that are compatible with that framework. For more information, contact the package author.
[ServiceContract]
public interface IService
{
[OperationContract]
void Something();
[OperationContract]
SomeRespose SomethingElse();
}
[Fact]
public async Task can_recover_buyback()
{
//arrange
var buybackId = Guid.NewGuid();
InitialiseViewModel(true, buybackId);
_contractService.GetContract(buybackId).Returns(new CustomerBuybackDto { ContractItems = new ObservableCollection<ContractItemDto>() });
_buybackService.RecoverAsync(buybackId).Returns(TaskEx.Run(() => { }));
_uiService.AddResult(MessageBoxResult.Yes);
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;
using Phoenix;
using Phoenix.ActionResults;
using Phoenix.Framework;
using Phoenix.Navigation;
public class ControllerActionShortcut<TController> : IShortcut where TController : Controller
{
readonly Expression<Func<TController, ActionResult>> controllerAction;
protected ControllerActionShortcut(
Expression<Func<TController, ActionResult>> controllerAction,
DesktopModuleDefinition parentDefinition)
{
this.controllerAction = controllerAction;
ParentDefinition = parentDefinition;