-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MSBuild Project support via 'Minsk.Sdk'
Improved Build/Dev experience Partial Project System support PDB Generation is needed for visual debugging
- Loading branch information
Showing
23 changed files
with
452 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<configuration> | ||
<packageSources> | ||
<add key="DevLocal" value="artifacts"/> | ||
</packageSources> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"msbuild-sdks": { | ||
"Minsk.Sdk": "0.1.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<Project Sdk="Minsk.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,22 @@ | ||
<Project> | ||
|
||
<PropertyGroup> | ||
<Features>Strict</Features> | ||
<LangVersion>8.0</LangVersion> | ||
<Features>strict</Features> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<SolutionDir Condition="'$(SolutionDir)' == ''">$(MSBuildThisFileDirectory)</SolutionDir> | ||
<RepositoryDir Condition="'$(RepositoryDir)' == ''">$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', '..\'))</RepositoryDir> | ||
</PropertyGroup> | ||
|
||
<ItemGroup Condition="'$(IsPackable)' == 'true'"> | ||
<Content Include="$(PackageIconPath)" Visible="false"/> | ||
<Content Include="$(PackageLicensePath)" Visible="false"/> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(EnableDefaultBuildItems)' == 'true'"> | ||
<Content Include="$(DefaultBuildItemIncludes)" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)"/> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,36 @@ | ||
<Project> | ||
|
||
<PropertyGroup> | ||
<Serviceable>true</Serviceable> | ||
<Product>Minsk Compiler</Product> | ||
<Authors>Immo Landworth</Authors> | ||
<PackageIcon>Minsk.png</PackageIcon> | ||
<PackageLicenseFile>LICENSE</PackageLicenseFile> | ||
<Copyright>Copytright © 2019 Immo Landworth</Copyright> | ||
<PackageRequireAcceptance>false</PackageRequireAcceptance> | ||
<RepositoryUrl>https://github.com/terrajobst/minsk</RepositoryUrl> | ||
<PackageProjectUrl>https://github.com/terrajobst/minsk</PackageProjectUrl> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<PackageIconPath>$(RepositoryDir)$(PackageIcon)</PackageIconPath> | ||
<PackageLicensePath>$(RepositoryDir)$(PackageLicenseFile)</PackageLicensePath> | ||
<PackageOutputPath>$(RepositoryDir)artifacts</PackageOutputPath> | ||
<PublishDir>$(RepositoryDir)artifacts\$(ProjectName)</PublishDir> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<EnableDefaultBuildItems Condition="'$(EnableDefaultBuildItems)' == ''">false</EnableDefaultBuildItems> | ||
<DefaultBuildItemIncludes>**\*.props;**\*.targets;**\*.items;**\*.tasks</DefaultBuildItemIncludes> | ||
<DefaultItemExcludes>$(DefaultItemExcludes);*.props;*.targets</DefaultItemExcludes> | ||
</PropertyGroup> | ||
|
||
<ItemGroup Condition="'$(IsPackable)' == 'true'"> | ||
<Content Update="@(Content)" Pack="true" PackagePath=""/> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<None Remove="@(Content)"/> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<Project> | ||
|
||
<PropertyGroup> | ||
<!-- The language file extension for minsk is 'ms' --> | ||
<DefaultLanguageSourceExtension>.ms</DefaultLanguageSourceExtension> | ||
</PropertyGroup> | ||
|
||
<Import Project="Minsk.ProjectSystem.props"/> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<Project> | ||
|
||
<Import Project="$(MSBuildToolsPath)\Microsoft.Managed.Before.targets" Condition="Exists('$(MSBuildToolsPath)\Microsoft.Managed.Before.targets')"/> | ||
|
||
<ImportGroup Condition="'$(IsCrossTargetingBuild)' == 'true'"> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.Common.CrossTargeting.targets"/> | ||
<Import Project="Minsk.OuterBuild.targets"/> | ||
</ImportGroup> | ||
|
||
<Import Project="Minsk.ProjectSystem.targets"/> | ||
|
||
<ImportGroup Condition="'$(IsCrossTargetingBuild)' != 'true'"> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets"/> | ||
<Import Project="Minsk.CoreCompile.targets"/> | ||
</ImportGroup> | ||
|
||
<Import Project="$(MSBuildToolsPath)\Microsoft.Managed.After.targets" Condition="Exists('$(MSBuildToolsPath)\Microsoft.Managed.After.targets')"/> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<Project> | ||
|
||
<Import Project="..\Tasks\Minsk.tasks"/> | ||
|
||
<Target Name="CreateManifestResourceNames"/> | ||
|
||
<Target Name="GetCoreCompileInputsOutputs"> | ||
<ItemGroup> | ||
<!-- Inputs --> | ||
<CoreCompileInput Include="@(Compile)"/> | ||
<CoreCompileInput Include="@(_CoreCompileResourceInputs)"/> | ||
<CoreCompileInput Include="$(ApplicationIcon)"/> | ||
<CoreCompileInput Include="$(AssemblyOriginatorKeyFile)"/> | ||
<CoreCompileInput Include="@(ReferencePathWithRefAssemblies)"/> | ||
<CoreCompileInput Include="@(CompiledLicenseFile)"/> | ||
<CoreCompileInput Include="@(LinkResource)"/> | ||
<CoreCompileInput Include="@(EmbeddedDocumentation)"/> | ||
<CoreCompileInput Include="$(Win32Resource)"/> | ||
<CoreCompileInput Include="$(Win32Manifest)"/> | ||
<CoreCompileInput Include="@(CustomAdditionalCompileInputs)"/> | ||
<CoreCompileInput Include="$(ResolvedCodeAnalysisRuleSet)"/> | ||
<CoreCompileInput Include="@(AdditionalFiles)"/> | ||
<CoreCompileInput Include="@(EmbeddedFiles)"/> | ||
<CoreCompileInput Include="@(EditorConfigFiles)"/> | ||
<!-- Outputs --> | ||
<CoreCompileOutput Include="@(DocFileItem)"/> | ||
<CoreCompileOutput Include="@(IntermediateAssembly)"/> | ||
<CoreCompileOutput Include="@(IntermediateRefAssembly)"/> | ||
<CoreCompileOutput Include="@(_DebugSymbolsIntermediatePath)"/> | ||
<CoreCompileOutput Include="$(NonExistentFile)"/> | ||
<CoreCompileOutput Include="@(CustomAdditionalCompileOutputs)"/> | ||
</ItemGroup> | ||
</Target> | ||
|
||
<Target Name="CoreCompile" Inputs="@(CoreCompileInput)" Outputs="@(CoreCompileOutput)" DependsOnTargets="GetCoreCompileInputsOutputs;$(CoreCompileDependsOn)"> | ||
<MinskCompile | ||
ToolPath="$(MinskToolsPath)" | ||
ToolExe="$(MinskCompilerExe)" | ||
Condition="'%(_CoreCompileResourceInputs.WithCulture)' != 'true'" | ||
Sources="@(Compile)" | ||
OutputAssembly="@(IntermediateAssembly)" | ||
References="@(ReferencePathWithRefAssemblies)"> | ||
<Output TaskParameter="CommandLineArgs" ItemName="MscCommandLineArgs"/> | ||
</MinskCompile> | ||
|
||
<ItemGroup> | ||
<_CoreCompileResourceInputs Remove="@(_CoreCompileResourceInputs)"/> | ||
</ItemGroup> | ||
|
||
<CallTarget Targets="$(TargetsTriggeredByCompilation)" Condition="'$(TargetsTriggeredByCompilation)' != ''"/> | ||
</Target> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<Project> | ||
|
||
<!-- | ||
============================================================ | ||
Publish | ||
Multi-targeting version of Publish. | ||
[IN] | ||
$(TargetFrameworks) - Semicolon delimited list of target frameworks. | ||
$(InnerTargets) - The targets to publish for each target framework. | ||
Defaults to 'Publish' if unset, but allows override to support | ||
`msbuild /p:InnerTargets=X;Y;Z` which will build X, Y & Z | ||
targets for each target framework. | ||
[OUT] | ||
@(InnerOutput) - The combined output items of the inner targets across all builds. | ||
============================================================ | ||
--> | ||
<Target Name="Publish" DependsOnTargets="_SetPublishInnerTarget;DispatchToInnerBuilds"/> | ||
|
||
<Target Name="_SetPublishInnerTarget" Returns="@(InnerOutput)"> | ||
<PropertyGroup Condition="'$(InnerTargets)' == ''"> | ||
<InnerTargets>Publish</InnerTargets> | ||
</PropertyGroup> | ||
</Target> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<Project> | ||
|
||
<!-- Properties --> | ||
<PropertyGroup> | ||
<AppDesignerFolder Condition="'$(AppDesignerFolder)' == ''">Properties</AppDesignerFolder> | ||
<AppDesignerFolderContentsVisibleOnlyInShowAllFiles Condition="'$(AppDesignerFolderContentsVisibleOnlyInShowAllFiles)' == ''">false</AppDesignerFolderContentsVisibleOnlyInShowAllFiles> | ||
<TemplateLanguage Condition="'$(TemplateLanguage)' == ''">Minsk</TemplateLanguage> | ||
<LanguageServiceName Condition="'$(LanguageServiceName)' == ''">Minsk</LanguageServiceName> | ||
<DesignerVariableNaming Condition="'$(DesignerVariableNaming)' == ''">Camel</DesignerVariableNaming> | ||
<DesignerFunctionVisibility Condition="'$(DesignerFunctionVisibility)' == ''">Private</DesignerFunctionVisibility> | ||
<DesignerHiddenCodeGeneration Condition="'$(DesignerHiddenCodeGeneration)' == ''">Declarations</DesignerHiddenCodeGeneration> | ||
</PropertyGroup> | ||
|
||
<!-- | ||
CL CPS: {13B669BE-BB05-4DDF-9536-439F39A36129} | ||
C# CPS: {9A19103F-16F7-4668-BE54-9A1E7A4F7556} | ||
VB CPS: {778DAE3C-4631-46EA-AA77-85C1314464D9} | ||
F# CPS: {6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705} | ||
--> | ||
<PropertyGroup> | ||
<DefaultProjectTypeGuid>{13B669BE-BB05-4DDF-9536-439F39A36129}</DefaultProjectTypeGuid> | ||
</PropertyGroup> | ||
|
||
<!-- TODO: Replace with Minsk ProjectSystem GUIDs when developed --> | ||
<PropertyGroup> | ||
<LanguageServiceId Condition="'$(LanguageServiceId)'==''">$(DefaultProjectTypeGuid)</LanguageServiceId> | ||
<AddItemTemplatesGuid Condition="'$(AddItemTemplatesGuid)' == ''">$(DefaultProjectTypeGuid)</AddItemTemplatesGuid> | ||
<GeneratorsTypeGuid Condition="'$(GeneratorsTypeGuid)' == ''">$(DefaultProjectTypeGuid)</GeneratorsTypeGuid> | ||
<CmdUIContextGuid Condition="'$(CmdUIContextGuid)' == ''">$(DefaultProjectTypeGuid)</CmdUIContextGuid> | ||
</PropertyGroup> | ||
|
||
<!-- TODO: Remove CSharp when Minsk support is added in VS --> | ||
<PropertyGroup Condition="'$(DisableCSharpProjectSystem)' != 'true'"> | ||
<TemplateLanguage>CSharp</TemplateLanguage> | ||
<LanguageServiceName>C#</LanguageServiceName> | ||
<DefaultProjectTypeGuid>{9A19103F-16F7-4668-BE54-9A1E7A4F7556}</DefaultProjectTypeGuid> | ||
<LanguageServiceId>{694DD9B6-B865-4C5B-AD85-86356E9C88DC}</LanguageServiceId> | ||
<AddItemTemplatesGuid>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</AddItemTemplatesGuid> | ||
<GeneratorsTypeGuid>{FAE04EC1-301F-11D3-BF4B-00C04F79EFBC}</GeneratorsTypeGuid> | ||
<CmdUIContextGuid>{FAE04EC1-301F-11D3-BF4B-00C04F79EFBC}</CmdUIContextGuid> | ||
</PropertyGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<Project> | ||
|
||
<!-- Import design time targets for the Roslyn Project System. These are only available if Visual Studio is installed. --> | ||
<PropertyGroup> | ||
<DesignTimeExtensionsPath Condition="'$(DesignTimeExtensionsPath)'==''">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\Managed</DesignTimeExtensionsPath> | ||
<DesignTimeLanguageTargets Condition="'$(DesignTimeLanguageTargets)'==''">$(DesignTimeExtensionsPath)\Microsoft.Managed.DesignTime.targets</DesignTimeLanguageTargets> | ||
</PropertyGroup> | ||
|
||
<Import Project="$(DesignTimeLanguageTargets)" Condition="'$(DesignTimeLanguageTargets)' != '' AND Exists('$(DesignTimeLanguageTargets)')"/> | ||
|
||
<ItemGroup> | ||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)Rules\Minsk.ProjectItemsSchema.xaml"/> | ||
<!-- TODO: Remove CSharp when Minsk support is added in VS --> | ||
<ProjectCapability Include="CSharp"/> | ||
<ProjectCapability Include="Minsk;Managed;ClassDesigner"/> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(DefineCommonManagedItemSchemas)' == 'true'"> | ||
|
||
<PropertyPageSchema Include="$(ManagedXamlNeutralResourcesDirectory)EditorConfigFiles.xaml"> | ||
<Context>File</Context> | ||
</PropertyPageSchema> | ||
|
||
<PropertyPageSchema Include="$(ManagedXamlResourcesDirectory)EditorConfigFiles.BrowseObject.xaml"> | ||
<Context>BrowseObject</Context> | ||
</PropertyPageSchema> | ||
|
||
</ItemGroup> | ||
|
||
<!-- Targets --> | ||
|
||
<!-- Returns Msc command-line arguments for the language service --> | ||
<Target Name="CompileDesignTime" | ||
Returns="@(_CompilerCommandLineArgs)" | ||
DependsOnTargets="_CheckCompileDesignTimePrerequisite;Compile" | ||
Condition="'$(IsCrossTargetingBuild)' != 'true'"> | ||
|
||
<ItemGroup> | ||
<_CompilerCommandLineArgs Include="@(MscCommandLineArgs)"/> | ||
</ItemGroup> | ||
|
||
</Target> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<ProjectSchemaDefinitions | ||
xmlns="http://schemas.microsoft.com/build/2009/properties"> | ||
|
||
<ContentType | ||
Name="MinskFile" | ||
DisplayName="Minsk file" | ||
ItemType="Compile"> | ||
</ContentType> | ||
|
||
<ItemType Name="Compile" DisplayName="Minsk compiler"/> | ||
<ItemType Name="AdditionalFiles" DisplayName="Minsk analyzer additional file"/> | ||
<ItemType Name="EditorConfigFiles" DisplayName=".editorconfig file" /> | ||
|
||
<FileExtension Name=".ms" ContentType="MinskFile"/> | ||
|
||
</ProjectSchemaDefinitions> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<Project> | ||
|
||
<Import Project="..\$(MSBuildThisFile)"/> | ||
|
||
<!-- Fix Packing Build Outputs into '<NuGetRoot>\<BuildOutputTargetFolder>[\<TfmSpecificFolder>]\*.[dll|exe|xml|pdb]' --> | ||
|
||
<PropertyGroup> | ||
<Nullable>Enable</Nullable> | ||
<NoWarn>$(NoWarn);NU5100</NoWarn> | ||
<TargetsForTfmSpecificContentInPackage>_IncludeTfmSpecificBuildOutput</TargetsForTfmSpecificContentInPackage> | ||
</PropertyGroup> | ||
|
||
<Target Name="_GetTfmSpecificFolder" Condition="'$(TargetFrameworks)' != ''"> | ||
<PropertyGroup> | ||
<TfmSpecificFolder Condition="$(TargetFrameworks.Split(';').Length) == 1" /> | ||
<TfmSpecificFolder Condition="$(TargetFrameworks.Split(';').Length) > 2">$(TargetFramework.Trim('.0123456789'))</TfmSpecificFolder> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="$(TargetFrameworks.Split(';').Length) == 2"> | ||
<TfmSpecificFolder Condition="$(TargetFramework.StartsWith('net4'))">Full</TfmSpecificFolder> | ||
<TfmSpecificFolder Condition="$(TargetFramework.StartsWith('netcoreapp'))">Core</TfmSpecificFolder> | ||
<TfmSpecificFolder Condition="$(TargetFramework.StartsWith('netstandard'))">Core</TfmSpecificFolder> | ||
</PropertyGroup> | ||
</Target> | ||
|
||
<Target Name="_IncludeTfmSpecificBuildOutput" Condition="'$(IncludeBuildOutput)' == 'false'" | ||
DependsOnTargets="_GetTfmSpecificFolder;BuiltProjectOutputGroup"> | ||
<PropertyGroup> | ||
<TfmSpecificFolder Condition="'$(TargetFrameworks)' == ''" /> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<TfmSpecificPackageFile Include="@(BuiltProjectOutputGroupOutput->'%(FinalOutputPath)')" KeepMetadata="false"> | ||
<PackagePath>$([System.IO.Path]::Combine('$(BuildOutputTargetFolder)', '$(TfmSpecificFolder)'))</PackagePath> | ||
</TfmSpecificPackageFile> | ||
</ItemGroup> | ||
</Target> | ||
|
||
</Project> |
Oops, something went wrong.