-
Notifications
You must be signed in to change notification settings - Fork 108
Use PackageReference instead of packages.config in VSIX project #499
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
Conversation
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <Import Project="..\..\packages\Microsoft.VSSDK.BuildTools.15.1.192\build\Microsoft.VSSDK.BuildTools.props" Condition="Exists('..\..\packages\Microsoft.VSSDK.BuildTools.15.1.192\build\Microsoft.VSSDK.BuildTools.props')" /> | ||
| <Project ToolsVersion="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.
Since we've already decided to support only VS2017
| <RootNamespace>NUnit3TestAdapter</RootNamespace> | ||
| <AssemblyName>NUnit3TestAdapter</AssemblyName> | ||
| <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | ||
| <TargetName>NUnit3TestAdapter</TargetName> |
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.
NuGet restore gets confused when two projects have the same AssemblyName. Setting the TargetName to control the output .vsix name is more clear anyway since we're not even compiling an assembly in the VSIX project.
| @@ -27,27 +19,11 @@ | |||
| <CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory> | |||
| <DeployExtension>False</DeployExtension> | |||
| <IsProductComponent>false</IsProductComponent> | |||
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 seems like the eight lines above could be reduced, but I don't know enough about VSIX projects to want to try yet.
| <ErrorReport>prompt</ErrorReport> | ||
| <WarningLevel>4</WarningLevel> | ||
| <DeployExtension Condition="'$(AppVeyor)' != ''">False</DeployExtension> | ||
| </PropertyGroup> |
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.
Since we aren't compiling an assembly...
| <DeployExtension Condition="'$(AppVeyor)' != ''">False</DeployExtension> | ||
| </PropertyGroup> | ||
| <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " /> | ||
| <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " /> |
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.
This is still necessary so that VS can detect which configurations and platforms to show in Configuration Manager. If these conditions are removed, VS changes the solution file to list this project as x86.
| // by using the '*' as shown below: | ||
| // [assembly: AssemblyVersion("1.0.*")] | ||
| [assembly: AssemblyVersion("1.0.0.0")] | ||
| [assembly: AssemblyFileVersion("1.0.0.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.
Since we're not compiling an assembly in this project
| </dependentAssembly> | ||
| </assemblyBinding> | ||
| </runtime> | ||
| <startup/></configuration> |
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.
Since we're not compiling an assembly in this project, nor are we dealing with versions of the engine < 3.0.5797.
| Configuration = configuration, | ||
| Verbosity = Verbosity.Minimal, | ||
| ToolVersion = MSBuildToolVersion.VS2017 | ||
| }.WithTarget("Restore")); |
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.
Neither DotNetCoreRestore nor NuGetRestore are happy about the VSIX project, but MSBuild has become my default ever since NuGet was integrated into the MSBuild SDK.
rprouse
left a comment
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
|
/cc @OsirisTerje (you had asked that we not merge unless you had reviewed). |
|
@jnm2 Merge it :-) |
Closes #451
The first commit does the minimum necessary to use PackageReference instead of packages.config.
The other does extra cleanup to make the project file smaller.