MahApps / MahApps.Metro

A framework that allows developers to cobble together a better UI for their own WPF applications with minimal effort.
https://mahapps.com
MIT License
9.32k stars 2.45k forks source link

Version 0.10.1 #327

Closed shiftkey closed 11 years ago

shiftkey commented 11 years ago

After pushing out the 0.10.0.1 bugfix for #256, the next goal is a non-alpha release of 0.10.1.

TODO:

derosm2 commented 11 years ago

I installed 0.10.1.14-ALPHA (Prerelease) and started getting an error when implementing IPanoramaTile. Error says the return type for TileClickedCommand needs to be void, but there is a warning suggesting that the dll couldn't find ICommand.

Reference to type 'System.Windows.Input.ICommand' claims it is defined in 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\System.dll', but it could not be found (snipped)\packages\MahApps.Metro.0.10.1.14-ALPHA\lib\net40\MahApps.Metro.dll

I'm not sure if this is a bug with the build or if there is an issue on my end.

shiftkey commented 11 years ago

A couple of questions:

derosm2 commented 11 years ago

VS2012 and .NET 4.0

I have 2 classes that inherit IPanoramaTile and ICommand and both implement TileClickedCommand as such:

    public ICommand TileClickedCommand
    {
        get { return this; }
    }

However I get an error saying:

'UserTile' does not implement interface member 'MahApps.Metro.Controls.IPanoramaTile.get_TileClickedCommand()'. 'UserTile.TileClickedCommand.get' cannot implement 'MahApps.Metro.Controls.IPanoramaTile.get_TileClickedCommand()' because it does not have the matching return type of 'void'.

shiftkey commented 11 years ago

Excellent - let me see if I can recreate this on my end.

EDIT: This snippet does not trigger any compiler warnings in a VS2012/.NET4 project

public class UserTile : IPanoramaTile, ICommand
{
    public ICommand TileClickedCommand { get { return this; } }
    public bool CanExecute(object parameter)
    {
        throw new NotImplementedException();
    }

    public void Execute(object parameter)
    {
        throw new NotImplementedException();
    }

    public event EventHandler CanExecuteChanged;
}

What have I missed?

derosm2 commented 11 years ago

Hmmm weird. I created another class copying your snippet and am getting the same error. possibly an issue with my system.dll?

shiftkey commented 11 years ago

Not sure - feel free to open a issue if you can zip up the project and put it somewhere (GitHub/Dropbox/Skydrive/etc) .

I can check if its something environmental (i.e. the same project/code works here).

shiftkey commented 11 years ago

Also, if you can include a log of the MSBuild output set to verbose (details here ) that'll help me see what's going on when you try and compile a WPF project.

derosm2 commented 11 years ago

Got things working now. I uninstalled MahApps.Metro using NuGet and installed again. This time the prerelease version it installed though was 0.10.1.12-ALPHA instead of 0.10.1.14-ALPHA. So I'm not sure if the issue was solved by reinstalling or if 0.10.1.14-ALPHA was causing the issue.

Thanks for the help!

shiftkey commented 11 years ago

Ok, that's strange for a couple of reasons:

Cheers, Brendan


From: derosm2 Sent: 29/01/2013 11:56 To: MahApps/MahApps.Metro Cc: Brendan Forster Subject: Re: [MahApps.Metro] Version 0.10.1 (#327)

Got things working now. I uninstalled MahApps.Metro using NuGet and installed again. This time the prerelease version it installed though was 0.10.1.12-ALPHA instead of 0.10.1.14-ALPHA. So I'm not sure if the issue was solved by reinstalling or if 0.10.1.14-ALPHA was causing the issue.

Thanks for the help!

— Reply to this email directly or view it on GitHubhttps://github.com/MahApps/MahApps.Metro/issues/327#issuecomment-12814746.

derosm2 commented 11 years ago

Yea definitely strange. I noticed the difference when I tried creating a new project to test out this issue and NuGet installed that version instead.

shiftkey commented 11 years ago

This is why https://twitter.com/nuget/status/296048739494273024

If you could try again (perhaps update to -14 rather than a new project) and see if it happens again that'd be excellent.

derosm2 commented 11 years ago

14 doesn't seem to be there yet for me, but I'll try again later today or tomorrow.

shiftkey commented 11 years ago

Right, I've re-tested -14 and I can see the same error message. This is the simplest repro for the error message:

public class UserTile : IPanoramaTile
{
    public ICommand TileClickedCommand { get { return null; } }
}

Looks like some fun .NET4/.NET45 issue to investigate on my end. Will update this with notes in the morning.

shiftkey commented 11 years ago

Right, I've found the issue - TeamCity ran the last couple of builds on an incorrect agent,

[12:01:38][GetReferenceAssemblyPaths] C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(983, 5): warning MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.0,Profile=Client" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [12:01:38][GetReferenceAssemblyPaths] C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(983, 5): warning MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.

I'll update when I've pushed a version which fixes this issue.

derosm2 commented 11 years ago

ah! awesome. thanks!

shiftkey commented 11 years ago

This will also resolve #331

shiftkey commented 11 years ago

Published MahApps.Metro 0.10.1.17-ALPHA which should address this issue.

shiftkey commented 11 years ago

Update: I'm really excited to get this out the door but I'll hold off until when I'm back from holidays (so I can enjoy them without stressing about my inbox). Starting to receive issues which have been fixed in the pre-release packages sucks for users and for me.

So 25/3 Australia time (when I get off the plane back in Sydney), I'll flick the switch and publish out all these fixes and allow myself a couple of days to confirm downstream users are fine.

Thanks for your patience.

shiftkey commented 11 years ago

This is out now! https://nuget.org/packages/MahApps.Metro/0.10.1.1

Install-Package MahApps.Metro -Version 0.10.1.1