Skip to content

Commit

Permalink
Merge pull request cloudfoundry-attic#116 from carabasdaniel/develop
Browse files Browse the repository at this point in the history
Fix error messages and publish profile compatibility
  • Loading branch information
mihaibuzgau committed Sep 11, 2015
2 parents 3e3b8fc + d536284 commit 98699fc
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
<CFSpace>arandor</CFSpace>
<DeployTargetFile></DeployTargetFile>
<WebPublishMethod>CloudFoundry</WebPublishMethod>
<CFPublishProfileVersion>1.0.0</CFPublishProfileVersion>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -39,38 +39,38 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="CloudFoundry.CloudController.Common, Version=1.0.0.257, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\cf-dotnet-sdk.1.0.0.257-alpha\lib\Net45\CloudFoundry.CloudController.Common.dll</HintPath>
<Reference Include="CloudFoundry.CloudController.Common, Version=1.0.0.260, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\cf-dotnet-sdk.1.0.0.260-alpha\lib\Net45\CloudFoundry.CloudController.Common.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CloudFoundry.CloudController.V2.Client, Version=1.0.0.257, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\cf-dotnet-sdk.1.0.0.257-alpha\lib\Net45\CloudFoundry.CloudController.V2.Client.dll</HintPath>
<Reference Include="CloudFoundry.CloudController.V2.Client, Version=1.0.0.260, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\cf-dotnet-sdk.1.0.0.260-alpha\lib\Net45\CloudFoundry.CloudController.V2.Client.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CloudFoundry.CloudController.V2.Client.1.0.0.234.Fakes">
<HintPath>FakesAssemblies\CloudFoundry.CloudController.V2.Client.1.0.0.234.Fakes.dll</HintPath>
</Reference>
<Reference Include="CloudFoundry.CloudController.V3.Client, Version=1.0.0.257, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\cf-dotnet-sdk.1.0.0.257-alpha\lib\Net45\CloudFoundry.CloudController.V3.Client.dll</HintPath>
<Reference Include="CloudFoundry.CloudController.V3.Client, Version=1.0.0.260, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\cf-dotnet-sdk.1.0.0.260-alpha\lib\Net45\CloudFoundry.CloudController.V3.Client.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CloudFoundry.CloudController.V3.Client.1.0.0.234.Fakes">
<HintPath>FakesAssemblies\CloudFoundry.CloudController.V3.Client.1.0.0.234.Fakes.dll</HintPath>
</Reference>
<Reference Include="CloudFoundry.Loggregator.Client, Version=1.0.0.257, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\cf-dotnet-sdk.1.0.0.257-alpha\lib\Net45\CloudFoundry.Loggregator.Client.dll</HintPath>
<Reference Include="CloudFoundry.Loggregator.Client, Version=1.0.0.260, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\cf-dotnet-sdk.1.0.0.260-alpha\lib\Net45\CloudFoundry.Loggregator.Client.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CloudFoundry.Logyard.Client, Version=1.0.0.257, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\cf-dotnet-sdk.1.0.0.257-alpha\lib\Net45\CloudFoundry.Logyard.Client.dll</HintPath>
<Reference Include="CloudFoundry.Logyard.Client, Version=1.0.0.260, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\cf-dotnet-sdk.1.0.0.260-alpha\lib\Net45\CloudFoundry.Logyard.Client.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CloudFoundry.Manifests, Version=1.0.0.257, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\cf-dotnet-sdk.1.0.0.257-alpha\lib\Net45\CloudFoundry.Manifests.XML\CloudFoundry.Manifests.dll</HintPath>
<Reference Include="CloudFoundry.Manifests, Version=1.0.0.260, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\cf-dotnet-sdk.1.0.0.260-alpha\lib\Net45\CloudFoundry.Manifests.XML\CloudFoundry.Manifests.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CloudFoundry.UAA.Client, Version=1.0.0.257, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\cf-dotnet-sdk.1.0.0.257-alpha\lib\Net45\CloudFoundry.UAA.Client.dll</HintPath>
<Reference Include="CloudFoundry.UAA.Client, Version=1.0.0.260, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\cf-dotnet-sdk.1.0.0.260-alpha\lib\Net45\CloudFoundry.UAA.Client.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="envdte, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
Expand Down Expand Up @@ -125,7 +125,7 @@
<HintPath>..\..\packages\WebSocket4Net.0.12\lib\net45\WebSocket4Net.dll</HintPath>
</Reference>
<Reference Include="WebSocket4Net.ProxyUtilities, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\cf-dotnet-sdk.1.0.0.257-alpha\lib\Net45\WebSocket4Net.ProxyUtilities.dll</HintPath>
<HintPath>..\..\packages\cf-dotnet-sdk.1.0.0.260-alpha\lib\Net45\WebSocket4Net.ProxyUtilities.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="WindowsBase" />
Expand Down
2 changes: 1 addition & 1 deletion src/CloudFoundry.VisualStudio.UnitTests/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="cf-dotnet-sdk" version="1.0.0.257-alpha" targetFramework="net45" />
<package id="cf-dotnet-sdk" version="1.0.0.260-alpha" targetFramework="net45" />
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net45" />
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
Expand Down
30 changes: 15 additions & 15 deletions src/CloudFoundry.VisualStudio/CloudFoundry.VisualStudio.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -52,32 +52,32 @@
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="CloudFoundry.CloudController.Common, Version=1.0.0.257, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\cf-dotnet-sdk.1.0.0.257-alpha\lib\Net45\CloudFoundry.CloudController.Common.dll</HintPath>
<Reference Include="CloudFoundry.CloudController.Common, Version=1.0.0.260, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\cf-dotnet-sdk.1.0.0.260-alpha\lib\Net45\CloudFoundry.CloudController.Common.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CloudFoundry.CloudController.V2.Client, Version=1.0.0.257, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\cf-dotnet-sdk.1.0.0.257-alpha\lib\Net45\CloudFoundry.CloudController.V2.Client.dll</HintPath>
<Reference Include="CloudFoundry.CloudController.V2.Client, Version=1.0.0.260, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\cf-dotnet-sdk.1.0.0.260-alpha\lib\Net45\CloudFoundry.CloudController.V2.Client.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CloudFoundry.CloudController.V3.Client, Version=1.0.0.257, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\cf-dotnet-sdk.1.0.0.257-alpha\lib\Net45\CloudFoundry.CloudController.V3.Client.dll</HintPath>
<Reference Include="CloudFoundry.CloudController.V3.Client, Version=1.0.0.260, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\cf-dotnet-sdk.1.0.0.260-alpha\lib\Net45\CloudFoundry.CloudController.V3.Client.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CloudFoundry.Loggregator.Client, Version=1.0.0.257, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\cf-dotnet-sdk.1.0.0.257-alpha\lib\Net45\CloudFoundry.Loggregator.Client.dll</HintPath>
<Reference Include="CloudFoundry.Loggregator.Client, Version=1.0.0.260, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\cf-dotnet-sdk.1.0.0.260-alpha\lib\Net45\CloudFoundry.Loggregator.Client.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CloudFoundry.Logyard.Client, Version=1.0.0.257, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\cf-dotnet-sdk.1.0.0.257-alpha\lib\Net45\CloudFoundry.Logyard.Client.dll</HintPath>
<Reference Include="CloudFoundry.Logyard.Client, Version=1.0.0.260, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\cf-dotnet-sdk.1.0.0.260-alpha\lib\Net45\CloudFoundry.Logyard.Client.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CloudFoundry.Manifests, Version=1.0.0.257, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\cf-dotnet-sdk.1.0.0.257-alpha\lib\Net45\CloudFoundry.Manifests.XML\CloudFoundry.Manifests.dll</HintPath>
<Reference Include="CloudFoundry.Manifests, Version=1.0.0.260, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\cf-dotnet-sdk.1.0.0.260-alpha\lib\Net45\CloudFoundry.Manifests.XML\CloudFoundry.Manifests.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CloudFoundry.UAA.Client, Version=1.0.0.257, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\cf-dotnet-sdk.1.0.0.257-alpha\lib\Net45\CloudFoundry.UAA.Client.dll</HintPath>
<Reference Include="CloudFoundry.UAA.Client, Version=1.0.0.260, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\cf-dotnet-sdk.1.0.0.260-alpha\lib\Net45\CloudFoundry.UAA.Client.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Build" />
Expand Down Expand Up @@ -168,7 +168,7 @@
<Private>True</Private>
</Reference>
<Reference Include="WebSocket4Net.ProxyUtilities, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\cf-dotnet-sdk.1.0.0.257-alpha\lib\Net45\WebSocket4Net.ProxyUtilities.dll</HintPath>
<HintPath>..\..\packages\cf-dotnet-sdk.1.0.0.260-alpha\lib\Net45\WebSocket4Net.ProxyUtilities.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="WindowsBase" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,12 @@ private void ButtonBuildAndPushProjectExecuteHandler(object sender, EventArgs e)
}
catch (VisualStudioException ex)
{
MessageBoxHelper.DisplayError(string.Format(CultureInfo.InvariantCulture, "Error loading publish profile {0}", ex.Message));
MessageBoxHelper.DisplayError(string.Format(CultureInfo.InvariantCulture, "Error loading publish profile: {0}", ex.Message));
Logger.Error("Error loading publish profile", ex);
}
catch (Exception ex)
{
MessageBoxHelper.DisplayError(string.Format(CultureInfo.InvariantCulture, "An error occurred while trying to load a publish profile {0}", ex.Message));
MessageBoxHelper.DisplayError(string.Format(CultureInfo.InvariantCulture, "An error occurred while trying to load a publish profile: {0}", ex.Message));
Logger.Error("Error loading default profile", ex);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/CloudFoundry.VisualStudio/Forms/LoginForm.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

<TextBox Name="InfoMessage" Grid.Row="9" Grid.Column="1" Margin="25,0,0,0" Background="Transparent" IsReadOnly="True" TextWrapping="Wrap" BorderBrush="Transparent"></TextBox>

<TextBox Grid.Row="10" Grid.Column="0" IsReadOnly="True" TextWrapping="Wrap"
<TextBox Grid.Row="10" Grid.Column="0" Margin="5" IsReadOnly="True" TextWrapping="Wrap"
BorderBrush="Transparent" ScrollViewer.VerticalScrollBarVisibility="Auto"
Foreground="Crimson" MinLines="3" MaxLines="3" Background="Transparent"
Text="{Binding Path=ErrorMessage}"
Expand Down
9 changes: 9 additions & 0 deletions src/CloudFoundry.VisualStudio/ProjectPush/PublishProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,11 @@ public static PublishProfile Load(PushEnvironment pushEnvironment)
xmlReader.ReadToDescendant("PropertyGroup");
publishProfile = (PublishProfile)serializer.Deserialize(xmlReader.ReadSubtree());
}

if (string.IsNullOrWhiteSpace(publishProfile.Version))
{
throw new VisualStudioException("This publish profile is not compatible with the current version, please recreate it");
}
}
else
{
Expand All @@ -354,6 +359,10 @@ public static PublishProfile Load(PushEnvironment pushEnvironment)
publishProfile.environment = pushEnvironment;
publishProfile.LoadManifest();
}
catch (VisualStudioException)
{
throw;
}
catch (Exception ex)
{
throw new VisualStudioException("Error loading profile", ex);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,11 @@ private async Task RefreshClient()

try
{
if (this.selectedPublishProfile.ServerUri == null)
{
throw new InvalidOperationException("Please provide a target.");
}

this.LastRefreshTarget = PublishProfileRefreshTarget.Client;

this.client = new CloudFoundryClient(
Expand Down
2 changes: 1 addition & 1 deletion src/CloudFoundry.VisualStudio/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="cf-dotnet-sdk" version="1.0.0.257-alpha" targetFramework="net45" />
<package id="cf-dotnet-sdk" version="1.0.0.260-alpha" targetFramework="net45" />
<package id="Extended.Wpf.Toolkit" version="2.4" targetFramework="net45" />
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net45" />
Expand Down

0 comments on commit 98699fc

Please sign in to comment.