Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Migrate solution to VS2017 #411

Merged
merged 55 commits into from
Apr 20, 2017
Merged

Migrate solution to VS2017 #411

merged 55 commits into from
Apr 20, 2017

Conversation

conniey
Copy link
Member

@conniey conniey commented Apr 5, 2017

This migrates our solution to Visual Studio 2017. There are a few additions/changes:

  <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
  <GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>

conniey added 24 commits April 17, 2017 22:29
@mmitche
Copy link
Member

mmitche commented Apr 18, 2017

@dotnet-bot test this please

@mmitche
Copy link
Member

mmitche commented Apr 18, 2017

@conniey Fixed :)

@conniey
Copy link
Member Author

conniey commented Apr 18, 2017

@mmitche Life is good again! Thanks!

@conniey conniey changed the title [WIP] Migrate solution to VS2017 Migrate solution to VS2017 Apr 18, 2017
[Cmdlet(VerbsCommon.Get, "MsBuild")]
public class LocateMsBuildCmdlet : Cmdlet
{
private const string MsBuildVersion15 = "15";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't we only support 15?

@@ -17,7 +17,7 @@
<!-- Trying to mitigate the number of warnings that the solution contains by
adding this into our Release builds. As a result, it should be caught in
our PRs because of the CI builds -->
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<!-- <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why comment this out?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was commented out because of the CS1701 warnings due to the different assembly versions it is resolving.

When building our project, we are encountering ~900 warnings like this:

warning CS1701: Assuming assembly reference 'System.Runtime, Version=4.0.20.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' used by 'Microsoft.Fx.Portability' matches identity 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' of 'System.Runtime', you may need to supply runtime policy [D:\git\conniey\dotnet-apiport\src\ApiPort\ApiPort.csproj]

The reason for that is because Microsoft.Fx.Portability targets netstandard1.3 and ApiPort targets netcoreapp1.0. So at build time, Microsoft.Fx.Portability references System.Runtime 4.0.20.0... but ApiPort uses System.Runtime 4.1.0.0. This should not result in problems since we are only adding to the API surface area... but there is an issue about this aspnet/Mvc#5050 (comment). Should I make another in the right location?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another option is to suppress the CS1701 warning.... but I am afraid that it will result in suppressing any binding redirect errors that may happen.

@@ -0,0 +1,87 @@
<?xml version="1.0" encoding="utf-8"?>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should transition this project to PackageReference as well. Not needed for this review, but it'd be good to get done.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had tried this before and it resulted in a bunch of errors because the old MsBuild targets don't seem to know how to resolve/display it for these old csproj files.

<InstallationTarget Version="[14.0,]" Id="Microsoft.VisualStudio.Pro" />
<InstallationTarget Version="[14.0,]" Id="Microsoft.VisualStudio.Ultimate" />
<InstallationTarget Version="[14.0,]" Id="Microsoft.VisualStudio.Premium" />
<InstallationTarget Version="[14.0,16.0)" Id="Microsoft.VisualStudio.Pro" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need all of these? I think if we just using Microsoft.VisualStudio.Community that would work as it's the lowest common denominator... but don't take my word for it...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked through the vsix-extension-schema docs and it appears that it is just an enumeration... there doesn't appear to be a heirarchy.

name.Name = assemblyIdentity.Name.Value;
#if !COREFX
name.CultureInfo = new CultureInfo(assemblyIdentity.Culture);
#if NETSTANDARD1_3 || NETSTANDARD1_6
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use the FEATURE_[name] pattern?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@conniey conniey merged commit 4f5f664 into microsoft:master Apr 20, 2017
@conniey conniey deleted the updateVS2017 branch April 20, 2017 15:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants