Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Fix multiple build issues with VS2017 #162

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
Expand Down Expand Up @@ -60,8 +60,6 @@ AssemblyVersion=$(AssemblyVersion)" />
</Target>

<Target Name="LocalPublish" Condition="'$(CI)' != 'true'" AfterTargets="Pack">
<Exec Command='rd "$(NuGetPackageRoot)$(PackageId.ToLowerInvariant())" /q /s' Condition="Exists('$(NuGetPackageRoot)$(PackageId.ToLowerInvariant())')" />
Copy link
Contributor

Choose a reason for hiding this comment

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

This clears the local nuget cache for the package we're building. Without this, testing locally is harder unnecessarily. i.e. you can have a test project referencing version * and since there will be nothing on the cache and the package in $(TEMP)\packages will be greater than the one in nuget, you'll automatically get that. If there was a cached version of a previous build of the same package version, removing this line will cause the old one to be used, instead of extracting the new build fresh.


<ItemGroup>
<ToDelete Include="$(TEMP)\packages\$(PackageId)*.nupkg" />
</ItemGroup>
Expand All @@ -71,4 +69,6 @@ AssemblyVersion=$(AssemblyVersion)" />
<Copy SourceFiles="$(PackageTargetPath)" DestinationFolder="$(TEMP)\packages" />
</Target>

<Import Project="$(MSBuildProjectDirectory)\$(MSBuildProjectName).targets" Condition="Exists('$(MSBuildProjectDirectory)\$(MSBuildProjectName).targets')" />
Copy link
Contributor

Choose a reason for hiding this comment

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

Brought this commit in #167


</Project>
2 changes: 0 additions & 2 deletions src/NuGet.Build.Packaging.Shared.targets
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
<ThisAssemblyProjectProperty Include="PackageVersion" />
</ItemGroup>

<Import Project="$(MSBuildProjectDirectory)\$(MSBuildProjectName).targets" Condition="Exists('$(MSBuildProjectDirectory)\$(MSBuildProjectName).targets')" />

<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
<NuGetPackagingTargetsImported>true</NuGetPackagingTargetsImported>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
<PackageReference Include="MSBuilder.DumpItems" Version="0.2.1" />
<PackageReference Include="MSBuilder.Introspect" Version="0.1.5" />
<PackageReference Include="MSBuilder.ThisAssembly.Project" Version="0.3.3" />
<PackageReference Include="MSBuilder.VsixDependency" Version="0.2.13" />
<PackageReference Include="MSBuilder.VsixInstaller" Version="0.2.18" />
<PackageReference Include="MSBuilder.VsixDependency" Version="0.2.16" />
<PackageReference Include="MSBuilder.VsixInstaller" Version="1.0.7" />
<PackageReference Include="VSLangProj150" Version="1.0.0" />
<PackageReference Include="VSSDK.ComponentModelHost.11" Version="11.0.4" />
</ItemGroup>
Expand Down