Closed shiftkey closed 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.
A couple of questions:
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'.
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?
Hmmm weird. I created another class copying your snippet and am getting the same error. possibly an issue with my system.dll?
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).
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.
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!
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.
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.
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.
14 doesn't seem to be there yet for me, but I'll try again later today or tomorrow.
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.
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.
ah! awesome. thanks!
This will also resolve #331
Published MahApps.Metro 0.10.1.17-ALPHA which should address this issue.
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.
This is out now! https://nuget.org/packages/MahApps.Metro/0.10.1.1
Install-Package MahApps.Metro -Version 0.10.1.1
After pushing out the 0.10.0.1 bugfix for #256, the next goal is a non-alpha release of 0.10.1.
TODO: