-
Notifications
You must be signed in to change notification settings - Fork 44
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
Add Microsoft.AspNetCore.BuildTools.ApiCheck to builds #205
Changes from all commits
3971392
d9f2b91
77e856e
83fd1a8
09625a3
ad3b9f5
05e1df9
a4b0ce5
46c6743
84d976f
d360953
1174dc7
42ef4b6
76eba60
150106a
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 |
---|---|---|
|
@@ -19,3 +19,5 @@ project.lock.json | |
.build | ||
.vs/ | ||
.vscode/ | ||
global.json | ||
launchSettings.json |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,4 @@ build_script: | |
clone_depth: 1 | ||
test: off | ||
deploy: off | ||
os: Visual Studio 2017 RC | ||
os: Visual Studio 2017 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<AspNetCoreVersion>1.2.0-*</AspNetCoreVersion> | ||
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. Could we reference the versions on NuGet.org? It's kinda weird to reference ci-dev packages from this repo since it runs independent of Universe and needs to exist beyond the lifetime of these packages. 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. I'll see how much this is used now. If it's just for the BTW I didn't change this property or add a source to the NuGet.config file 😺 |
||
<CoreFxVersion>4.3.0</CoreFxVersion> | ||
<DotNetCliUtilsVersion>1.0.1</DotNetCliUtilsVersion> | ||
<DotNetProjectModelVersion>1.0.0-rc3-1-003177</DotNetProjectModelVersion> | ||
<JsonNetVersion>9.0.1</JsonNetVersion> | ||
<MsBuildPackageVersions>15.1.548</MsBuildPackageVersions> | ||
<NetStandardPackageVersion>1.6.1</NetStandardPackageVersion> | ||
<NuGetPackagesVersion>4.0.0</NuGetPackagesVersion> | ||
<TestSdkVersion>15.0.0</TestSdkVersion> | ||
<XunitVersion>2.2.0</XunitVersion> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<!-- | ||
WARNING: These targets are intended for building Microsoft's ASP.NET Core repos and are not intended | ||
for use outside of Microsoft. | ||
--> | ||
<Project> | ||
<Target Name="ApiCheck" Condition=" '$(EnableApiCheck)' == 'true' "> | ||
<PropertyGroup> | ||
<_ApiListingFileSuffix Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' ">net45.json</_ApiListingFileSuffix> | ||
<_ApiListingFileSuffix Condition=" '$(_ApiListingFileSuffix)' == '' ">netcore.json</_ApiListingFileSuffix> | ||
<_ApiListingFilePath>$(MSBuildProjectDirectory)\baseline.$(_ApiListingFileSuffix)</_ApiListingFilePath> | ||
<_ApiExclusionsFilePath>$(MSBuildProjectDirectory)\exceptions.$(_ApiListingFileSuffix)</_ApiExclusionsFilePath> | ||
<_ApiListingFile Condition=" Exists('$(_ApiListingFilePath)') ">$(_ApiListingFilePath)</_ApiListingFile> | ||
<_ApiExclusionsFile Condition=" Exists('$(_ApiExclusionsFilePath)') ">$(_ApiExclusionsFilePath)</_ApiExclusionsFile> | ||
</PropertyGroup> | ||
|
||
<Message Condition=" '$(_ApiListingFile)' != '' " | ||
Importance="normal" | ||
Text="Checking for breaking changes in $(MSBuildProjectName), $(TargetFramework)" /> | ||
<ApiCheckTask Condition=" '$(_ApiListingFile)' != '' " | ||
ApiListingPath="$(_ApiListingFile)" | ||
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. Could we use the same indentation as C#? Maintaining these indentations over time is just a pain. 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. This is how VS indents XML by default. But, I agree it won't be easy to maintain this in Notepad and VS Code. I am not changing existing indentation to match. There's a random mix in this repo. |
||
AssemblyPath="$(TargetPath)" | ||
Framework="$(TargetFramework)" | ||
ExcludePublicInternalTypes="$(ExcludePublicInternalTypes_InApiCheck)" | ||
ExclusionsPath="$(_ApiExclusionsFile)" | ||
ProjetAssetsPath="$(ProjectAssetsFile)" /> | ||
|
||
<Warning Condition=" '$(_ApiListingFile)' == '' " | ||
Text="No baseline file for $(TargetFramework) found in $(MSBuildProjectName)." /> | ||
</Target> | ||
</Project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!-- | ||
WARNING: These targets are intended for building Microsoft's ASP.NET Core repos and are not intended | ||
for use outside of Microsoft. | ||
--> | ||
<Project> | ||
<Target Name="ApiCheck" Condition=" '$(EnableApiCheck)' == 'true' "> | ||
<ItemGroup> | ||
<_TargetFrameworks Remove="@(_TargetFrameworks)" /> | ||
<_TargetFrameworks Include="$(TargetFrameworks)" /> | ||
</ItemGroup> | ||
|
||
<MSBuild Projects="$(MSBuildProjectFullPath)" | ||
Targets="ApiCheck" | ||
Properties="TargetFramework=%(_TargetFrameworks.Identity)" | ||
RemoveProperties="TargetFrameworks" /> | ||
</Target> | ||
</Project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!-- | ||
WARNING: These targets are intended for building Microsoft's ASP.NET Core repos and are not intended | ||
for use outside of Microsoft. | ||
--> | ||
<Project> | ||
<PropertyGroup> | ||
<!-- Temporarily disable API checks in all x-plat runs. Universe builds fail at FileSystem repo. --> | ||
<EnableApiCheck Condition=" '$(OS)' != 'Windows_NT' ">false</EnableApiCheck> | ||
|
||
<!-- Unconditionally disable API checks if running in .NET Framework MSBuild. Task cannot run there. --> | ||
<EnableApiCheck Condition=" '$(MSBuildRuntimeType)' != 'Core' ">false</EnableApiCheck> | ||
|
||
<!-- Unconditionally disable API checks if task would use .NET Framework tool x-plat. --> | ||
<EnableApiCheck Condition=" '$(OS)' != 'Windows_NT' AND $(TargetFramework.StartsWith('net4')) ">false</EnableApiCheck> | ||
|
||
<!-- Unless overridden in the project or in one of the above situations, always do API checks. --> | ||
<EnableApiCheck Condition=" '$(EnableApiCheck)' == '' ">true</EnableApiCheck> | ||
<ExcludePublicInternalTypes_InApiCheck Condition=" '$(ExcludePublicInternalTypes_InApiCheck)' == '' ">true</ExcludePublicInternalTypes_InApiCheck> | ||
|
||
<!-- Hook API checks into Pack run, prior to creating the .nupkg but after build (if any). --> | ||
<GenerateNuspecDependsOn>$(GenerateNuspecDependsOn);ApiCheck</GenerateNuspecDependsOn> | ||
</PropertyGroup> | ||
</Project> |
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.
Can you reverse this? VS probably changed it, but the FAE04EC0 guid is correct. This VS bug is being tracked here: dotnet/project-system#1821
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.
🙈 Not a fan of fighting Visual Studio. We can revert this part of the change when dotnet/project-system#1821 is fixed or wait for a future VS update to change the solution for us.