Skip to content

Commit 64ba7c9

Browse files
authored
Fixing references for Building NTVS on VS15 (#1403)
* Fixing BuildRelease Script for Vs15 Post Preview 3 Issue #1400 **Bug** Build release script currently does not support building using vs15 post preview 3 **Fixes** Add support for specifying install location for vs and picking up correct tools from the target vs15 instance. Closes #1400 * revert assembly version change * Fix TestAdapter References for Building on VS15 **Bug** When building NTVS on a machine that only has VS15 post preview 3 installed, `DevEnvDir` is incorrect. The value is supposed to come from the registry, but the registry key does not exist in this case. **Fix** Optionally pass DevEnvDir in the buildscript itself insead of looking it up from the registry. * Fixing for vs14
1 parent aecad22 commit 64ba7c9

5 files changed

Lines changed: 7 additions & 20 deletions

File tree

Build/Common.Build.settings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797

9898
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
9999

100-
<DevEnvDir>$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\$(VSTarget)', 'InstallDir', null, RegistryView.Registry32))\</DevEnvDir>
100+
<DevEnvDir Condition="'$(DevEnvDir)' == ''">$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\$(VSTarget)', 'InstallDir', null, RegistryView.Registry32))\</DevEnvDir>
101101
<VSSDKDir>$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\VSIP\$(VSTarget)', 'InstallDir', null, RegistryView.Registry32))\</VSSDKDir>
102102
</PropertyGroup>
103103

Build/VisualStudioHelpers.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function get_target_vs_versions($vstarget, $vsroot) {
2424
$target_versions += @{
2525
number=$target_vs.number;
2626
name=$target_vs.name;
27-
vsroot=$vspath.InstallDir;
27+
vsroot="$($vspath.InstallDir)..\..\";
2828
msbuildroot=$msbuildroot
2929
}
3030
}

Nodejs/Product/InteractiveWindow/InteractiveWindow.csproj

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,4 @@
175175
</PropertyGroup>
176176
<Import Project="$(BuildRoot)\Common\Product\ReplWindow\ReplWindow.proj" />
177177
<Import Project="..\ProjectAfter.settings" />
178-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
179-
Other similar extension points exist, see Microsoft.Common.targets.
180-
<Target Name="BeforeBuild">
181-
</Target>
182-
<Target Name="AfterBuild">
183-
</Target>
184-
-->
185178
</Project>

Nodejs/Product/TestAdapter/TestAdapter.csproj

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@
5555
<EmbedInteropTypes>False</EmbedInteropTypes>
5656
</Reference>
5757
<Reference Include="Microsoft.VisualStudio.TestPlatform.ObjectModel">
58-
<HintPath>$(DevEnvDir)\CommonExtensions\Microsoft\TestWindow\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll</HintPath>
58+
<HintPath>$(DevEnvDir)CommonExtensions\Microsoft\TestWindow\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll</HintPath>
5959
<Private>False</Private>
6060
</Reference>
6161
<Reference Include="Microsoft.VisualStudio.TestWindow.Interfaces">
62-
<HintPath>$(DevEnvDir)\CommonExtensions\Microsoft\TestWindow\Microsoft.VisualStudio.TestWindow.Interfaces.dll</HintPath>
62+
<HintPath>$(DevEnvDir)CommonExtensions\Microsoft\TestWindow\Microsoft.VisualStudio.TestWindow.Interfaces.dll</HintPath>
6363
<Private>False</Private>
6464
</Reference>
6565
<Reference Include="Microsoft.VisualStudio.Text.Data, Version=$(VSTarget).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
@@ -92,7 +92,7 @@
9292
<Reference Include="Microsoft.CSharp" />
9393
<Reference Include="WindowsBase" />
9494
</ItemGroup>
95-
<Choose>
95+
<Choose>
9696
<When Condition="$(VSTarget) == '15.0'">
9797
<ItemGroup>
9898
<Reference Include="Microsoft.VisualStudio.Shell.Framework, Version=$(VSTarget).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
@@ -174,11 +174,4 @@
174174
</PropertyGroup>
175175
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
176176
</Target>
177-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
178-
Other similar extension points exist, see Microsoft.Common.targets.
179-
<Target Name="BeforeBuild">
180-
</Target>
181-
<Target Name="AfterBuild">
182-
</Target>
183-
-->
184177
</Project>

Nodejs/Setup/BuildRelease.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,8 @@ function msbuild-options($target) {
224224
"/p:CopyOutputsToPath=$($target.destdir)",
225225
"/p:Configuration=$($target.config)",
226226
"/p:MsiVersion=$($target.msi_version)",
227-
"/p:ReleaseVersion=$($target.release_version)"
227+
"/p:ReleaseVersion=$($target.release_version)",
228+
"/p:DevEnvDir=$($target.vsroot)\Common7\IDE\\"
228229
)
229230
}
230231

0 commit comments

Comments
 (0)