Skip to content

Commit

Permalink
Feature/net6.0 927 (#633)
Browse files Browse the repository at this point in the history
* changing to net6.0

* circumventing the possible net6.0 bug

* updated nuget, removed un-necessary stuff from proj files

* using const to reduce string concatenation

* removing None Remove section

* updating some more interpreted strings to be net6.0 compatible
  • Loading branch information
rajatshuvro authored and GitHub Enterprise committed Mar 22, 2022
1 parent 80f8c48 commit 68c7240
Show file tree
Hide file tree
Showing 38 changed files with 117 additions and 134 deletions.
12 changes: 6 additions & 6 deletions AnnotationLambda/AnnotationLambda.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<AWSProjectType>Lambda</AWSProjectType>
<OutputPath>bin\$(Configuration)</OutputPath>
<LangVersion>latest</LangVersion>

</PropertyGroup>
<ItemGroup>
<PackageReference Include="Amazon.Lambda.Core" Version="2.0.0" />
<PackageReference Include="Amazon.Lambda.Core" Version="2.1.0" />
<PackageReference Include="Amazon.Lambda.Serialization.Json" Version="2.0.0" />
<PackageReference Include="AWSSDK.Lambda" Version="3.7.0.15" />
<PackageReference Include="AWSSDK.S3" Version="3.7.0.17" />
<PackageReference Include="AWSSDK.SimpleNotificationService" Version="3.7.1.1" />
<PackageReference Include="AWSSDK.Lambda" Version="3.7.9.3" />
<PackageReference Include="AWSSDK.S3" Version="3.7.8.3" />
<PackageReference Include="AWSSDK.SimpleNotificationService" Version="3.7.3.31" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Cloud\Cloud.csproj" />
Expand Down
10 changes: 5 additions & 5 deletions CacheUtils/CacheUtils.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<OutputPath>..\bin\$(Configuration)</OutputPath>
<LangVersion>latest</LangVersion>

</PropertyGroup>
<Import Project="..\CommonAssemblyInfo.props" />
<ItemGroup>
Expand All @@ -12,9 +12,9 @@
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CommandLine\CommandLine.csproj" />
Expand Down
10 changes: 5 additions & 5 deletions Cloud/Cloud.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<OutputPath>..\bin\$(Configuration)</OutputPath>
<LangVersion>latest</LangVersion>

</PropertyGroup>
<ItemGroup>
<PackageReference Include="Amazon.Lambda.Core" Version="2.0.0" />
<PackageReference Include="Amazon.Lambda.Core" Version="2.1.0" />
<PackageReference Include="Amazon.Lambda.Serialization.Json" Version="2.0.0" />
<PackageReference Include="AWSSDK.S3" Version="3.7.0.17" />
<PackageReference Include="AWSSDK.SimpleNotificationService" Version="3.7.1.1" />
<PackageReference Include="AWSSDK.S3" Version="3.7.8.3" />
<PackageReference Include="AWSSDK.SimpleNotificationService" Version="3.7.3.31" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>
<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions CommandLine/CommandLine.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<OutputPath>..\bin\$(Configuration)</OutputPath>
<LangVersion>latest</LangVersion>

</PropertyGroup>
<Import Project="..\CommonAssemblyInfo.props" />
<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Compression/Compression.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<OutputPath>..\bin\$(Configuration)</OutputPath>
<LangVersion>latest</LangVersion>

</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\ErrorHandling\ErrorHandling.csproj" />
Expand Down
8 changes: 4 additions & 4 deletions CustomAnnotationLambda/CustomAnnotationLambda.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<AWSProjectType>Lambda</AWSProjectType>
<OutputPath>bin\$(Configuration)</OutputPath>
<LangVersion>latest</LangVersion>

</PropertyGroup>
<ItemGroup>
<PackageReference Include="Amazon.Lambda.Core" Version="2.0.0" />
<PackageReference Include="Amazon.Lambda.Core" Version="2.1.0" />
<PackageReference Include="Amazon.Lambda.Serialization.Json" Version="2.0.0" />
<PackageReference Include="AWSSDK.SimpleNotificationService" Version="3.7.1.1" />
<PackageReference Include="AWSSDK.SimpleNotificationService" Version="3.7.3.31" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Cloud\Cloud.csproj" />
Expand Down
4 changes: 2 additions & 2 deletions CustomStrValidationLambda/CustomStrValidationLambda.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<AWSProjectType>Lambda</AWSProjectType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Amazon.Lambda.Core" Version="2.0.0" />
<PackageReference Include="Amazon.Lambda.Core" Version="2.1.0" />
<PackageReference Include="Amazon.Lambda.Serialization.Json" Version="2.0.0" />
</ItemGroup>
<ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions Downloader/Downloader.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<OutputPath>..\bin\$(Configuration)</OutputPath>
<LangVersion>latest</LangVersion>

</PropertyGroup>
<Import Project="..\CommonAssemblyInfo.props" />
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CommandLine\CommandLine.csproj" />
Expand Down
8 changes: 4 additions & 4 deletions ErrorHandling/ErrorHandling.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<OutputPath>..\bin\$(Configuration)</OutputPath>
<LangVersion>latest</LangVersion>
<TargetFramework>net6.0</TargetFramework>
<OutputPath>..\bin\$(Configuration)</OutputPath>

</PropertyGroup>
<Import Project="..\CommonAssemblyInfo.props" />
<ItemGroup>
<PackageReference Include="AWSSDK.S3" Version="3.7.0.17" />
<PackageReference Include="AWSSDK.S3" Version="3.7.8.3" />
</ItemGroup>
</Project>
8 changes: 4 additions & 4 deletions GeneAnnotationLambda/GeneAnnotationLambda.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<AWSProjectType>Lambda</AWSProjectType>
<OutputPath>bin\$(Configuration)</OutputPath>
<LangVersion>latest</LangVersion>

</PropertyGroup>
<ItemGroup>
<PackageReference Include="Amazon.Lambda.Serialization.Json" Version="2.0.0" />
<PackageReference Include="AWSSDK.Core" Version="3.7.0.16" />
<PackageReference Include="AWSSDK.Lambda" Version="3.7.0.15" />
<PackageReference Include="AWSSDK.Core" Version="3.7.8.5" />
<PackageReference Include="AWSSDK.Lambda" Version="3.7.9.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Cloud\Cloud.csproj" />
Expand Down
4 changes: 2 additions & 2 deletions Genome/Genome.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<OutputPath>..\bin\$(Configuration)</OutputPath>
<LangVersion>latest</LangVersion>

</PropertyGroup>
<Import Project="..\CommonAssemblyInfo.props" />
<ItemGroup>
Expand Down
12 changes: 4 additions & 8 deletions IO/IO.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<OutputPath>..\bin\$(Configuration)</OutputPath>
<LangVersion>latest</LangVersion>

<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<Import Project="..\CommonAssemblyInfo.props" />
<ItemGroup>
<PackageReference Include="AWSSDK.Core" Version="3.7.0.16" />
<PackageReference Include="AWSSDK.S3" Version="3.7.0.17" />
<PackageReference Include="IsExternalInit" Version="1.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="AWSSDK.Core" Version="3.7.8.5" />
<PackageReference Include="AWSSDK.S3" Version="3.7.8.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ErrorHandling\ErrorHandling.csproj" />
Expand Down
4 changes: 2 additions & 2 deletions Intervals/Intervals.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<OutputPath>..\bin\$(Configuration)</OutputPath>
<LangVersion>latest</LangVersion>

</PropertyGroup>
<Import Project="..\CommonAssemblyInfo.props" />
</Project>
4 changes: 2 additions & 2 deletions Jasix/Jasix.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<OutputPath>..\bin\$(Configuration)</OutputPath>
<LangVersion>latest</LangVersion>

</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
Expand Down
2 changes: 1 addition & 1 deletion Jist/Jist.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<OutputPath>..\bin\$(Configuration)</OutputPath>
</PropertyGroup>

Expand Down
4 changes: 2 additions & 2 deletions MitoHeteroplasmy/MitoHeteroplasmy.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>latest</LangVersion>
<TargetFramework>net6.0</TargetFramework>

</PropertyGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\MitoHeteroplasmy.tsv.gz" />
Expand Down
10 changes: 5 additions & 5 deletions Nirvana/Nirvana.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<OutputPath>..\bin\$(Configuration)</OutputPath>
<LangVersion>latest</LangVersion>

</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Cloud\Cloud.csproj" />
Expand Down
10 changes: 5 additions & 5 deletions NirvanaLambda/NirvanaLambda.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<AWSProjectType>Lambda</AWSProjectType>
<OutputPath>bin\$(Configuration)</OutputPath>
<LangVersion>latest</LangVersion>

</PropertyGroup>
<ItemGroup>
<PackageReference Include="Amazon.Lambda.Core" Version="2.0.0" />
<PackageReference Include="Amazon.Lambda.Core" Version="2.1.0" />
<PackageReference Include="Amazon.Lambda.Serialization.Json" Version="2.0.0" />
<PackageReference Include="AWSSDK.Lambda" Version="3.7.0.15" />
<PackageReference Include="AWSSDK.SimpleNotificationService" Version="3.7.1.1" />
<PackageReference Include="AWSSDK.Lambda" Version="3.7.9.3" />
<PackageReference Include="AWSSDK.SimpleNotificationService" Version="3.7.3.31" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Genome\Genome.csproj" />
Expand Down
6 changes: 3 additions & 3 deletions OptimizedCore/OptimizedCore.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<OutputPath>..\bin\$(Configuration)</OutputPath>
<LangVersion>latest</LangVersion>

<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="6.0.0-preview.6.21355.2" />
<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="6.0.2" />
</ItemGroup>
<Import Project="..\CommonAssemblyInfo.props" />
</Project>
4 changes: 2 additions & 2 deletions Phantom/Phantom.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<OutputPath>..\bin\$(Configuration)</OutputPath>
<LangVersion>latest</LangVersion>

</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
Expand Down
4 changes: 2 additions & 2 deletions ReferenceSequence/ReferenceSequence.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<OutputPath>..\bin\$(Configuration)</OutputPath>
<LangVersion>latest</LangVersion>

</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\CommandLine\CommandLine.csproj" />
Expand Down
9 changes: 7 additions & 2 deletions RepeatExpansions/RepeatExpansionPhenotype.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,13 @@ public string GetAnnotation(int repeatNumber)

private string GetJson(double percentile, IEnumerable<string> classifications)
{
string joined = string.Join(",", classifications.Select(classification => "\"" + classification + "\""));
return $"{{\"phenotype\":\"{_phenotype}\",\"omimId\":{_omimId},\"classifications\":[{joined}],\"percentile\":{percentile:0.00}}}";
// in net6.0, the compiler gets confused if you have }}}. Should the first two }s be a closing brace or the second? This results in a bug.
// we can circumvent it by taking the leading and trailing parenthesis out of the main expression and adding them separately
const char openCurly = '{';
const char closeCurly = '}';
string joined = string.Join(",", classifications.Select(classification => "\"" + classification + "\""));
return $"{openCurly}\"phenotype\":\"{_phenotype}\",\"omimId\":{_omimId},\"classifications\":[{joined}],\"percentile\":{percentile:0.00}{closeCurly}";

}

private IEnumerable<string> GetClassifications(int repeatNumber)
Expand Down
8 changes: 2 additions & 6 deletions RepeatExpansions/RepeatExpansions.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<OutputPath>..\bin\$(Configuration)</OutputPath>
<LangVersion>latest</LangVersion>

</PropertyGroup>
<Import Project="..\CommonAssemblyInfo.props" />
<ItemGroup>
<None Remove="RepeatExpansions.GRCh37.tsv" />
<None Remove="RepeatExpansions.GRCh38.tsv" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\RepeatExpansions.GRCh37.tsv" />
<EmbeddedResource Include="Resources\RepeatExpansions.GRCh38.tsv" />
Expand Down
2 changes: 1 addition & 1 deletion SAUtils/ExtractCosmicSvs/CosmicCnvItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ private static IEnumerable<string> GetJsonStrings(IDictionary<string, int> dicti
{
foreach (var kvp in dictionary)
{
yield return $"{{\"{kvp.Key.Replace('_', ' ')}\":{kvp.Value}}}";
yield return $"{JsonObject.OpenBrace}\"{kvp.Key.Replace('_', ' ')}\":{kvp.Value}{JsonObject.CloseBrace}";
}
}

Expand Down
Loading

0 comments on commit 68c7240

Please sign in to comment.