Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Bringing master to dev #403

Merged
merged 12 commits into from

2 participants

@christav

Bringing token cloud credentials and preliminary Windows 8 support to master.

@christav christav referenced this pull request in Azure/azure-sdk-tools
Merged

Fix token null ref #2235

@christav christav merged commit 72e49ec into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 9, 2014
  1. @stankovski

    Added Common.WindowsStore library and associated test project

    stankovski authored
    Created NuGet package for Windows8 version of the Common library
  2. @stankovski
  3. @stankovski
Commits on Jan 10, 2014
  1. @stankovski
  2. @stankovski

    Removed processor specific build environments and excluded WindowsSto…

    stankovski authored
    …re.Test project from build (until can figure a way to include PFX on the server)
  3. @stankovski

    Addressed code review comments:

    stankovski authored
    Added comments to HttpTransportHandlerProvider.cs
    Moved exclusion for pfx to common gitignore
    Fixed spacing in Microsoft.WindowsAzure.Common.nuspec
  4. @stankovski

    Merge pull request #392 from stankovski/store-app

    stankovski authored
    Support for Windows Store Apps
Commits on Jan 13, 2014
  1. @stankovski
  2. @stankovski
  3. @christav

    Merge pull request #400 from stankovski/token-credentials

    christav authored
    Token credentials
Commits on Jan 16, 2014
  1. @christav

    Updated version # of common

    christav authored
  2. @christav

    Merge pull request #402 from christav/update-common-tokens

    christav authored
    Updated version # of common
This page is out of date. Refresh to see the latest.
Showing with 722 additions and 12 deletions.
  1. +4 −0 .gitignore
  2. +20 −9 WindowsAzureLibraries.sln
  3. +2 −0  packages/repositories.config
  4. +13 −0 src/Common.Test/TokenCloudCredentialsTest.cs
  5. +101 −0 src/Common.WindowsStore.Test/Common.WindowsStore.Test.csproj
  6. BIN  src/Common.WindowsStore.Test/Images/UnitTestLogo.png
  7. BIN  src/Common.WindowsStore.Test/Images/UnitTestSmallLogo.png
  8. BIN  src/Common.WindowsStore.Test/Images/UnitTestSplashScreen.png
  9. BIN  src/Common.WindowsStore.Test/Images/UnitTestStoreLogo.png
  10. +32 −0 src/Common.WindowsStore.Test/Package.appxmanifest
  11. +31 −0 src/Common.WindowsStore.Test/Properties/AssemblyInfo.cs
  12. +78 −0 src/Common.WindowsStore.Test/StoreAppTest.cs
  13. +7 −0 src/Common.WindowsStore.Test/packages.config
  14. +85 −0 src/Common.WindowsStore/CertificateCloudCredentials.cs
  15. +64 −0 src/Common.WindowsStore/Common.WindowsStore.csproj
  16. +39 −0 src/Common.WindowsStore/Platform/CertificateCloudCredentialsProvider.cs
  17. +67 −0 src/Common.WindowsStore/Platform/CloudConfigurationProvider.cs
  18. +43 −0 src/Common.WindowsStore/Platform/CryptographyProvider.cs
  19. +31 −0 src/Common.WindowsStore/Platform/HttpTransportHandlerProvider.cs
  20. +34 −0 src/Common.WindowsStore/Properties/AssemblyInfo.cs
  21. +7 −0 src/Common.WindowsStore/packages.config
  22. +24 −2 src/Common/Credentials/TokenCloudCredentials.cs
  23. +1 −1  src/Common/Microsoft.WindowsAzure.Common.nuget.proj
  24. +11 −0 src/Common/Microsoft.WindowsAzure.Common.nuspec
  25. +8 −0 src/library.props
  26. +1 −0  src/library.targets
  27. +1 −0  src/references.props
  28. +18 −0 src/references.windows8.props
View
4 .gitignore
@@ -103,6 +103,10 @@ Generated_Code #added for RIA/Silverlight projects
# Build tasks
tools/*.dll
+# Sensitive files
+*.keys
+*.pfx
+
# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
View
29 WindowsAzureLibraries.sln
@@ -1,8 +1,6 @@

Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2013
-VisualStudioVersion = 12.0.21005.1
-MinimumVisualStudioVersion = 10.0.40219.1
+# Visual Studio 2012
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{868850B4-1073-41A1-ABA8-A3B465880148}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common", "src\Common\Common.csproj", "{856A1D19-C3BF-439A-BEBF-E822A332BC12}"
@@ -46,8 +44,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Monitoring", "src\Monitorin
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "git", "git", "{EAC2DE24-42C6-4B7F-ACAB-73C0E113FC40}"
ProjectSection(SolutionItems) = preProject
- ..\.gitignore = ..\.gitignore
- ..\README.md = ..\README.md
+ .gitignore = .gitignore
+ README.md = README.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "product", "product", "{CECF3E21-0555-4C3C-B736-547D95A6E434}"
@@ -74,7 +72,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.WindowsAzure.Conf
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaServicesManagement", "src\MediaServicesManagement\MediaServicesManagement.csproj", "{25DCF6F0-7972-4387-8810-0370B92B4135}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common.WindowsStore", "src\Common.WindowsStore\Common.WindowsStore.csproj", "{65C1AFA4-9F6A-4105-B28C-AA1B95C17494}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common.WindowsStore.Test", "src\Common.WindowsStore.Test\Common.WindowsStore.Test.csproj", "{6B9F0F97-9B59-4623-BF3E-AE0026FB083D}"
+EndProject
Global
+ GlobalSection(TestCaseManagementSettings) = postSolution
+ CategoryFile = WindowsAzureLibraries.vsmdi
+ EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
@@ -156,6 +161,14 @@ Global
{25DCF6F0-7972-4387-8810-0370B92B4135}.Debug|Any CPU.Build.0 = Debug|Any CPU
{25DCF6F0-7972-4387-8810-0370B92B4135}.Release|Any CPU.ActiveCfg = Release|Any CPU
{25DCF6F0-7972-4387-8810-0370B92B4135}.Release|Any CPU.Build.0 = Release|Any CPU
+ {65C1AFA4-9F6A-4105-B28C-AA1B95C17494}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {65C1AFA4-9F6A-4105-B28C-AA1B95C17494}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {65C1AFA4-9F6A-4105-B28C-AA1B95C17494}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {65C1AFA4-9F6A-4105-B28C-AA1B95C17494}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6B9F0F97-9B59-4623-BF3E-AE0026FB083D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6B9F0F97-9B59-4623-BF3E-AE0026FB083D}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+ {6B9F0F97-9B59-4623-BF3E-AE0026FB083D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6B9F0F97-9B59-4623-BF3E-AE0026FB083D}.Release|Any CPU.Deploy.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -177,12 +190,10 @@ Global
{50B0A8CE-D290-4EB7-8C6C-16EAAB75225E} = {868850B4-1073-41A1-ABA8-A3B465880148}
{2EFD6648-39B4-476A-B302-8BC236F5F1B8} = {868850B4-1073-41A1-ABA8-A3B465880148}
{25DCF6F0-7972-4387-8810-0370B92B4135} = {868850B4-1073-41A1-ABA8-A3B465880148}
+ {65C1AFA4-9F6A-4105-B28C-AA1B95C17494} = {868850B4-1073-41A1-ABA8-A3B465880148}
{B2FAA0E6-2643-4011-8CFE-BA28BDFFC7E7} = {7C044DD1-F76B-49A7-A8DF-A5DEEE748EBB}
{CB18ACEB-2825-4884-91FA-05C31AC779FE} = {7C044DD1-F76B-49A7-A8DF-A5DEEE748EBB}
{0645E75E-9C0B-47EE-B5A2-239286E1DED9} = {7C044DD1-F76B-49A7-A8DF-A5DEEE748EBB}
- EndGlobalSection
-EndGlobal
- GlobalSection(TestCaseManagementSettings) = postSolution
- CategoryFile = WindowsAzureLibraries.vsmdi
+ {6B9F0F97-9B59-4623-BF3E-AE0026FB083D} = {7C044DD1-F76B-49A7-A8DF-A5DEEE748EBB}
EndGlobalSection
EndGlobal
View
2  packages/repositories.config
@@ -5,6 +5,8 @@
<repository path="..\src\Common.Tracing.Etw\packages.config" />
<repository path="..\src\Common.Tracing.Log4Net\packages.config" />
<repository path="..\src\Common.Tracing.Test\packages.config" />
+ <repository path="..\src\Common.WindowsStoreApp.Test\packages.config" />
+ <repository path="..\src\Common.WindowsStoreApp\packages.config" />
<repository path="..\src\Common\packages.config" />
<repository path="..\src\ComputeManagement\packages.config" />
<repository path="..\src\Management\packages.config" />
View
13 src/Common.Test/TokenCloudCredentialsTest.cs
@@ -34,6 +34,19 @@ public void TokenCloudCredentialAddsHeader()
}
[Fact]
+ public void TokenCloudCredentialWithoutSubscriptionAddsHeader()
+ {
+ var tokenCredentials = new TokenCloudCredentials("abc");
+ var handler = new RecordedDelegatingHandler { StatusCodeToReturn = HttpStatusCode.OK };
+ var fakeClient = new FakeServiceClientWithCredentials(tokenCredentials).WithHandler(handler);
+ fakeClient.DoStuff().Wait();
+
+ Assert.Null(fakeClient.Credentials.SubscriptionId);
+ Assert.Equal("Bearer", handler.RequestHeaders.Authorization.Scheme);
+ Assert.Equal("abc", handler.RequestHeaders.Authorization.Parameter);
+ }
+
+ [Fact]
public void TokenCloudCredentialUpdatesHeader()
{
var credentials = new TokenCloudCredentials("123", "abc");
View
101 src/Common.WindowsStore.Test/Common.WindowsStore.Test.csproj
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <WindowsAzureLibraryProfileSet>windows8</WindowsAzureLibraryProfileSet>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{6B9F0F97-9B59-4623-BF3E-AE0026FB083D}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Microsoft.WindowsAzure.Common.WindowsStoreApp.Test</RootNamespace>
+ <AssemblyName>Microsoft.WindowsAzure.Common.WindowsStore.Test</AssemblyName>
+ <DefaultLanguage>en-US</DefaultLanguage>
+ <PackageCertificateKeyFile>Common.WindowsStore.Test_TemporaryKey.pfx</PackageCertificateKeyFile>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>true</RestorePackages>
+ <PackageCertificateThumbprint>549C71001B8A198132D590A6461209A8C87B3FFA</PackageCertificateThumbprint>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;NETFX_CORE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE;NETFX_CORE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <Import Project="..\library.props" />
+ <PropertyGroup>
+ <AppXPackage>True</AppXPackage>
+ <AppxPackageIncludePrivateSymbols>true</AppxPackageIncludePrivateSymbols>
+ </PropertyGroup>
+ <ItemGroup>
+ <!--A reference to the entire .Net Framework and Windows SDK are automatically included-->
+ <SDKReference Include="MSTestFramework, Version=11.0" />
+ <SDKReference Include="TestPlatform, Version=11.0" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="StoreAppTest.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <AppxManifest Include="Package.appxmanifest">
+ <SubType>Designer</SubType>
+ </AppxManifest>
+ <Content Include="certificate.keys" Condition="Exists('certificate.keys')">
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ </Content>
+ <None Include="Common.WindowsStore.Test_TemporaryKey.pfx" />
+ <None Include="packages.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="Images\UnitTestLogo.png">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="Images\UnitTestSmallLogo.png">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="Images\UnitTestSplashScreen.png">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="Images\UnitTestStoreLogo.png">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\Common.WindowsStore\Common.WindowsStore.csproj">
+ <Project>{65c1afa4-9f6a-4105-b28c-aa1b95c17494}</Project>
+ <Name>Common.WindowsStore</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Common\Common.csproj">
+ <Project>{856a1d19-c3bf-439a-bebf-e822a332bc12}</Project>
+ <Name>Common</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Management\Management.csproj">
+ <Project>{2b6d304f-5dc0-4052-a8ab-80e53c291e5f}</Project>
+ <Name>Management</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '11.0' ">
+ <VisualStudioVersion>11.0</VisualStudioVersion>
+ </PropertyGroup>
+ <Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
+ <Import Project="..\..\packages\Microsoft.Bcl.Build.1.0.13\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\packages\Microsoft.Bcl.Build.1.0.13\tools\Microsoft.Bcl.Build.targets')" />
+ <Target Name="EnsureBclBuildImported" BeforeTargets="BeforeBuild" Condition="'$(BclBuildImported)' == ''">
+ <Error Condition="!Exists('..\..\packages\Microsoft.Bcl.Build.1.0.13\tools\Microsoft.Bcl.Build.targets')" Text="This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567." HelpKeyword="BCLBUILD2001" />
+ <Error Condition="Exists('..\..\packages\Microsoft.Bcl.Build.1.0.13\tools\Microsoft.Bcl.Build.targets')" Text="The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568." HelpKeyword="BCLBUILD2002" />
+ </Target>
+ <Import Project="$(SolutionDir)\.nuget\nuget.targets" />
+ <Import Project="$(ProjectDir)\..\library.targets" />
+</Project>
View
BIN  src/Common.WindowsStore.Test/Images/UnitTestLogo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  src/Common.WindowsStore.Test/Images/UnitTestSmallLogo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  src/Common.WindowsStore.Test/Images/UnitTestSplashScreen.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  src/Common.WindowsStore.Test/Images/UnitTestStoreLogo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
32 src/Common.WindowsStore.Test/Package.appxmanifest
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest">
+ <Identity Name="4533976f-e2b8-4a36-858f-6682b238697c" Publisher="CN=destanko" Version="1.0.0.0" />
+ <Properties>
+ <DisplayName>Common.WindowsStoreApp.Test</DisplayName>
+ <PublisherDisplayName>Microsoft</PublisherDisplayName>
+ <Logo>Images\UnitTestStoreLogo.png</Logo>
+ <Description>Common.WindowsStoreApp.Test</Description>
+ </Properties>
+ <Prerequisites>
+ <OSMinVersion>6.2.1</OSMinVersion>
+ <OSMaxVersionTested>6.2.1</OSMaxVersionTested>
+ </Prerequisites>
+ <Resources>
+ <Resource Language="x-generate" />
+ </Resources>
+ <Applications>
+ <Application Id="vstest.executionengine.App" Executable="vstest.executionengine.appcontainer.exe" EntryPoint="vstest.executionengine.App">
+ <VisualElements DisplayName="NoUIEntryPoints" Logo="Images\UnitTestLogo.png" SmallLogo="Images\UnitTestSmallLogo.png" Description="vstest.executionengine.App" ForegroundText="light" BackgroundColor="#0084FF">
+ <SplashScreen Image="Images\UnitTestSplashScreen.png" />
+ </VisualElements>
+ </Application>
+ <Application Id="vstest.executionengine.x86.App" Executable="vstest.executionengine.appcontainer.x86.exe" EntryPoint="vstest.executionengine.x86.App">
+ <VisualElements DisplayName="NoUIEntryPoints" Logo="Images\UnitTestLogo.png" SmallLogo="Images\UnitTestSmallLogo.png" Description="vstest.executionengine.x86.App" ForegroundText="light" BackgroundColor="#0084FF">
+ <SplashScreen Image="Images\UnitTestSplashScreen.png" />
+ </VisualElements>
+ </Application>
+ </Applications>
+ <Capabilities>
+ <Capability Name="internetClient" />
+ </Capabilities>
+</Package>
View
31 src/Common.WindowsStore.Test/Properties/AssemblyInfo.cs
@@ -0,0 +1,31 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using System.Reflection;
+using System.Resources;
+
+[assembly: AssemblyTitle("Windows Azure Windows Store App Common Library Tests")]
+[assembly: AssemblyDescription("Tests for the Windows Azure Windows Store App Common Library.")]
+
+[assembly: AssemblyVersion("0.9.0.0")]
+[assembly: AssemblyFileVersion("0.9.0.0")]
+
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("Windows Azure .NET SDK")]
+[assembly: AssemblyCopyright("Copyright © Microsoft Corporation")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: NeutralResourcesLanguage("en")]
View
78 src/Common.WindowsStore.Test/StoreAppTest.cs
@@ -0,0 +1,78 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using System;
+using System.Net;
+using System.Threading.Tasks;
+using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
+using Microsoft.WindowsAzure.Management;
+using Windows.Security.Cryptography.Certificates;
+using Windows.Storage;
+
+namespace Microsoft.WindowsAzure.Common.WindowsStoreApp.Test
+{
+ [TestClass]
+ public class StoreAppTest
+ {
+ private static string _certificateString;
+ private static string _subscription;
+ private static string _certificatePassword;
+
+ [TestInitialize]
+ public void Setup()
+ {
+ GetCertificate().Wait();
+ }
+
+ [TestMethod]
+ public void ManagementClientReturnsLocationList()
+ {
+ // Import certificate
+ CertificateEnrollmentManager.ImportPfxDataAsync(_certificateString, _certificatePassword, ExportOption.NotExportable,
+ KeyProtectionLevel.NoConsent, InstallOptions.None,
+ "test").AsTask().Wait();
+
+ var credentials = new CertificateCloudCredentials(_subscription);
+ var client = new ManagementClient(credentials);
+ var result = client.Locations.List();
+
+ Assert.AreEqual(HttpStatusCode.OK, result.StatusCode);
+ Assert.IsTrue(result.Locations.Count > 0);
+ }
+
+ private static async Task GetCertificate()
+ {
+ const string path = "certificate.keys";
+ var folder = Windows.ApplicationModel.Package.Current.InstalledLocation;
+ var file = await folder.GetFileAsync(path);
+ var lines = await FileIO.ReadLinesAsync(file);
+ foreach (var line in lines)
+ {
+ if (line.StartsWith("TEST_CERTIFICATE="))
+ {
+ _certificateString = line.Substring("TEST_CERTIFICATE=".Length);
+ }
+ if (line.StartsWith("TEST_CERTIFICATE_PASSWORD="))
+ {
+ _certificatePassword = line.Substring("TEST_CERTIFICATE_PASSWORD=".Length);
+ }
+ if (line.StartsWith("TEST_SUBSCRIPTION="))
+ {
+ _subscription = line.Substring("TEST_SUBSCRIPTION=".Length);
+ }
+ }
+ }
+ }
+}
View
7 src/Common.WindowsStore.Test/packages.config
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="Microsoft.Bcl" version="1.1.6" targetFramework="win" />
+ <package id="Microsoft.Bcl.Async" version="1.0.165" targetFramework="win" />
+ <package id="Microsoft.Bcl.Build" version="1.0.13" targetFramework="win" />
+ <package id="Microsoft.Net.Http" version="2.2.18" targetFramework="win" />
+</packages>
View
85 src/Common.WindowsStore/CertificateCloudCredentials.cs
@@ -0,0 +1,85 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using System;
+using System.Collections.Generic;
+using Microsoft.WindowsAzure.Common.Internals;
+
+namespace Microsoft.WindowsAzure
+{
+ /// <summary>
+ /// Credentials using a management certificate from the app store to authorize requests.
+ /// </summary>
+ public sealed class CertificateCloudCredentials
+ : SubscriptionCloudCredentials
+ {
+ // The Windows Azure Subscription ID.
+ private readonly string _subscriptionId = null;
+
+ /// <summary>
+ /// Gets subscription ID which uniquely identifies Windows Azure
+ /// subscription. The subscription ID forms part of the URI for
+ /// every call that you make to the Service Management API.
+ /// </summary>
+ public override string SubscriptionId
+ {
+ get { return _subscriptionId; }
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the CertificateCloudCredentials
+ /// class.
+ /// </summary>
+ /// <param name="subscriptionId">The Subscription ID.</param>
+ public CertificateCloudCredentials(string subscriptionId)
+ {
+ if (subscriptionId == null)
+ {
+ throw new ArgumentNullException("subscriptionId");
+ }
+ else if (subscriptionId.Length == 0)
+ {
+ throw CloudExtensions.CreateArgumentEmptyException("subscriptionId");
+ }
+
+ _subscriptionId = subscriptionId;
+ }
+
+ /// <summary>
+ /// Attempt to create certificate credentials from a collection of
+ /// settings.
+ /// </summary>
+ /// <param name="settings">The settings to use.</param>
+ /// <returns>
+ /// CertificateCloudCredentials is created, null otherwise.
+ /// </returns>
+ public static CertificateCloudCredentials Create(IDictionary<string, object> settings)
+ {
+ if (settings == null)
+ {
+ throw new ArgumentNullException("settings");
+ }
+
+ string subscriptionId = ConfigurationHelper.GetString(settings, "SubscriptionId", false);
+
+ if (subscriptionId != null)
+ {
+ return new CertificateCloudCredentials(subscriptionId);
+ }
+
+ return null;
+ }
+ }
+}
View
64 src/Common.WindowsStore/Common.WindowsStore.csproj
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <WindowsAzureLibraryProfileSet>windows8</WindowsAzureLibraryProfileSet>
+ <ProjectGuid>{65C1AFA4-9F6A-4105-B28C-AA1B95C17494}</ProjectGuid>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Microsoft.WindowsAzure.Common</RootNamespace>
+ <AssemblyName>Microsoft.WindowsAzure.Common.WindowsStore</AssemblyName>
+ <OutputType>Library</OutputType>
+ <RestorePackages>true</RestorePackages>
+ <DefaultLanguage>en-US</DefaultLanguage>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;NETFX_CORE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <DocumentationFile>bin\Debug\Microsoft.WindowsAzure.Common.WindowsStore.xml</DocumentationFile>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE;NETFX_CORE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <Import Project="..\library.props" />
+ <ItemGroup>
+ <Compile Include="CertificateCloudCredentials.cs" />
+ <Compile Include="Platform\CertificateCloudCredentialsProvider.cs" />
+ <Compile Include="Platform\CloudConfigurationProvider.cs" />
+ <Compile Include="Platform\CryptographyProvider.cs" />
+ <Compile Include="Platform\HttpTransportHandlerProvider.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
+ <ProjectReference Include="..\Common\Common.csproj">
+ <Project>{856a1d19-c3bf-439a-bebf-e822a332bc12}</Project>
+ <Name>Common</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="packages.config" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
+ <Import Project="..\..\packages\Microsoft.Bcl.Build.1.0.13\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\packages\Microsoft.Bcl.Build.1.0.13\tools\Microsoft.Bcl.Build.targets')" />
+ <Target Name="EnsureBclBuildImported" BeforeTargets="BeforeBuild" Condition="'$(BclBuildImported)' == ''">
+ <Error Condition="!Exists('..\..\packages\Microsoft.Bcl.Build.1.0.13\tools\Microsoft.Bcl.Build.targets')" Text="This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567." HelpKeyword="BCLBUILD2001" />
+ <Error Condition="Exists('..\..\packages\Microsoft.Bcl.Build.1.0.13\tools\Microsoft.Bcl.Build.targets')" Text="The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568." HelpKeyword="BCLBUILD2002" />
+ </Target>
+ <Import Project="$(SolutionDir)\.nuget\nuget.targets" />
+ <Import Project="$(ProjectDir)\..\library.targets" />
+</Project>
View
39 src/Common.WindowsStore/Platform/CertificateCloudCredentialsProvider.cs
@@ -0,0 +1,39 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using System;
+using System.Collections.Generic;
+
+namespace Microsoft.WindowsAzure.Common.Platform
+{
+ /// <summary>
+ /// Cloud credentials provider for .NET Framework clients.
+ /// </summary>
+ internal class CertificateCloudCredentialsProvider
+ : ICloudCredentialsProvider
+ {
+ /// <summary>
+ /// Creates a new credentials instance if the appropriate settings for
+ /// this provider are present and valid.
+ /// </summary>
+ /// <param name="settings">Dictionary of configuration settings.</param>
+ /// <returns>Returns a new instance if the provider supports the
+ /// provided settings.</returns>
+ public CloudCredentials CreateCredentials(IDictionary<string, object> settings)
+ {
+ return CertificateCloudCredentials.Create(settings);
+ }
+ }
+}
View
67 src/Common.WindowsStore/Platform/CloudConfigurationProvider.cs
@@ -0,0 +1,67 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+
+using System;
+using System.Collections.Generic;
+using Microsoft.WindowsAzure.Common.Internals;
+
+namespace Microsoft.WindowsAzure.Common.Platform
+{
+ internal class CloudConfigurationProvider
+ : ICloudConfigurationProvider
+ {
+ private static IEnumerable<Func<string, string>> ConfigurationSources
+ {
+ get
+ {
+ yield return GetLocalSetting;
+ }
+ }
+
+ /// <summary>
+ /// Registers cloud configuration providers with the common runtime
+ /// that require the .NET framework.
+ /// </summary>
+ public void RegisterDefaultCloudCredentialsProviders()
+ {
+ CloudConfiguration.RegisterCloudCredentialsProvider(new CertificateCloudCredentialsProvider());
+ }
+
+ public string GetSetting(string name)
+ {
+ return ConfigurationHelper.LookupSetting(ConfigurationSources, name);
+ }
+
+ public IDictionary<string, object> GetConnectionInfo(Type type, string name, out string settingsName, out string settingsValue)
+ {
+ return ConfigurationHelper.LookupConnectionInfo(ConfigurationSources, type, name, out settingsName, out settingsValue);
+ }
+
+ private static string GetLocalSetting(string name)
+ {
+ var localSettings = Windows.Storage.ApplicationData.Current.LocalSettings;
+
+ object setting;
+ string settingAsString = null;
+ if (localSettings.Values.TryGetValue(name, out setting) && setting != null)
+ {
+ settingAsString = setting.ToString();
+ }
+ Tracing.Configuration("AppConfig", name, settingAsString);
+ return settingAsString;
+ }
+ }
+}
View
43 src/Common.WindowsStore/Platform/CryptographyProvider.cs
@@ -0,0 +1,43 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using Windows.Security.Cryptography;
+using Windows.Security.Cryptography.Core;
+
+namespace Microsoft.WindowsAzure.Common.Platform
+{
+ internal class CryptographyProvider : ICryptographyProvider
+ {
+ /// <summary>
+ /// Computes SHA256 hash from key and data using HMACSHA256.
+ /// </summary>
+ /// <param name="key">Key to use as hash salt.</param>
+ /// <param name="data">Data to hash.</param>
+ /// <returns>Hash value.</returns>
+ public byte[] ComputeHmacSha256Hash(byte[] key, byte[] data)
+ {
+ MacAlgorithmProvider macAlgorithmProvider = MacAlgorithmProvider.OpenAlgorithm("HMAC_SHA256");
+ var dataBuffer = CryptographicBuffer.CreateFromByteArray(data);
+ var keyBuffer = CryptographicBuffer.CreateFromByteArray(key);
+ var hmacKey = macAlgorithmProvider.CreateKey(keyBuffer);
+ var hmacBuffer = CryptographicEngine.Sign(hmacKey, dataBuffer);
+
+ byte[] sha256Hash;
+ CryptographicBuffer.CopyToByteArray(hmacBuffer, out sha256Hash);
+
+ return sha256Hash;
+ }
+ }
+}
View
31 src/Common.WindowsStore/Platform/HttpTransportHandlerProvider.cs
@@ -0,0 +1,31 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using System.Net.Http;
+
+namespace Microsoft.WindowsAzure.Common.Platform
+{
+ internal class HttpTransportHandlerProvider : IHttpTransportHandlerProvider
+ {
+ public HttpMessageHandler CreateHttpTransportHandler()
+ {
+ var httpHandler = new HttpClientHandler();
+ // When ClientCertificateOptions is set to Automatic, HttpClient will use all certificates with
+ // EKU 1.3.6.1.5.5.7.3.2 and CERT_DIGITAL_SIGNATURE_KEY_USAGE from current user MY store
+ httpHandler.ClientCertificateOptions = ClientCertificateOption.Automatic;
+ return httpHandler;
+ }
+ }
+}
View
34 src/Common.WindowsStore/Properties/AssemblyInfo.cs
@@ -0,0 +1,34 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using System.Reflection;
+using System.Resources;
+using System.Runtime.InteropServices;
+
+[assembly: AssemblyTitle("Windows Azure Common Library (Windows Store App)")]
+[assembly: AssemblyDescription("Provides Windows Store App-specific extensions to the common Windows Azure library.")]
+[assembly: AssemblyVersion("0.9.0.0")]
+[assembly: AssemblyFileVersion("0.9.0.0")]
+
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("Windows Azure .NET SDK")]
+[assembly: AssemblyCopyright("Copyright © Microsoft Corporation")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: NeutralResourcesLanguage("en")]
+
+[assembly: ComVisible(false)]
+[assembly: Guid("1330EBA3-481A-4504-A900-B4E0737F18AA")]
View
7 src/Common.WindowsStore/packages.config
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="Microsoft.Bcl" version="1.1.6" targetFramework="win" />
+ <package id="Microsoft.Bcl.Async" version="1.0.165" targetFramework="win" />
+ <package id="Microsoft.Bcl.Build" version="1.0.13" targetFramework="win" />
+ <package id="Microsoft.Net.Http" version="2.2.18" targetFramework="win" />
+</packages>
View
26 src/Common/Credentials/TokenCloudCredentials.cs
@@ -19,7 +19,6 @@
using System.Net.Http.Headers;
using System.Threading;
using System.Threading.Tasks;
-using Microsoft.WindowsAzure.Common;
using Microsoft.WindowsAzure.Common.Internals;
namespace Microsoft.WindowsAzure
@@ -50,7 +49,7 @@ public override string SubscriptionId
/// <summary>
/// Initializes a new instance of the <see cref="TokenCloudCredentials"/>
- /// class.
+ /// class with subscription ID.
/// </summary>
/// <param name="subscriptionId">The Subscription ID.</param>
/// <param name="token">Valid JSON Web Token (JWT).</param>
@@ -78,6 +77,25 @@ public TokenCloudCredentials(string subscriptionId, string token)
}
/// <summary>
+ /// Initializes a new instance of the <see cref="TokenCloudCredentials"/>
+ /// class without subscription ID.
+ /// </summary>
+ /// <param name="token">Valid JSON Web Token (JWT).</param>
+ public TokenCloudCredentials(string token)
+ {
+ if (token == null)
+ {
+ throw new ArgumentNullException("token");
+ }
+ else if (token.Length == 0)
+ {
+ throw CloudExtensions.CreateArgumentEmptyException("token");
+ }
+
+ Token = token;
+ }
+
+ /// <summary>
/// Attempt to create token credentials from a collection of
/// settings.
/// </summary>
@@ -99,6 +117,10 @@ public static TokenCloudCredentials Create(IDictionary<string, object> settings)
{
return new TokenCloudCredentials(subscriptionId, token);
}
+ else if (token != null)
+ {
+ return new TokenCloudCredentials(token);
+ }
return null;
}
View
2  src/Common/Microsoft.WindowsAzure.Common.nuget.proj
@@ -5,7 +5,7 @@
Microsoft.WindowsAzure.Common
-->
<SdkNuGetPackage Include="Microsoft.WindowsAzure.Common">
- <PackageVersion>0.9.6-preview</PackageVersion>
+ <PackageVersion>0.9.7-preview</PackageVersion>
<Folder>$(MSBuildThisFileDirectory)</Folder>
</SdkNuGetPackage>
View
11 src/Common/Microsoft.WindowsAzure.Common.nuspec
@@ -37,6 +37,10 @@ Supported Portable Library Platforms:
<reference file="Microsoft.WindowsAzure.Common.dll" />
<reference file="Microsoft.WindowsAzure.Common.NetFramework.dll" />
</group>
+ <group targetFramework="windows8">
+ <reference file="Microsoft.WindowsAzure.Common.dll" />
+ <reference file="Microsoft.WindowsAzure.Common.WindowsStore.dll" />
+ </group>
</references>
<dependencies>
<dependency id="Microsoft.WindowsAzure.Common.Dependencies" version="__VERSION_Microsoft.WindowsAzure.Common.Dependencies__" />
@@ -64,5 +68,12 @@ Supported Portable Library Platforms:
<file src="..\binaries\net40\Microsoft.WindowsAzure.Common.NetFramework.dll" target="lib\net40" />
<file src="..\binaries\net40\Microsoft.WindowsAzure.Common.NetFramework.xml" target="lib\net40" />
<file src="..\binaries\net40\Microsoft.WindowsAzure.Common.NetFramework.pdb" target="lib\net40" />
+
+ <file src="..\binaries\Microsoft.WindowsAzure.Common.dll" target="lib\windows8" />
+ <file src="..\binaries\Microsoft.WindowsAzure.Common.pdb" target="lib\windows8" />
+ <file src="..\binaries\Microsoft.WindowsAzure.Common.xml" target="lib\windows8" />
+ <file src="..\binaries\Microsoft.WindowsAzure.Common.WindowsStore.dll" target="lib\windows8" />
+ <file src="..\binaries\Microsoft.WindowsAzure.Common.WindowsStore.xml" target="lib\windows8" />
+ <file src="..\binaries\Microsoft.WindowsAzure.Common.WindowsStore.pdb" target="lib\windows8" />
</files>
</package>
View
8 src/library.props
@@ -50,6 +50,10 @@
<!-- .NET 4.5-only projects -->
<WindowsAzureLibraryPrimaryConfiguration Condition=" '$(WindowsAzureLibraryProfileSet)' == 'net45' And '$(WindowsAzureLibraryPrimaryConfiguration)' == '' ">net45</WindowsAzureLibraryPrimaryConfiguration>
<WindowsAzureLibrarySecondaryConfiguration Condition=" '$(WindowsAzureLibraryProfileSet)' == 'net45' And '$(WindowsAzureLibrarySecondaryConfiguration)' == '' ">net45</WindowsAzureLibrarySecondaryConfiguration>
+
+ <!-- Windows Store App-only projects -->
+ <WindowsAzureLibraryPrimaryConfiguration Condition=" '$(WindowsAzureLibraryProfileSet)' == 'windows8' And '$(WindowsAzureLibraryPrimaryConfiguration)' == '' ">windows8</WindowsAzureLibraryPrimaryConfiguration>
+ <WindowsAzureLibrarySecondaryConfiguration Condition=" '$(WindowsAzureLibraryProfileSet)' == 'windows8' And '$(WindowsAzureLibrarySecondaryConfiguration)' == '' ">windows8</WindowsAzureLibrarySecondaryConfiguration>
</PropertyGroup>
<PropertyGroup>
<WindowsAzureCurrentConfiguration
@@ -75,4 +79,8 @@
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids />
</PropertyGroup>
+ <PropertyGroup Condition=" '$(WindowsAzureCurrentConfiguration)' == 'windows8' ">
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{BC8A1FFA-BEE3-4634-8014-F334798102B3};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ </PropertyGroup>
</Project>
View
1  src/library.targets
@@ -42,6 +42,7 @@
<Import Condition=" '$(WindowsAzureCurrentConfiguration)' == 'portable' And '$(BuildingInsideVisualStudio)' == 'true' " Project="references.portable.props" />
<Import Condition=" '$(WindowsAzureCurrentConfiguration)' == 'net45' And '$(BuildingInsideVisualStudio)' == 'true' " Project="references.net45.props" />
+ <Import Condition=" '$(WindowsAzureCurrentConfiguration)' == 'windows8' And '$(BuildingInsideVisualStudio)' == 'true' " Project="references.windows8.props" />
<!--
Defining defaults depending on development or official build:
View
1  src/references.props
@@ -17,4 +17,5 @@
<Import Project="references.portable.props" />
<Import Project="references.net40.props" />
<Import Project="references.net45.props" />
+ <Import Project="references.windows8.props" />
</Project>
View
18 src/references.windows8.props
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Condition=" '$(WindowsAzureCurrentConfiguration)' == 'windows8' ">
+ <Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\packages\Microsoft.Bcl.Async.1.0.165\lib\win8\Microsoft.Threading.Tasks.dll</HintPath>
+ </Reference>
+ <Reference Include="Microsoft.Threading.Tasks.Extensions">
+ <HintPath>..\..\packages\Microsoft.Bcl.Async.1.0.165\lib\win8\Microsoft.Threading.Tasks.Extensions.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Net.Http.Extensions">
+ <HintPath>..\..\packages\Microsoft.Net.Http.2.2.18\lib\win8\System.Net.Http.Extensions.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Net.Http.Primitives">
+ <HintPath>..\..\packages\Microsoft.Net.Http.2.2.18\lib\win8\System.Net.Http.Primitives.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+</Project>
Something went wrong with that request. Please try again.