Skip to content

Commit fa30a31

Browse files
author
Justin Marks (MSFT)
committed
Fixing DeviceProfileSample to build
1 parent 1e819c1 commit fa30a31

File tree

6 files changed

+123
-43
lines changed

6 files changed

+123
-43
lines changed

DeviceProfileSample/App.config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
5+
</startup>
6+
</configuration>
Lines changed: 67 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,73 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
2-
3-
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
4-
<OutputType>exe</OutputType>
5-
</PropertyGroup>
6-
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
74
<PropertyGroup>
8-
<Description>DirSearcherClient Console Application</Description>
9-
<Authors>Vittorio</Authors>
10-
<TargetFramework>netcoreapp1.0</TargetFramework>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{4B81F1A9-4A60-4793-ABEE-85546AAA480E}</ProjectGuid>
8+
<OutputType>Exe</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>DeviceProfileSample</RootNamespace>
1111
<AssemblyName>DeviceProfileSample</AssemblyName>
12-
<PackageId>DirSearcherClient</PackageId>
13-
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
14-
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
15-
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
16-
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
17-
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
18-
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
19-
<ApplicationIcon />
20-
<OutputTypeEx>exe</OutputTypeEx>
21-
<StartupObject />
12+
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
15+
</PropertyGroup>
16+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17+
<PlatformTarget>AnyCPU</PlatformTarget>
18+
<DebugSymbols>true</DebugSymbols>
19+
<DebugType>full</DebugType>
20+
<Optimize>false</Optimize>
21+
<OutputPath>bin\Debug\</OutputPath>
22+
<DefineConstants>DEBUG;TRACE</DefineConstants>
23+
<ErrorReport>prompt</ErrorReport>
24+
<WarningLevel>4</WarningLevel>
25+
</PropertyGroup>
26+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27+
<PlatformTarget>AnyCPU</PlatformTarget>
28+
<DebugType>pdbonly</DebugType>
29+
<Optimize>true</Optimize>
30+
<OutputPath>bin\Release\</OutputPath>
31+
<DefineConstants>TRACE</DefineConstants>
32+
<ErrorReport>prompt</ErrorReport>
33+
<WarningLevel>4</WarningLevel>
2234
</PropertyGroup>
23-
2435
<ItemGroup>
25-
<PackageReference Include="Microsoft.IdentityModel.Clients.ActiveDirectory" Version="3.13.8" />
26-
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
36+
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory, Version=3.14.1.10, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
37+
<HintPath>packages\Microsoft.IdentityModel.Clients.ActiveDirectory.3.14.1\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll</HintPath>
38+
<Private>True</Private>
39+
</Reference>
40+
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory.Platform, Version=3.14.1.10, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
41+
<HintPath>packages\Microsoft.IdentityModel.Clients.ActiveDirectory.3.14.1\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll</HintPath>
42+
<Private>True</Private>
43+
</Reference>
44+
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
45+
<HintPath>packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
46+
<Private>True</Private>
47+
</Reference>
48+
<Reference Include="System" />
49+
<Reference Include="System.Core" />
50+
<Reference Include="System.Xml.Linq" />
51+
<Reference Include="System.Data.DataSetExtensions" />
52+
<Reference Include="Microsoft.CSharp" />
53+
<Reference Include="System.Data" />
54+
<Reference Include="System.Net.Http" />
55+
<Reference Include="System.Xml" />
2756
</ItemGroup>
28-
29-
<ItemGroup Condition=" '$(TargetFramework)' == 'dnxcore50' ">
30-
<PackageReference Include="Microsoft.CSharp" Version="4.0.1" />
31-
<PackageReference Include="System.Collections" Version="4.0.11" />
32-
<PackageReference Include="System.Console" Version="4.0.0" />
33-
<PackageReference Include="System.Linq" Version="4.1.0" />
34-
<PackageReference Include="System.Threading" Version="4.0.11" />
35-
<PackageReference Include="System.Net.Http" Version="4.1.1" />
57+
<ItemGroup>
58+
<Compile Include="Program.cs" />
59+
<Compile Include="Properties\AssemblyInfo.cs" />
60+
</ItemGroup>
61+
<ItemGroup>
62+
<None Include="App.config" />
63+
<None Include="packages.config" />
3664
</ItemGroup>
37-
38-
</Project>
65+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
66+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
67+
Other similar extension points exist, see Microsoft.Common.targets.
68+
<Target Name="BeforeBuild">
69+
</Target>
70+
<Target Name="AfterBuild">
71+
</Target>
72+
-->
73+
</Project>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 14
4+
VisualStudioVersion = 14.0.25420.1
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeviceProfileSample", "DeviceProfileSample.csproj", "{4B81F1A9-4A60-4793-ABEE-85546AAA480E}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{4B81F1A9-4A60-4793-ABEE-85546AAA480E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{4B81F1A9-4A60-4793-ABEE-85546AAA480E}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{4B81F1A9-4A60-4793-ABEE-85546AAA480E}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{4B81F1A9-4A60-4793-ABEE-85546AAA480E}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
EndGlobal

DeviceProfileSample/Program.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,14 @@ public static void Main(string[] args)
3131
Console.WriteLine("Token expires on: " + result.ExpiresOn);
3232

3333
var bearerAuthHeader = new AuthenticationHeaderValue("Bearer", result.AccessToken);
34-
ListProjects(VSTSAccountName, bearerAuthHeader);
34+
ListProjects(bearerAuthHeader);
3535
}
3636
catch (Exception ex)
3737
{
3838
Console.ForegroundColor = ConsoleColor.Red;
3939
Console.WriteLine("Something went wrong.");
40-
Console.WriteLine("Message: " + exc.Message + "\n");
40+
Console.WriteLine("Message: " + ex.Message + "\n");
4141
}
42-
return result;
4342
}
4443

4544
private static AuthenticationContext GetAuthenticationContext(string tenant)
@@ -60,7 +59,7 @@ private static AuthenticationContext GetAuthenticationContext(string tenant)
6059
return ctx;
6160
}
6261

63-
private static void ListProjects(string vstsAccountName, AuthenticationHeaderValue authHeader)
62+
private static void ListProjects(AuthenticationHeaderValue authHeader)
6463
{
6564
// use the httpclient
6665
using (var client = new HttpClient())

DeviceProfileSample/Properties/AssemblyInfo.cs

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,35 @@
22
using System.Runtime.CompilerServices;
33
using System.Runtime.InteropServices;
44

5-
// General Information about an assembly is controlled through the following
5+
// General Information about an assembly is controlled through the following
66
// set of attributes. Change these attribute values to modify the information
77
// associated with an assembly.
8-
[assembly: AssemblyTitle("DirSearcherClient")]
8+
[assembly: AssemblyTitle("DeviceProfileSample")]
99
[assembly: AssemblyDescription("")]
1010
[assembly: AssemblyConfiguration("")]
1111
[assembly: AssemblyCompany("")]
12-
[assembly: AssemblyProduct("DirSearcherClient")]
13-
[assembly: AssemblyCopyright("Copyright © 2015")]
12+
[assembly: AssemblyProduct("DeviceProfileSample")]
13+
[assembly: AssemblyCopyright("Copyright © 2017")]
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]
1616

17-
// Setting ComVisible to false makes the types in this assembly not visible
18-
// to COM components. If you need to access a type in this assembly from
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
1919
// COM, set the ComVisible attribute to true on that type.
2020
[assembly: ComVisible(false)]
2121

2222
// The following GUID is for the ID of the typelib if this project is exposed to COM
23-
[assembly: Guid("cf4aa24b-620d-4bb0-a89b-830e8b304b3a")]
23+
[assembly: Guid("4b81f1a9-4a60-4793-abee-85546aaa480e")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Build and Revision Numbers
33+
// by using the '*' as shown below:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]

DeviceProfileSample/packages.config

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="3.14.1" targetFramework="net452" />
4+
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net452" />
5+
</packages>

0 commit comments

Comments
 (0)