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

Commit

Permalink
Update ApiPort.Core to .NET Core App (#332)
Browse files Browse the repository at this point in the history
* Upgrading ApiPort.Core to netcoreapp1.0

* Adding ApiPort.Core to solution

* Cleaning up README. Adding new projects

* Removing unused field variable

* Fetching Nuget v3.5.0-rc1 to restore
  • Loading branch information
conniey authored Oct 3, 2016
1 parent ff352c0 commit a22e81e
Show file tree
Hide file tree
Showing 9 changed files with 166 additions and 111 deletions.
45 changes: 45 additions & 0 deletions PortabilityTools.sln
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApiPortVS.Tests", "tests\Ap
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Fx.Portability.Cci.Tests", "tests\Microsoft.Fx.Portability.Cci.Tests\Microsoft.Fx.Portability.Cci.Tests.csproj", "{6917BF09-E416-43F9-B184-4691AF473271}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApiPort.Core", "src\ApiPort\ApiPort.Core.csproj", "{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -922,6 +924,48 @@ Global
{6917BF09-E416-43F9-B184-4691AF473271}.Ubuntu_Release|x64.Build.0 = Release|Any CPU
{6917BF09-E416-43F9-B184-4691AF473271}.Ubuntu_Release|x86.ActiveCfg = Release|Any CPU
{6917BF09-E416-43F9-B184-4691AF473271}.Ubuntu_Release|x86.Build.0 = Release|Any CPU
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Debug|Any CPU.ActiveCfg = Debug|x86
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Debug|ARM.ActiveCfg = Debug|arm
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Debug|ARM.Build.0 = Debug|arm
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Debug|x64.ActiveCfg = Debug|x64
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Debug|x64.Build.0 = Debug|x64
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Debug|x86.ActiveCfg = Debug|x86
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Debug|x86.Build.0 = Debug|x86
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Osx_Debug|Any CPU.ActiveCfg = Osx_Debug|x86
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Osx_Debug|ARM.ActiveCfg = Osx_Debug|arm
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Osx_Debug|ARM.Build.0 = Osx_Debug|arm
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Osx_Debug|x64.ActiveCfg = Osx_Debug|x64
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Osx_Debug|x64.Build.0 = Osx_Debug|x64
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Osx_Debug|x86.ActiveCfg = Osx_Debug|x86
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Osx_Debug|x86.Build.0 = Osx_Debug|x86
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Osx_Release|Any CPU.ActiveCfg = Osx_Release|x86
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Osx_Release|ARM.ActiveCfg = Osx_Release|arm
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Osx_Release|ARM.Build.0 = Osx_Release|arm
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Osx_Release|x64.ActiveCfg = Osx_Release|x64
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Osx_Release|x64.Build.0 = Osx_Release|x64
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Osx_Release|x86.ActiveCfg = Osx_Release|x86
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Osx_Release|x86.Build.0 = Osx_Release|x86
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Release|Any CPU.ActiveCfg = Release|x86
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Release|ARM.ActiveCfg = Release|arm
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Release|ARM.Build.0 = Release|arm
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Release|x64.ActiveCfg = Release|x64
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Release|x64.Build.0 = Release|x64
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Release|x86.ActiveCfg = Release|x86
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Release|x86.Build.0 = Release|x86
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Ubuntu_Debug|Any CPU.ActiveCfg = Ubuntu_Debug|x86
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Ubuntu_Debug|ARM.ActiveCfg = Ubuntu_Debug|arm
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Ubuntu_Debug|ARM.Build.0 = Ubuntu_Debug|arm
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Ubuntu_Debug|x64.ActiveCfg = Ubuntu_Debug|x64
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Ubuntu_Debug|x64.Build.0 = Ubuntu_Debug|x64
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Ubuntu_Debug|x86.ActiveCfg = Ubuntu_Debug|x86
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Ubuntu_Debug|x86.Build.0 = Ubuntu_Debug|x86
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Ubuntu_Release|Any CPU.ActiveCfg = Ubuntu_Release|x86
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Ubuntu_Release|ARM.ActiveCfg = Ubuntu_Release|arm
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Ubuntu_Release|ARM.Build.0 = Ubuntu_Release|arm
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Ubuntu_Release|x64.ActiveCfg = Ubuntu_Release|x64
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Ubuntu_Release|x64.Build.0 = Ubuntu_Release|x64
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Ubuntu_Release|x86.ActiveCfg = Ubuntu_Release|x86
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B}.Ubuntu_Release|x86.Build.0 = Ubuntu_Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -953,5 +997,6 @@ Global
{B0468D19-0F98-49A8-BA28-926331C72E26} = {6234AABE-C4F3-4094-9C0D-FFD589235DBE}
{2D8DA586-E0EA-4AD1-BA3C-E4AC0310A45E} = {7DC7AA2C-0401-495B-B42C-32F44085EBE6}
{6917BF09-E416-43F9-B184-4691AF473271} = {7DC7AA2C-0401-495B-B42C-32F44085EBE6}
{560DD4EB-C4D2-4F94-9695-931CD3D17B5B} = {0D1724F6-078E-4576-9680-6B9334D562DC}
EndGlobalSection
EndGlobal
79 changes: 44 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,45 @@
# .NET API Portability

This repository contains the source code for .NET Portability Analyzer tools
and dependencies. This is a work in progress, and does not currently contain
all of the components that we plan on open sourcing. Make sure to watch this
repository in order to be notified as we make changes to and expand it.
This repository contains the source code for .NET Portability Analyzer tools and
dependencies.

## Usage

To use this tool, please refer to the [documentation](docs/HowTo/Introduction.md). For a quick introduction, check out [this video on Channel 9](https://channel9.msdn.com/Blogs/Seth-Juarez/A-Brief-Look-at-the-NET-Portability-Analyzer):
To use this tool, please refer to the [documentation](docs/HowTo/Introduction.md).
For a quick introduction, check out [this video on Channel 9][Channel 9 Video]:

[![A Brief Look at the .NET Portability Analyzer](https://sec.ch9.ms/ch9/031c/f3d7672b-dd71-4a18-a8b4-37573c08031c/DotNetPortabilityAnalyzer_960.jpg)](https://channel9.msdn.com/Blogs/Seth-Juarez/A-Brief-Look-at-the-NET-Portability-Analyzer)
[<img src="https://sec.ch9.ms/ch9/031c/f3d7672b-dd71-4a18-a8b4-37573c08031c/DotNetPortabilityAnalyzer_960.jpg" width="480" />][Channel 9 Video]

## Projects

Today, the repository contains the following components:

### Tools

| Project | Description |
| :------- | :----------- |
| ApiPort | Console tool to access portability webservice |
| ApiPort.Core | Cross-platform .NET Core application |
| ApiPort.Vsix | Visual Studio Extension |
| Microsoft.Fx.Portability [![][Version-Portability]][myget] | Provides common types for API Port |
| Microsoft.Fx.Portability.MetadataReader [![][Version-MetadataReader]][myget] | Implements a dependency finder based off of [System.Reflection.Metadata](https://github.com/dotnet/corefx/tree/master/src/System.Reflection.Metadata). The library will generate DocIds that conform to [these specifications](https://msdn.microsoft.com/en-us/library/fsbx0t7x.aspx). |
| Microsoft.Fx.Portability.Offline [![][Version-Offline]][myget] | Provides access to data in an offline setting so network calls are not needed |
| Microsoft.Fx.Portability.Reporting.Html [![][Version-Reporting Html]][myget] | Provides an HTML report for ApiPort (used in offline mode) |
| Microsoft.Fx.Portability.Reporting.Json [![][Version-Reporting Json]][myget] | Provides a JSON reporter for ApiPort (used in offline mode) |

#### A Note About Expected Errors
The ApiPort project contains two csproj files - one for building against the [desktop .NET Framework 4.5](src/ApiPort/ApiPort.csproj), the other for building against [.NET Core](src/ApiPort/ApiPort.Core.csproj). Building a .NET Core executable is still not a well-supported scenario and, as a result, building the project in Visual Studio with NuGet package restore enabled (as it is, by default) will result in errors like the following -
![Errors](docs/DocImages/FalseErrors.png)
## Using this Repository

**These errors are currently expected and do not keep the project from building successfully.** Notice in the picture that the build succeeded despite the errors.
* Install [Visual Studio 2015 with Update 3][Visual Studio 2015]

In order to suppress these false errors, disable Visual Studio's built-in package restore functionality (as described [here](https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/getting-started-core.md#advanced-updating-and-using-nugetexe)). The packages can be restored by building or explicitly restoring packages from the command line (`.tools\nuget.exe src\ApiPort\ApiPort.Core.project.json`).
Restoring or building from the command line is expected to succeed without any errors.
### ApiPort.Core

### Libraries
__Prerequisites__

| Project | Description |
| :------- | :----------- |
| Microsoft.Fx.Portability [![version](https://img.shields.io/myget/dotnet-apiport/v/Microsoft.Fx.Portability.svg)](https://www.myget.org/gallery/dotnet-apiport) | Provides common types for API Port |
| Microsoft.Fx.Portability.MetadataReader [![version](https://img.shields.io/myget/dotnet-apiport/v/Microsoft.Fx.Portability.MetadataReader.svg)](https://www.myget.org/gallery/dotnet-apiport) | Implements a dependency finder based off of [System.Reflection.Metadata](https://github.com/dotnet/corefx/tree/master/src/System.Reflection.Metadata). The library will generate DocIds that conform to [these specifications](https://msdn.microsoft.com/en-us/library/fsbx0t7x.aspx). |
| Microsoft.Fx.Portability.Offline [![version](https://img.shields.io/myget/dotnet-apiport/v/Microsoft.Fx.Portability.Offline.svg)](https://www.myget.org/gallery/dotnet-apiport) | Provides access to data in an offline setting so network calls are not needed |
| Microsoft.Fx.Portability.Reporting.Html [![version](https://img.shields.io/myget/dotnet-apiport/v/Microsoft.Fx.Portability.Reports.Html.svg)](https://www.myget.org/gallery/dotnet-apiport) | Provides an HTML report for ApiPort (used in offline mode) |
| Microsoft.Fx.Portability.Reporting.Json [![version](https://img.shields.io/myget/dotnet-apiport/v/Microsoft.Fx.Portability.Reports.Json.svg)](https://www.myget.org/gallery/dotnet-apiport) | Provides a JSON reporter for ApiPort (used in offline mode) |

More projects are coming soon. Stay tuned!
* Install [.NET Core 1.0.1](https://dot.net/core)

## Using this Repository
__Compiling, Debugging and Running__

* **Required** Install [Visual Studio 2015](http://www.visualstudio.com/en-us/downloads/visual-studio-2015-downloads-vs.aspx)
* **Required** Windows 10 Tools 1.1 (install via the Visual Studio 2015 installer). The [new style PCL format](http://blog.nuget.org/20150729/Introducing-nuget-uwp.html) will not work without this. [v3.2 of NuGet](https://docs.nuget.org/release-notes/nuget-3.2) is required.
* Change __Platform__ to `x64`
* Compile solution
* Run/debug the solution by:
* Executing: `dotnet.exe ApiPort.exe [arguments]`
* Debug `ApiPort.Core` project in Visual Studio

## How to Engage, Contribute and Provide Feedback

Expand All @@ -56,21 +50,21 @@ Here are some ways to contribute:
* Join in design conversations

Want to get more familiar with what's going on in the code?
* [Pull requests](https://github.com/Microsoft/dotnet-apiport/pulls): [Open](https://github.com/Microsoft/dotnet-apiport/pulls?q=is%3Aopen+is%3Apr)/[Closed](https://github.com/Microsoft/dotnet-apiport/pulls?q=is%3Apr+is%3Aclosed)
* [Pull requests][PR]: [Open][PR-Open]/[Closed][PR-Closed]

Looking for something to work on? The list of [up-for-grabs issues](https://github.com/Microsoft/dotnet-apiport/issues?q=is%3Aopen+is%3Aissue) is a great place to start.
Looking for something to work on? The list of [up-for-grabs issues][Issues-Open]
is a great place to start.

We're re-using the same contributing approach as .NET Core. You can check out the .NET Core [contributing guide][Contributing Guide] at the corefx repo wiki for more details.
We're re-using the same contributing approach as .NET Core. You can check out
the .NET Core [contributing guide][Contributing Guide] at the corefx repo wiki
for more details.

* [How to Contribute][Contributing Guide]
* [Contributing Guide][Contributing Guide]
* [Developer Guide]

You are also encouraged to start a discussion on the .NET Foundation forums!

[Contributing Guide]: https://github.com/dotnet/corefx/wiki/Contributing
[Developer Guide]: https://github.com/dotnet/corefx/wiki/Developer-Guide

## Related Projects

For an overview of all the .NET related projects, have a look at the
Expand All @@ -79,3 +73,18 @@ For an overview of all the .NET related projects, have a look at the
## License

This project is licensed under the [MIT license](LICENSE).

[Channel 9 Video]: https://channel9.msdn.com/Blogs/Seth-Juarez/A-Brief-Look-at-the-NET-Portability-Analyzer
[Contributing Guide]: https://github.com/dotnet/corefx/wiki/Contributing
[Developer Guide]: https://github.com/dotnet/corefx/wiki/Developer-Guide
[Issues-Open]: https://github.com/Microsoft/dotnet-apiport/issues?q=is%3Aopen+is%3Aissue
[PR]: https://github.com/Microsoft/dotnet-apiport/pulls
[PR-Closed]: https://github.com/Microsoft/dotnet-apiport/pulls?q=is%3Apr+is%3Aclosed
[PR-Open]: https://github.com/Microsoft/dotnet-apiport/pulls?q=is%3Aopen+is%3Apr
[myget]: https://www.myget.org/gallery/dotnet-apiport
[Version-Portability]: https://img.shields.io/myget/dotnet-apiport/v/Microsoft.Fx.Portability.svg
[Version-MetadataReader]: https://img.shields.io/myget/dotnet-apiport/v/Microsoft.Fx.Portability.MetadataReader.svg
[Version-Offline]: https://img.shields.io/myget/dotnet-apiport/v/Microsoft.Fx.Portability.Offline.svg
[Version-Reporting Html]: https://img.shields.io/myget/dotnet-apiport/v/Microsoft.Fx.Portability.Reports.Html.svg
[Version-Reporting Json]: https://img.shields.io/myget/dotnet-apiport/v/Microsoft.Fx.Portability.Reports.Json.svg
[Visual Studio 2015]: http://www.visualstudio.com/en-us/downloads/visual-studio-2015-downloads-vs.aspx
8 changes: 7 additions & 1 deletion build/Get-Nuget.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ $nuget = Join-Path $tools "nuget.exe"

# Bootstrap nuget
New-Item $tools -ItemType Directory -ErrorAction Ignore | Out-Null
$nugetUrl = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"

# TODO Once nuget v3.5.0 is officially released, we'll go back to using the
# `latest` URI. v3.4.0 does not understand restoring packages for .NETCoreApp,
# while results in a lot of errors.
# $nugetUrl = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"

$nugetUrl = "https://dist.nuget.org/win-x86-commandline/v3.5.0-rc1/NuGet.exe"

if(Test-Path $nuget)
{
Expand Down
1 change: 0 additions & 1 deletion src/ApiPort.VisualStudio/Analyze/ProjectAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ namespace ApiPortVS.Analyze
public class ProjectAnalyzer
{
private readonly IFileWriter _reportWriter;
private readonly IServiceProvider _serviceProvider;
private readonly IFileSystem _fileSystem;
private readonly ISourceLineMapper _sourceLineMapper;
private readonly Microsoft.VisualStudio.Shell.ErrorListProvider _errorList;
Expand Down
Loading

0 comments on commit a22e81e

Please sign in to comment.