-
Notifications
You must be signed in to change notification settings - Fork 181
Conversation
@conniey Since this now uses the pack target for nuget package creation, I'll probably need to update the build scripts. It requires msbuild to build right now - do we need to support dotnet cli? |
Directory.Build.props
Outdated
@@ -8,10 +8,16 @@ | |||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | |||
<OutputDrop>$(TF_BUILD_BINARIESDIRECTORY)</OutputDrop> | |||
<NoWarn>$(NoWarn),1570,1572,1573,1574,1591,1701</NoWarn> |
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.
I see you added 1701 because of all those redirect warnings... is it possible that we may miss one that results in a runtime error? I had looked awhile ago at resolving these somehow... but to no avail. :(
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.
Possibly, but it's worse to have 30000 other errors and miss important warnings from those. We'll catch a runtime error at runtime so at least they'll be caught somewhere
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.
Good point.. It is cumbersome to filter through all them.
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.
I noticed that Directory.Build.targets and props were not longer being imported into any of the projects... how are they getting signed? I may have missed some change somewhere...
@@ -1,8 +1,6 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
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.
I noticed you removed dir.props/dir.targets from this... will the assembly still be signed?
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.
Directory.Build.{targets|props} is a magic file that gets included by all projects below it. See the msbuild 15 announcements for details: https://docs.microsoft.com/en-us/visualstudio/msbuild/what-s-new-in-msbuild-15-0
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.
Wow. that is pretty magical.
<PackageReference Include="Microsoft.VisualStudio.Composition" Version="14.2.19-pre" /> | ||
<PackageReference Include="Microsoft.VisualStudio.OLE.Interop" Version="7.10.6070" /> | ||
<PackageReference Include="Microsoft.VisualStudio.ProjectSystem" Version="14.1.170-pre" /> | ||
<PackageReference Include="Microsoft.VisualStudio.SDK.VsixSuppression" Version="14.1.33" /> |
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.
Interesting! What does the VsixSupression package do?
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.
hmm, not sure. I just copied the packages that had been included.....
@@ -1,8 +1,6 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
<Import Project="..\..\packages\MicroBuild.Core.0.2.0\build\MicroBuild.Core.props" Condition="Exists('..\..\packages\MicroBuild.Core.0.2.0\build\MicroBuild.Core.props')" /> | |||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
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.
Do we need to include Directory.Build.props/targets to sign assemblies?
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.
Again, it will be auto imported (see above response)
src/ApiPort/ApiPort.csproj
Outdated
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="4.3.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' "> |
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.
Good call on moving those netstandard packages into a targetframework dependent group... saves a lot of binding headaches.
src/ApiPort/App.config
Outdated
</assemblyBinding> | ||
</runtime> | ||
<!-- Uncomment this to see diagnostics --> | ||
<!--<system.diagnostics> |
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.
Is it possible to keep this? It is nice to have the trace listener when I need a stack trace for users who have failures in their client application since we usually abstract it into a "Failed" output. :/
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.
No problem - I've added it back
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using NSubstitute; | ||
|
||
namespace ApiPortVS.Tests |
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.
Why the removal of these unit tests?
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.
It was a duplicated test (must have been renamed at some point to OptionsViewModelTest
but this duplicated existed. It also still uses MSTest while the other one uses Xunit
<PackageReference Include="Microsoft.Composition" Version="1.0.27" /> | ||
<PackageReference Include="Microsoft.Tpl.Dataflow" Version="4.5.24" /> | ||
<PackageReference Include="Microsoft.VisualStudio.ComponentModelHost" Version="14.0.25424" /> | ||
<PackageReference Include="Microsoft.VisualStudio.Composition" Version="14.2.19-pre" /> |
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.
The packages don't match the original ones... so I am getting downgrade warnings during the restore.
The app.config
;
<package id="Microsoft.VisualStudio.ComponentModelHost" version="15.0.26201" targetFramework="net46" />
<package id="Microsoft.VisualStudio.Composition" version="15.0.70" targetFramework="net46" />
Same with Microsoft.VisualStudio.Validation.
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.
I got that at one point and fixed it. Where are you seeing it?
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.
When I'm doing the restore NuGet packages for solution or rebuild in visual studio 2017.
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.
Restoring NuGet packages...
To prevent NuGet from restoring packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages during build.'
NU1605: Detected package downgrade: Microsoft.VisualStudio.Composition from 15.0.70 to 14.2.19-pre. Reference the package directly from the project to select a different version.
ApiPort.VisualStudio.2017 (>= 1.0.0) -> Microsoft.VisualStudio.ProjectSystem (>= 15.0.751) -> Microsoft.VisualStudio.Composition (>= 15.0.70)
ApiPort.VisualStudio.2017 (>= 1.0.0) -> Microsoft.VisualStudio.Composition (>= 14.2.19-pre)
NU1605: Detected package downgrade: Microsoft.VisualStudio.Validation from 15.0.82 to 14.1.111. Reference the package directly from the project to select a different version.
ApiPort.VisualStudio.2017 (>= 1.0.0) -> Microsoft.VisualStudio.ProjectSystem (>= 15.0.751) -> Microsoft.VisualStudio.Validation (>= 15.0.82)
ApiPort.VisualStudio.2017 (>= 1.0.0) -> Microsoft.VisualStudio.Validation (>= 14.1.111)
NU1605: Detected package downgrade: Microsoft.VisualStudio.Validation from 15.3.15 to 14.1.111. Reference the package directly from the project to select a different version.
ApiPort.VisualStudio.2017 (>= 1.0.0) -> Microsoft.VisualStudio.Threading (>= 15.3.35) -> Microsoft.VisualStudio.Validation (>= 15.3.15)
ApiPort.VisualStudio.2017 (>= 1.0.0) -> Microsoft.VisualStudio.Validation (>= 14.1.111)
NU1605: Detected package downgrade: Microsoft.VisualStudio.ProjectSystem from 15.0.751 to 14.1.170-pre. Reference the package directly from the project to select a different version.
ApiPort.Vsix (>= 1.0.0) -> ApiPort.VisualStudio (>= 1.0.0) -> ApiPort.VisualStudio.2017 (>= 1.0.0) -> Microsoft.VisualStudio.ProjectSystem (>= 15.0.751)
ApiPort.Vsix (>= 1.0.0) -> ApiPort.VisualStudio (>= 1.0.0) -> Microsoft.VisualStudio.ProjectSystem (>= 14.1.170-pre)
NU1605: Detected package downgrade: Microsoft.VisualStudio.Threading from 15.3.35 to 14.1.131. Reference the package directly from the project to select a different version.
ApiPort.Vsix (>= 1.0.0) -> ApiPort.VisualStudio (>= 1.0.0) -> ApiPort.VisualStudio.2017 (>= 1.0.0) -> Microsoft.VisualStudio.Threading (>= 15.3.35)
ApiPort.Vsix (>= 1.0.0) -> ApiPort.VisualStudio (>= 1.0.0) -> Microsoft.VisualStudio.Threading (>= 14.1.131)
NU1605: Detected package downgrade: Microsoft.VisualStudio.ProjectSystem from 15.0.751 to 14.1.170-pre. Reference the package directly from the project to select a different version.
ApiPort.VisualStudio (>= 1.0.0) -> ApiPort.VisualStudio.2017 (>= 1.0.0) -> Microsoft.VisualStudio.ProjectSystem (>= 15.0.751)
ApiPort.VisualStudio (>= 1.0.0) -> Microsoft.VisualStudio.ProjectSystem (>= 14.1.170-pre)
NU1605: Detected package downgrade: Microsoft.VisualStudio.Threading from 15.3.35 to 14.1.131. Reference the package directly from the project to select a different version.
ApiPort.VisualStudio (>= 1.0.0) -> ApiPort.VisualStudio.2017 (>= 1.0.0) -> Microsoft.VisualStudio.Threading (>= 15.3.35)
ApiPort.VisualStudio (>= 1.0.0) -> Microsoft.VisualStudio.Threading (>= 14.1.131)
1>------ Rebuild All started: Project: Microsoft.Fx.Portability, Configuration: Debug Any CPU ------
1>Microsoft.Fx.Portability -> D:\git\conniey\dotnet-apiport\bin\Debug\Microsoft.Fx.Portability\net46\Microsoft.Fx.Portability.dll
1>Microsoft.Fx.Portability -> D:\git\conniey\dotnet-apiport\bin\Debug\Microsoft.Fx.Portability\netstandard1.3\Microsoft.Fx.Portability.dll
2>------ Rebuild All started: Project: Microsoft.Fx.Portability.Cci, Configuration: Debug Any CPU ------
2>Microsoft.Fx.Portability.Cci -> D:\git\conniey\dotnet-apiport\bin\Debug\Microsoft.Fx.Portability.Cci\netstandard1.3\Microsoft.Fx.Portability.Cci.dll
3>------ Rebuild All started: Project: ApiPort.VisualStudio.Common, Configuration: Debug Any CPU ------
3> ApiPort.VisualStudio.Common -> D:\git\conniey\dotnet-apiport\bin\Debug\ApiPort.VisualStudio.Common\ApiPort.VisualStudio.Common.dll
4>------ Rebuild All started: Project: ApiPort.VisualStudio.2015, Configuration: Debug Any CPU ------
5>------ Rebuild All started: Project: ApiPort.VisualStudio.2017, Configuration: Debug Any CPU ------
4> ApiPort.VisualStudio.2015 -> D:\git\conniey\dotnet-apiport\bin\Debug\ApiPort.VisualStudio.2015\ApiPort.VisualStudio.2015.dll
5>C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1987,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed.
5> ApiPort.VisualStudio.2017 -> D:\git\conniey\dotnet-apiport\bin\Debug\ApiPort.VisualStudio.2017\ApiPort.VisualStudio.2017.dll
6>------ Rebuild All started: Project: ApiPort.VisualStudio, Configuration: Debug Any CPU ------
6>C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1987,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed.
6>CSC : error CS0016: Could not write to output file 'D:\git\conniey\dotnet-apiport\bin\Debug\eoy1ssmx\eoy1ssmx.xml' -- 'Could not find a part of the path 'D:\git\conniey\dotnet-apiport\bin\Debug\eoy1ssmx\eoy1ssmx.xml'.'
7>------ Rebuild All started: Project: ApiPort.Vsix, Configuration: Debug Any CPU ------
7>C:\Users\conniey\.nuget\packages\microsoft.vssdk.buildtools\15.1.192\tools\VSSDK\Microsoft.VsSDK.targets(80,5): warning VSSDK1018: Targets version (1.0.179.29298) and build task version (1.0.249.40350) do not match. Restarting Visual Studio could help fix this issue.
========== Rebuild All: 5 succeeded, 2 failed, 0 skipped ==========
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.
Ah - seems that when you have WPF assets, it will create a tmp project for baml generation. Pull latest commit and try building again (do a git clean, though, before)
@conniey I got the windows builds to work, but can't figure out why the *nix ones are failing. Any ideas? |
@twsouthwick |
We need to support it for building on non-Windows systems... We've had a couple of customers issue bugs because they were unable to build/run ApiPort on their Linux machine. |
@twsouthwick
|
@dotnet-bot test this please |
@dotnet-bot test this please |
0b6e623
to
a614094
Compare
src/ApiPort.Vsix/ApiPort.Vsix.csproj
Outdated
<None Include="source.extension.vsixmanifest"> | ||
<SubType>Designer</SubType> | ||
</None> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="MicroBuild.Core" Version="0.2.0" /> |
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.
All the MicroBuild.Core
and Microsoft.VSSDK.BuildTools
developer dependencies will flow into the NuGet package. Change all these to something like:
<PackageReference Include="MicroBuild.Core" Version="0.2.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
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.
Fixed - moved the microbuild.core references to Directory.Build.targets
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.
LGTM!
@@ -147,7 +46,6 @@ | |||
</ProjectReference> | |||
<ProjectReference Include="..\Microsoft.Fx.Portability\Microsoft.Fx.Portability.csproj"> | |||
<Project>{8d84ec23-9977-4cc8-b649-035ffae9664c}</Project> | |||
<AdditionalProperties>TargetFramework=net46</AdditionalProperties> |
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.
@twsouthwick This line needs to be added back.
This is a second attempt at it (see #454 for the first). It now creates the VSIX, and uses the pack target for nuget package creation.