This repository has been archived by the owner on Mar 22, 2019. It is now read-only.
forked from microsoft/MSBuildSdks
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit of Microsoft.NET.Sdk.WindowsForms project
The targets files in this project were borrowed from a comment in dotnet/project-system#1272 and modified somewhat to fit into an SDK project. Note that these targets are as-yet untested.
- Loading branch information
Showing
7 changed files
with
131 additions
and
0 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
9 changes: 9 additions & 0 deletions
9
src/Microsoft.NET.Sdk.WindowsForms/Microsoft.NET.Sdk.WindowsForms.csproj
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,9 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>netstandard1.1</TargetFramework> | ||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild> | ||
<Description>Provides SDK functionality specific to Windows Forms projects</Description> | ||
<IncludeBuildOutput>false</IncludeBuildOutput> | ||
<PackageTags>tags</PackageTags> | ||
</PropertyGroup> | ||
</Project> |
22 changes: 22 additions & 0 deletions
22
src/Microsoft.NET.Sdk.WindowsForms/Microsoft.NET.Sdk.WindowsForms.nuspec
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,22 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd"> | ||
<metadata> | ||
<id>$id$</id> | ||
<version>$version$</version> | ||
<description>$description$</description> | ||
<authors>$authors$</authors> | ||
<owners>$authors$</owners> | ||
<copyright>$copyright$</copyright> | ||
<projectUrl>$projecturl$</projectUrl> | ||
<licenseUrl>$licenseurl$</licenseUrl> | ||
<iconUrl>$iconurl$</iconUrl> | ||
<tags>$tags$</tags> | ||
<packageTypes> | ||
<packageType name="$packagetype$" /> | ||
</packageTypes> | ||
</metadata> | ||
<files> | ||
<file src="Sdk\**" target="Sdk" /> | ||
<file src="build\**" target="build" /> | ||
</files> | ||
</package> |
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> | ||
<PropertyGroup> | ||
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(MSBuildProjectExtension)' == '.csproj'"> | ||
<_SdkLanguageName>CSharp</_SdkLanguageName> | ||
<_SdkLanguageExtension>.cs</_SdkLanguageExtension> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(MSBuildProjectExtension)' == '.vbproj'"> | ||
<_SdkLanguageName>VisualBasic</_SdkLanguageName> | ||
<_SdkLanguageExtension>.vb</_SdkLanguageExtension> | ||
</PropertyGroup> | ||
|
||
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" /> | ||
<Import Project="$(MSBuildThisFileDirectory)/../build/DesignerProject.props" /> | ||
<Import Project="$(MSBuildThisFileDirectory)/../build/DefaultReferences.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,7 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects> | ||
</PropertyGroup> | ||
|
||
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" /> | ||
</Project> |
20 changes: 20 additions & 0 deletions
20
src/Microsoft.NET.Sdk.WindowsForms/build/DefaultReferences.props
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,20 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects> | ||
</PropertyGroup> | ||
|
||
<ItemGroup Condition="'$(DisableImplicitFrameworkReferences)' != 'true'"> | ||
<_ExtrasImplicitReference Include="System.Windows.Forms" /> | ||
<_ExtrasImplicitReference Include="System.Drawing" /> | ||
<_ExtrasImplicitReference Include="System.Design" /> | ||
|
||
<!-- Set Pack=false on implicit references so they don't get added to NuGet packages as framework assemblies --> | ||
<_ExtrasImplicitReference Update="@(_ExtrasImplicitReference)" Pack="false" /> | ||
<!-- Don't duplicate any references that are explicit in the project file. This means that if you do want to include a framework assembly in your | ||
NuGet package, you can just add the Reference to your project file. --> | ||
<_ExtrasImplicitReference Remove="@(Reference)" /> | ||
|
||
<!-- Add the implicit references to @(Reference) --> | ||
<Reference Include="@(_ExtrasImplicitReference)" /> | ||
</ItemGroup> | ||
</Project> |
37 changes: 37 additions & 0 deletions
37
src/Microsoft.NET.Sdk.WindowsForms/build/DesignerProject.props
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> | ||
<PropertyGroup> | ||
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(DesignerProjectPath)' == '' and '$(DesignerProjectRoot)' != ''"> | ||
<DesignerProjectPath>$(DesignerProjectRoot)/$(MSBuildProjectName).Designer</DesignerProjectPath> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(DesignerProjectPath)' != '' and Exists('$(DesignerProjectPath)')"> | ||
<WinFormsExcludes>$(DesignerProjectPath)/bin/**;$(DesignerProjectPath)/obj/**</WinFormsExcludes> | ||
</PropertyGroup> | ||
|
||
<ItemGroup Condition="'$(DesignerProjectPath)' != '' and Exists('$(DesignerProjectPath)') and '$(EnableDefaultItems)' == 'true'"> | ||
<Compile Include="$(DesignerProjectPath)/**/*$(_SdkLanguageExtension)" Exclude="$(DefaultItemExcludes);$(WinFormsExcludes)" Link="%(RecursiveDir)%(FileName)%(Extension)" /> | ||
<EmbeddedResource Include="$(DesignerProjectPath)/**/*.resx" Exclude="$(DefualtItemExcludes);$(WinFormsExcludes)" Link="%(RecursiveDir)%(FileName)%(Extension)" /> | ||
|
||
<None Include="$(DesignerProjectPath)/**/*" Exclude="$(DefaultItemExcludes);$(WinFormsExcludes);$(DesignerProjectPath)/**/*$(_SdkLanguageExtension);$(DesignerProjectPath)/**/*.rsx" Link="%(RecursiveDir)%(FileName)%(Extension)" Condition="'$(EnableDefaultNoneItems)' == 'true'" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(DesignerProjectPath)' != '' and Exists('$(DesignerProjectPath)')"> | ||
<Compile Update="$(DesignerProjectPath)/**/*$(DefaultLanguageSourceExtension)"> | ||
<PossiblyDependentUpon>$([System.String]::Copy('%(FileName)').Replace('.Designer', ''))$(DefualtLanguageSourceExtension)</PossiblyDependentUpon> | ||
</Compile> | ||
|
||
<EmbeddedResource Update="$(DesignerProjectPath)/**/*.resx"> | ||
<PossiblyDependentUpon>$([System.Text.RegularExpressions.Regex]::Replace('%(FileName)', '\.[a-z]{2}-[A-Z]{2}.resx', '$(DefaultLanguageSourceExtension)'))</PossiblyDependentUpon> | ||
</EmbeddedResource> | ||
|
||
<Compile Update="@(Compile)" Condition="Exists('$(PossiblyDependentUpon)')"> | ||
<DependentUpon>%(Compile.PossiblyDependentUpon)</DependentUpon> | ||
</Compile> | ||
<EmbeddedResource Update="@(EmbeddedResource)" Condition="Exists('$(PossiblyDependentUpon)')"> | ||
<DependentUpon>%(EmbeddedResource.PossiblyDependentUpon)</DependentUpon> | ||
</EmbeddedResource> | ||
</ItemGroup> | ||
</Project> |