-
Notifications
You must be signed in to change notification settings - Fork 31
Update dependencies and targets #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Central package management such that version are store in a single place. |
||
| <Project> | ||
| <PropertyGroup> | ||
| <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <PackageVersion Include="Microsoft.Azure.Relay" Version="3.0.1" /> | ||
| <PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" /> | ||
| <PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" /> | ||
| <PackageVersion Include="System.Threading.Tasks.Dataflow" Version="8.0.0" /> | ||
|
|
||
| <!-- For netstandard2.0 only --> | ||
| <PackageVersion Include="Microsoft.AspNetCore.Authentication.Core" Version="2.2.0" /> | ||
| <PackageVersion Include="Microsoft.AspNetCore.Hosting" Version="2.2.0" /> | ||
| <PackageVersion Include="Microsoft.Net.Http.Headers" Version="2.2.0" /> | ||
|
|
||
| <PackageVersion Include="xunit" Version="2.6.6" /> | ||
| <PackageVersion Include="xunit.runner.visualstudio" Version="2.5.6" /> | ||
|
|
||
| </ItemGroup> | ||
| </Project> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,8 +3,8 @@ | |
| <PropertyGroup> | ||
| <Description>ASP.NET Core HTTP server that uses Azure Relay.</Description> | ||
| <Authors>Microsoft</Authors> | ||
| <copyright>© Microsoft Corporation. All rights reserved.</copyright> | ||
| <TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks> | ||
| <copyright>© Microsoft Corporation. All rights reserved.</copyright> | ||
| <TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks> | ||
| <NoWarn>$(NoWarn);CS1591</NoWarn> | ||
| <AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
| <GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
|
|
@@ -14,25 +14,23 @@ | |
| <PackageIconUrl>https://raw.githubusercontent.com/Azure/azure-relay-dotnet/master/relay.png</PackageIconUrl> | ||
| <PackageProjectUrl>https://github.com/Azure/azure-relay-aspnetserver</PackageProjectUrl> | ||
| <IsPackable>True</IsPackable> | ||
| <LangVersion>latest</LangVersion> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.1' "> | ||
| <PackageReference Include="Microsoft.AspNetCore.Http.Features" Version="3.0.0" /> | ||
| <PackageReference Include="Microsoft.AspNetCore.Authentication.Core" Version="2.2.0" /> | ||
| <PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.2.7" /> | ||
| <PackageReference Include="Microsoft.AspNetCore.Http.Features" Version="3.0.0" /> | ||
| <PackageReference Include="Microsoft.Net.Http.Headers" Version="2.2.0" /> | ||
| <ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' "> | ||
| <FrameworkReference Include="Microsoft.AspNetCore.App" /> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These packages are not published anymore (most). Referencing the shared framework is the way to go. |
||
| </ItemGroup> | ||
|
|
||
| <ItemGroup Condition=" '$(TargetFramework)' != 'netstandard2.1' "> | ||
| <PackageReference Include="Microsoft.AspNetCore.Authentication.Core" Version="2.1.1" /> | ||
| <PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.1.1" /> | ||
| <PackageReference Include="Microsoft.Net.Http.Headers" Version="2.1.1" /> | ||
| <ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' "> | ||
| <PackageReference Include="Microsoft.AspNetCore.Authentication.Core" /> | ||
| <PackageReference Include="Microsoft.AspNetCore.Hosting" /> | ||
| <PackageReference Include="Microsoft.Net.Http.Headers" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="System.Threading.Tasks.Dataflow" Version="4.10.0" /> | ||
| <PackageReference Include="Microsoft.Azure.Relay" Version="$(MicrosoftAzureRelayPackageVersion)" /> | ||
| <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" /> | ||
| <PackageReference Include="System.Threading.Tasks.Dataflow" /> | ||
| <PackageReference Include="Microsoft.Azure.Relay" /> | ||
| </ItemGroup> | ||
|
|
||
| </Project> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,8 @@ | ||
| <Project> | ||
| <Import Project="..\Directory.Build.props" /> | ||
|
|
||
| <PropertyGroup> | ||
| <DeveloperBuildTestTfms>netcoreapp2.1;netcoreapp3.1</DeveloperBuildTestTfms> | ||
| <StandardTestTfms>$(DeveloperBuildTestTfms)</StandardTestTfms> | ||
| <StandardTestTfms Condition=" '$(DeveloperBuild)' != 'true' ">$(StandardTestTfms)</StandardTestTfms> | ||
| <StandardTestTfms Condition=" '$(DeveloperBuild)' != 'true' AND '$(OS)' == 'Windows_NT' ">$(StandardTestTfms);net461</StandardTestTfms> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="xunit" Version="2.4.1" /> | ||
| <PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" /> | ||
| <PackageReference Include="xunit" /> | ||
| <PackageReference Include="xunit.runner.visualstudio" /> | ||
| </ItemGroup> | ||
| </Project> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,7 @@ | ||
| using Newtonsoft.Json; | ||
| using Newtonsoft.Json.Linq; | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using System; | ||
| using System.IO; | ||
| using System.Linq; | ||
| using System.Text; | ||
| using System.Text.Json; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed NewtonSoft.Json dependency. |
||
|
|
||
| namespace Microsoft.Azure.Relay.AspNetCore | ||
| { | ||
|
|
@@ -15,23 +12,21 @@ public LaunchSettingsFixture() | |
| string filename = "Properties\\launchSettings.json"; | ||
| if (File.Exists(filename)) | ||
| { | ||
| using (var file = File.OpenText(filename)) | ||
| using (var file = File.Open(filename, FileMode.Open)) | ||
| { | ||
| var reader = new JsonTextReader(file); | ||
| var jObject = JObject.Load(reader); | ||
| var json = JsonDocument.Parse(file).RootElement; | ||
|
|
||
| var variables = jObject | ||
| .GetValue("profiles") | ||
| var variables = json. | ||
| GetProperty("profiles").EnumerateObject() | ||
| //select a proper profile here | ||
| .SelectMany(profiles => profiles.Children()) | ||
| .SelectMany(profile => profile.Children<JProperty>()) | ||
| .SelectMany(profile => profile.Value.EnumerateObject()) | ||
| .Where(prop => prop.Name == "environmentVariables") | ||
| .SelectMany(prop => prop.Value.Children<JProperty>()) | ||
| .SelectMany(prop => prop.Value.EnumerateObject()) | ||
| .ToList(); | ||
|
|
||
| foreach (var variable in variables) | ||
| { | ||
| Environment.SetEnvironmentVariable(variable.Name, variable.Value.ToString()); | ||
| Environment.SetEnvironmentVariable(variable.Name, variable.Value.GetString()); | ||
| } | ||
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The base images have net8.0 already installed.