Modifications to allow building VSIX from build.
This commit is contained in:
parent
242ea0ee3f
commit
9dbf80dde7
|
|
@ -8,6 +8,9 @@
|
|||
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)Key.snk</AssemblyOriginatorKeyFile>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<PublicSign Condition="'$(OS)' != 'Windows_NT'">true</PublicSign>
|
||||
|
||||
<!-- Workaround for the **/*.cs **/*.resx being auto included in the SDK installed by the latest builds of VS and the rc2 SDK that we currently use -->
|
||||
<EnableDefaultItems>false</EnableDefaultItems>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -4,5 +4,42 @@ var FULL_VERSION='0.1'
|
|||
use-standard-lifecycle
|
||||
k-standard-goals
|
||||
|
||||
#restore-nuget-packages target='initialize'
|
||||
exec program='${Path.Combine(Directory.GetCurrentDirectory(), ".build", "nuget.exe")}' commandline='restore'
|
||||
|
||||
#build-vsix-core
|
||||
@{
|
||||
var programFilesx86 = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86);
|
||||
// Microsoft Visual Studio\2017
|
||||
var buildToolsDirectory = Path.Combine(programFilesx86, "Microsoft Visual Studio", "2017");
|
||||
if (!Directory.Exists(buildToolsDirectory))
|
||||
{
|
||||
throw new Exception("MSBuild 15.0 installation directory could not be located.");
|
||||
}
|
||||
|
||||
var msBuildDirectory = Directory.EnumerateDirectories(buildToolsDirectory).FirstOrDefault();
|
||||
// If VS 2017 is installed, look for MSBuild under Enterprise \ Professional \ Community directory
|
||||
// If the MSBuild tools are separately installed, look for MSBuild under the BuildTools directory
|
||||
if (msBuildDirectory == null)
|
||||
{
|
||||
throw new Exception("MSBuild 15.0 installation directory could not be located.");
|
||||
}
|
||||
|
||||
var msbuildPath = Path.Combine(msBuildDirectory, "MSBuild", "15.0", "bin", "MSBuild.exe");
|
||||
var toolsDirectory = Path.Combine(Directory.GetCurrentDirectory(), "tooling", "Microsoft.VisualStudio.RazorExtension");
|
||||
var artifactsDirectory = Path.Combine(Directory.GetCurrentDirectory(), "artifacts");
|
||||
Directory.CreateDirectory(artifactsDirectory);
|
||||
var logFilePath = Path.Combine(artifactsDirectory, "msbuild.log");
|
||||
}
|
||||
exec program='${msbuildPath}' commandline='/p:DeployExtension=false /fl /flp:v=D /flp:LogFile=${logFilePath}' workingdir='${toolsDirectory}'
|
||||
|
||||
#build-vsix .initialize .compile .build-vsix-core
|
||||
@{
|
||||
var baseDirectory = Directory.GetCurrentDirectory();
|
||||
var buildPath = Path.Combine(baseDirectory, "artifacts", "build");
|
||||
var vsixPath = Directory.EnumerateFiles(baseDirectory, "*.vsix", SearchOption.AllDirectories).First();
|
||||
File.Copy(vsixPath, Path.Combine(buildPath, Path.GetFileName(vsixPath)));
|
||||
}
|
||||
|
||||
#pack-sources target='build-pack'
|
||||
dotnet command='msbuild shared/build.proj /t:Pack /v:n'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
|
||||
<Import Project="..\..\build\common.props" />
|
||||
<PropertyGroup>
|
||||
<VersionPrefix>1.0.0</VersionPrefix>
|
||||
<Description>Razor is a markup syntax for adding server-side logic to web pages. This package contains the Razor design-time infrastructure.</Description>
|
||||
<TargetFrameworks>net451;netstandard1.3</TargetFrameworks>
|
||||
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
|
||||
<Import Project="..\..\build\common.props" />
|
||||
<PropertyGroup>
|
||||
<VersionPrefix>1.0.0</VersionPrefix>
|
||||
<Description>Razor is a markup syntax for adding server-side logic to web pages. This package contains the Razor design-time infrastructure.</Description>
|
||||
<TargetFrameworks>net46</TargetFrameworks>
|
||||
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
|
||||
<Metadata>
|
||||
<Identity Id="Microsoft.VisualStudio.RazorExtension" Version="1.0" Language="en-US" Publisher="Ryan Nowak" />
|
||||
<Identity Id="Microsoft.VisualStudio.RazorExtension" Version="1.0" Language="en-US" Publisher="Microsoft" />
|
||||
<DisplayName>Microsoft.VisualStudio.RazorExtension</DisplayName>
|
||||
<Description xml:space="preserve"></Description>
|
||||
<Description xml:space="preserve">Language services for AspNetCore Razor</Description>
|
||||
</Metadata>
|
||||
<Installation>
|
||||
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[15.0]" />
|
||||
|
|
|
|||
Loading…
Reference in New Issue