Информация об изменениях

Сообщение [FeatureRequest] Перевод на VS 2017 csproj от 15.02.2017 9:43

Изменено 15.02.2017 9:46 Sinix

[FeatureRequest] Перевод на VS 2017 csproj
В связи с наступающим релизом VS 2017:
есть мысль наконец переехать на новый csproj + выпустить альфу под .net Core (или подождать до netstandard 2.0?).

На свежеобновлённой RC студии проект собирается локально с вот этим:
  Скрытый текст
<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>net4.5.2</TargetFramework>
    <Version>1.3.0-beta4</Version>
    <Authors>Andrew Koryavchenko, Igor Sinicyn, Igor Tkachev, rameel</Authors>
    <Company>RSDN.ru</Company>
    <PackageId>CodeJam</PackageId>
    <Product>CodeJam</Product>
    <Description>CodeJam is a set of handy reusable .NET components that can simplify your daily work and save your time when you copy and paste your favorite helper methods and classes from one project to another.</Description>
    <Copyright>RSDN.ru, 2017</Copyright>
    <PackageTags>list string collection data-structure threading xml reflection async assertion IO extension algorithms structures utilities suffix-tree range tagged-union discriminated union discriminated-union variant variant-record disjoint-union sum-type</PackageTags>
    <PackageLicenseUrl>https://github.com/rsdn/CodeJam/blob/master/LICENSE</PackageLicenseUrl>
    <PackageProjectUrl>https://github.com/rsdn/CodeJam</PackageProjectUrl>
    <PackageIconUrl>https://raw.githubusercontent.com/rsdn/CodeJam/master/Main/nuget/CodeJam.Main.Icon.png</PackageIconUrl>
    <RepositoryUrl></RepositoryUrl>
    <PackageReleaseNotes></PackageReleaseNotes>
    <AssemblyVersion>1.3.0.0</AssemblyVersion>
    <FileVersion>1.3.0.0</FileVersion>
    <SignAssembly>True</SignAssembly>
    <DelaySign>False</DelaySign>
    <AssemblyOriginatorKeyFile>..\..\CodeJam.snk</AssemblyOriginatorKeyFile>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
    <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
    <DefineConstants>TRACE;DEBUG;FW461;FW46;FW452</DefineConstants>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
    <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
    <DefineConstants>TRACE;RELEASE;FW461;FW46;FW452</DefineConstants>
  </PropertyGroup>

  <ItemGroup>
    <Compile Include="..\..\Jetbrains.Annotations.cs" Link="Jetbrains.Annotations.cs" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="System.ValueTuple" Version="4.3.0" />
  </ItemGroup>

</Project>


  AssemblyInfo.cs
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

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

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("2f2046cc-fb47-4318-b335-5a82b04b6c40")]

[assembly: InternalsVisibleTo("CodeJam-Tests, PublicKey=" +
    "00240000048000009400000006020000002400005253413100040000010001000de1c523b74719" +
    "e2f54eed3a5512cfedfa78ccfef5c1d196e9a6b09522e7a833ab027deff5462ab26b5d5b51ed42" +
    "10c889d2177f16f3678dfe65ba202f7b142b3d37e7500df14f86a616b111989b58029fc1ad8932" +
    "7170e7ddd53d56c94dda5d4d3e9e0e4de45b9e8b09800c5e969120931da76fd3f2277a525725f0" +
    "c495f8d3")]
[assembly: InternalsVisibleTo("CodeJam-Tests.Performance, PublicKey=" +
    "00240000048000009400000006020000002400005253413100040000010001000de1c523b74719" +
    "e2f54eed3a5512cfedfa78ccfef5c1d196e9a6b09522e7a833ab027deff5462ab26b5d5b51ed42" +
    "10c889d2177f16f3678dfe65ba202f7b142b3d37e7500df14f86a616b111989b58029fc1ad8932" +
    "7170e7ddd53d56c94dda5d4d3e9e0e4de45b9e8b09800c5e969120931da76fd3f2277a525725f0" +
    "c495f8d3")]

[assembly: InternalsVisibleTo("CodeJam.Experimental, PublicKey=" +
    "00240000048000009400000006020000002400005253413100040000010001000de1c523b74719" +
    "e2f54eed3a5512cfedfa78ccfef5c1d196e9a6b09522e7a833ab027deff5462ab26b5d5b51ed42" +
    "10c889d2177f16f3678dfe65ba202f7b142b3d37e7500df14f86a616b111989b58029fc1ad8932" +
    "7170e7ddd53d56c94dda5d4d3e9e0e4de45b9e8b09800c5e969120931da76fd3f2277a525725f0" +
    "c495f8d3")]
[assembly: InternalsVisibleTo("CodeJam.Experimental-Tests, PublicKey=" +
    "00240000048000009400000006020000002400005253413100040000010001000de1c523b74719" +
    "e2f54eed3a5512cfedfa78ccfef5c1d196e9a6b09522e7a833ab027deff5462ab26b5d5b51ed42" +
    "10c889d2177f16f3678dfe65ba202f7b142b3d37e7500df14f86a616b111989b58029fc1ad8932" +
    "7170e7ddd53d56c94dda5d4d3e9e0e4de45b9e8b09800c5e969120931da76fd3f2277a525725f0" +
    "c495f8d3")]
[assembly: InternalsVisibleTo("CodeJam.Experimental-Tests.Performance, PublicKey=" +
    "00240000048000009400000006020000002400005253413100040000010001000de1c523b74719" +
    "e2f54eed3a5512cfedfa78ccfef5c1d196e9a6b09522e7a833ab027deff5462ab26b5d5b51ed42" +
    "10c889d2177f16f3678dfe65ba202f7b142b3d37e7500df14f86a616b111989b58029fc1ad8932" +
    "7170e7ddd53d56c94dda5d4d3e9e0e4de45b9e8b09800c5e969120931da76fd3f2277a525725f0" +
    "c495f8d3")]


Все прочие проекты ссылку успешно подхватили, тесты зелёные.

Осталось самое гадкое — таргетинг под прошлые FW, нюгет-пакет (вот тут должно быть попроще) и билд-скрипт
[FeatureRequest] Перевод на VS 2017 csproj
В связи с наступающим релизом VS 2017:
есть мысль наконец переехать на новый csproj + выпустить альфу под .net Core (или подождать до netstandard 2.0?).

На свежеобновлённой RC студии проект собирается локально с вот этим:
  CodeJam.Main.csproj
<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>net4.5.2</TargetFramework>
    <Version>1.3.0-beta4</Version>
    <Authors>Andrew Koryavchenko, Igor Sinicyn, Igor Tkachev, rameel</Authors>
    <Company>RSDN.ru</Company>
    <PackageId>CodeJam</PackageId>
    <Product>CodeJam</Product>
    <Description>CodeJam is a set of handy reusable .NET components that can simplify your daily work and save your time when you copy and paste your favorite helper methods and classes from one project to another.</Description>
    <Copyright>RSDN.ru, 2017</Copyright>
    <PackageTags>list string collection data-structure threading xml reflection async assertion IO extension algorithms structures utilities suffix-tree range tagged-union discriminated union discriminated-union variant variant-record disjoint-union sum-type</PackageTags>
    <PackageLicenseUrl>https://github.com/rsdn/CodeJam/blob/master/LICENSE</PackageLicenseUrl>
    <PackageProjectUrl>https://github.com/rsdn/CodeJam</PackageProjectUrl>
    <PackageIconUrl>https://raw.githubusercontent.com/rsdn/CodeJam/master/Main/nuget/CodeJam.Main.Icon.png</PackageIconUrl>
    <RepositoryUrl></RepositoryUrl>
    <PackageReleaseNotes></PackageReleaseNotes>
    <AssemblyVersion>1.3.0.0</AssemblyVersion>
    <FileVersion>1.3.0.0</FileVersion>
    <SignAssembly>True</SignAssembly>
    <DelaySign>False</DelaySign>
    <AssemblyOriginatorKeyFile>..\..\CodeJam.snk</AssemblyOriginatorKeyFile>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
    <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
    <DefineConstants>TRACE;DEBUG;FW461;FW46;FW452</DefineConstants>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
    <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
    <DefineConstants>TRACE;RELEASE;FW461;FW46;FW452</DefineConstants>
  </PropertyGroup>

  <ItemGroup>
    <Compile Include="..\..\Jetbrains.Annotations.cs" Link="Jetbrains.Annotations.cs" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="System.ValueTuple" Version="4.3.0" />
  </ItemGroup>

</Project>


  AssemblyInfo.cs
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

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

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("2f2046cc-fb47-4318-b335-5a82b04b6c40")]

[assembly: InternalsVisibleTo("CodeJam-Tests, PublicKey=" +
    "00240000048000009400000006020000002400005253413100040000010001000de1c523b74719" +
    "e2f54eed3a5512cfedfa78ccfef5c1d196e9a6b09522e7a833ab027deff5462ab26b5d5b51ed42" +
    "10c889d2177f16f3678dfe65ba202f7b142b3d37e7500df14f86a616b111989b58029fc1ad8932" +
    "7170e7ddd53d56c94dda5d4d3e9e0e4de45b9e8b09800c5e969120931da76fd3f2277a525725f0" +
    "c495f8d3")]
[assembly: InternalsVisibleTo("CodeJam-Tests.Performance, PublicKey=" +
    "00240000048000009400000006020000002400005253413100040000010001000de1c523b74719" +
    "e2f54eed3a5512cfedfa78ccfef5c1d196e9a6b09522e7a833ab027deff5462ab26b5d5b51ed42" +
    "10c889d2177f16f3678dfe65ba202f7b142b3d37e7500df14f86a616b111989b58029fc1ad8932" +
    "7170e7ddd53d56c94dda5d4d3e9e0e4de45b9e8b09800c5e969120931da76fd3f2277a525725f0" +
    "c495f8d3")]

[assembly: InternalsVisibleTo("CodeJam.Experimental, PublicKey=" +
    "00240000048000009400000006020000002400005253413100040000010001000de1c523b74719" +
    "e2f54eed3a5512cfedfa78ccfef5c1d196e9a6b09522e7a833ab027deff5462ab26b5d5b51ed42" +
    "10c889d2177f16f3678dfe65ba202f7b142b3d37e7500df14f86a616b111989b58029fc1ad8932" +
    "7170e7ddd53d56c94dda5d4d3e9e0e4de45b9e8b09800c5e969120931da76fd3f2277a525725f0" +
    "c495f8d3")]
[assembly: InternalsVisibleTo("CodeJam.Experimental-Tests, PublicKey=" +
    "00240000048000009400000006020000002400005253413100040000010001000de1c523b74719" +
    "e2f54eed3a5512cfedfa78ccfef5c1d196e9a6b09522e7a833ab027deff5462ab26b5d5b51ed42" +
    "10c889d2177f16f3678dfe65ba202f7b142b3d37e7500df14f86a616b111989b58029fc1ad8932" +
    "7170e7ddd53d56c94dda5d4d3e9e0e4de45b9e8b09800c5e969120931da76fd3f2277a525725f0" +
    "c495f8d3")]
[assembly: InternalsVisibleTo("CodeJam.Experimental-Tests.Performance, PublicKey=" +
    "00240000048000009400000006020000002400005253413100040000010001000de1c523b74719" +
    "e2f54eed3a5512cfedfa78ccfef5c1d196e9a6b09522e7a833ab027deff5462ab26b5d5b51ed42" +
    "10c889d2177f16f3678dfe65ba202f7b142b3d37e7500df14f86a616b111989b58029fc1ad8932" +
    "7170e7ddd53d56c94dda5d4d3e9e0e4de45b9e8b09800c5e969120931da76fd3f2277a525725f0" +
    "c495f8d3")]


Все прочие проекты ссылку успешно подхватили, тесты зелёные.

Осталось самое гадкое — таргетинг под прошлые FW, нюгет-пакет (вот тут должно быть попроще) и билд-скрипт