Skip to content

Commit

Permalink
Converted Design projects to Sdk-style
Browse files Browse the repository at this point in the history
- Remove 'AssemblyInfo.cs' as it is generated by the .NET SDK.
- Move 'MetadataRegistration.cs' into Common folder
  so that it can be shared across Design projects along with others.
- Update Solution to Use CPS for the Design projects.
  • Loading branch information
Nirmal4G committed Aug 5, 2021
1 parent 794b295 commit fe9f174
Show file tree
Hide file tree
Showing 16 changed files with 238 additions and 989 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ public MetadataRegistration() : base()
// Note:
// The default constructor sets value of 'AssemblyFullName' and
// 'XmlResourceName' used by 'MetadataRegistrationBase.AddDescriptions()'.
// The convention here is that the <RootNamespace> in '.DesignTools.csproj'
// (or Default namespace in Project -> Properties -> Application tab)
// must be the same as runtime assembly's main namespace plus ".Design".
// The convention here is that the root namespace plus the Controls category.
// Example:
// <RootNamespace> + "." + <ControlsCategory> + ".xml"
// "Microsoft.Toolkit.Uwp.UI.Controls" + "." + "Primitives" + ".xml"

Type thisType = this.GetType();
AssemblyName designLib = thisType.Assembly.GetName();

Expand All @@ -31,7 +33,7 @@ public MetadataRegistration() : base()
string controlLibName = designLib.Name.Remove(annexStart, annexString.Length);

AssemblyFullName = designLib.FullName;
XmlResourceName = $"{thisType.Namespace}{controlLibName}.xml";
XmlResourceName = $"{controlLibName}.xml";
}
}
}
Original file line number Diff line number Diff line change
@@ -1,136 +1,15 @@
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{7AEFC959-ED7C-4D96-9E92-72609B40FBE0}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Microsoft.Toolkit.Uwp.UI.Controls.Design</RootNamespace>
<AssemblyName>Microsoft.Toolkit.Uwp.UI.Controls.Core.DesignTools</AssemblyName>
<FileAlignment>512</FileAlignment>
<TargetPlatformVersion>8.1</TargetPlatformVersion>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<ValidateFrameworkCompatibility>false</ValidateFrameworkCompatibility>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\Microsoft.Toolkit.Uwp.UI.Controls.Core\bin\Debug\uap10.0.17763\Design\</OutputPath>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>..\Microsoft.Toolkit.Uwp.UI.Controls.Core\bin\Release\uap10.0.17763\Design\</OutputPath>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<Optimize>true</Optimize>
<DefineConstants>TRACE</DefineConstants>
<TargetFramework>net472</TargetFramework>
<RootNamespace>Microsoft.Toolkit.Uwp.UI.Controls</RootNamespace>
</PropertyGroup>

<PropertyGroup>
<NoWarn>$(NoWarn);0618</NoWarn>
<AssetTargetFallback>$(AssetTargetFallback);uap10.0.17763</AssetTargetFallback>
<AssemblyTitle>Windows Community Toolkit - Common Controls (DesignTools)</AssemblyTitle>
<Description>Design time support for Windows Community Toolkit Common Controls</Description>
</PropertyGroup>
<ItemGroup>
<Reference Include="System.Runtime" />
<Reference Include="System.ObjectModel" />
<Reference Include="System.Runtime.WindowsRuntime" />
<Reference Include="System.Runtime.InteropServices.WindowsRuntime" />
<Reference Include="Microsoft.VisualStudio.DesignTools.Extensibility">
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.DesignTools.Interaction">
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Windows, Version=255.255.255.255, Culture=neutral, processorArchitecture=MSIL">
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
<HintPath>$(MSBuildProgramFiles32)\Windows Kits\10\UnionMetadata\10.0.17763.0\Windows.winmd</HintPath>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup Label="WinRT References">
<Reference Include="System.Xaml" />
<Reference Include="System.Runtime.WindowsRuntime.UI.Xaml" />
<Reference Include="Windows.Foundation.FoundationContract">
<HintPath>$(MSBuildProgramFiles32)\Windows Kits\10\References\10.0.17763.0\Windows.Foundation.FoundationContract\3.0.0.0\Windows.Foundation.FoundationContract.winmd</HintPath>
<Aliases>WindowsRuntime</Aliases>
<Private>False</Private>
</Reference>
<Reference Include="Windows.Foundation.UniversalApiContract">
<HintPath>$(MSBuildProgramFiles32)\Windows Kits\10\References\10.0.17763.0\Windows.Foundation.UniversalApiContract\7.0.0.0\Windows.Foundation.UniversalApiContract.winmd</HintPath>
<Aliases>WindowsRuntime</Aliases>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Common\Constants.cs" />
<Compile Include="Common\MetadataRegistrationBase.cs" />
<Compile Include="Common\PlatformTypes.cs" />
<Compile Include="Controls\DropShadowPanel.Metadata.cs" />
<Compile Include="Controls\DropShadowPanel.Typedata.cs" />
<Compile Include="Controls\ImageEx.Metadata.cs" />
<Compile Include="Controls\ImageEx.Typedata.cs" />
<Compile Include="Controls\InAppNotification.Metadata.cs" />
<Compile Include="Controls\InAppNotification.Typedata.cs" />
<Compile Include="Controls\Loading.Metadata.cs" />
<Compile Include="Controls\Loading.Typedata.cs" />
<Compile Include="Controls\Menu.Metadata.cs" />
<Compile Include="Controls\Menu.Typedata.cs" />
<Compile Include="Controls\MenuItem.Metadata.cs" />
<Compile Include="Controls\MenuItem.Typedata.cs" />
<Compile Include="Controls\RadialProgressBar.Metadata.cs" />
<Compile Include="Controls\RadialProgressBar.Typedata.cs" />
<Compile Include="Controls\RotatorTile.Metadata.cs" />
<Compile Include="Controls\RotatorTile.Typedata.cs" />
<Compile Include="Controls\ScrollHeader.Metadata.cs" />
<Compile Include="Controls\ScrollHeader.Typedata.cs" />
<Compile Include="Controls\TabbedCommandBar.Metadata.cs" />
<Compile Include="Controls\TabbedCommandBar.Typedata.cs" />
<Compile Include="Controls\TabbedCommandBarItem.Metadata.cs" />
<Compile Include="Controls\TabbedCommandBarItem.Typedata.cs" />
<Compile Include="Controls\TextToolbar.Metadata.cs" />
<Compile Include="Controls\TextToolbar.Typedata.cs" />
<Compile Include="Controls\TileControl.Metadata.cs" />
<Compile Include="Controls\TileControl.Typedata.cs" />
<Compile Include="MetadataRegistration.cs" />
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<AppDesigner Include="Properties\" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="..\Microsoft.Toolkit.Uwp.UI.Controls.Core\bin\$(Configuration)\uap10.0.17763\Microsoft.Toolkit.Uwp.UI.Controls.Core.xml">
<Link>Microsoft.Toolkit.Uwp.UI.Controls.Core.xml</Link>
<Visible>False</Visible>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Icons\Microsoft.Toolkit.Uwp.UI.Controls.Menu.icon.png" />
<EmbeddedResource Include="Icons\Microsoft.Toolkit.Uwp.UI.Controls.RotatorTile.icon.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- No-op to avoid build error when packing solution from commandline -->
<Target Name="Pack" />

<Import Project="$(BuildToolsDirectory)Windows.Toolkit.VisualStudio.Design.targets" />

</Project>

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,107 +1,19 @@
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{6BD0BA4A-DE6D-3E87-8F83-63518C31ECD1}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Microsoft.Toolkit.Uwp.UI.Controls.Design</RootNamespace>
<AssemblyName>Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.DesignTools</AssemblyName>
<FileAlignment>512</FileAlignment>
<TargetPlatformVersion>8.1</TargetPlatformVersion>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<ValidateFrameworkCompatibility>false</ValidateFrameworkCompatibility>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\Microsoft.Toolkit.Uwp.UI.Controls.DataGrid\bin\Debug\uap10.0.17763\Design\</OutputPath>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>..\Microsoft.Toolkit.Uwp.UI.Controls.DataGrid\bin\Release\uap10.0.17763\Design\</OutputPath>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<Optimize>true</Optimize>
<DefineConstants>TRACE</DefineConstants>
<TargetFramework>net472</TargetFramework>
<RootNamespace>Microsoft.Toolkit.Uwp.UI.Controls</RootNamespace>
</PropertyGroup>

<PropertyGroup>
<AssetTargetFallback>$(AssetTargetFallback);uap10.0.17763</AssetTargetFallback>
<AssemblyTitle>Windows Community Toolkit - DataGrid Control (Design)</AssemblyTitle>
<Description>Design time support for Windows Community Toolkit DataGrid Control</Description>
</PropertyGroup>

<ItemGroup>
<Reference Include="System.Runtime" />
<Reference Include="System.ObjectModel" />
<Reference Include="System.Runtime.WindowsRuntime" />
<Reference Include="System.Runtime.InteropServices.WindowsRuntime" />
<Reference Include="Microsoft.VisualStudio.DesignTools.Extensibility">
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.DesignTools.Interaction">
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Windows, Version=255.255.255.255, Culture=neutral, processorArchitecture=MSIL">
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
<HintPath>$(MSBuildProgramFiles32)\Windows Kits\10\UnionMetadata\10.0.17763.0\Windows.winmd</HintPath>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup Label="WinRT References">
<Reference Include="System.Xaml" />
<Reference Include="System.Runtime.WindowsRuntime.UI.Xaml" />
<Reference Include="Windows.Foundation.FoundationContract">
<HintPath>$(MSBuildProgramFiles32)\Windows Kits\10\References\10.0.17763.0\Windows.Foundation.FoundationContract\3.0.0.0\Windows.Foundation.FoundationContract.winmd</HintPath>
<Aliases>WindowsRuntime</Aliases>
<Private>False</Private>
</Reference>
<Reference Include="Windows.Foundation.UniversalApiContract">
<HintPath>$(MSBuildProgramFiles32)\Windows Kits\10\References\10.0.17763.0\Windows.Foundation.UniversalApiContract\7.0.0.0\Windows.Foundation.UniversalApiContract.winmd</HintPath>
<Aliases>WindowsRuntime</Aliases>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\Microsoft.Toolkit.Uwp.UI.Controls.Core.Design\Common\Constants.cs" Link="Common\Constants.cs" />
<Compile Include="..\Microsoft.Toolkit.Uwp.UI.Controls.Core.Design\Common\MetadataRegistrationBase.cs" Link="Common\MetadataRegistrationBase.cs" />
<Compile Include="..\Microsoft.Toolkit.Uwp.UI.Controls.Core.Design\Common\PlatformTypes.cs" Link="Common\PlatformTypes.cs" />
<Compile Include="..\Microsoft.Toolkit.Uwp.UI.Controls.Core.Design\MetadataRegistration.cs" Link="MetadataRegistration.cs" />
<Compile Include="Controls\DataGrid.Metadata.cs" />
<Compile Include="Controls\DataGrid.Typedata.cs" />
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<AppDesigner Include="Properties\" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="..\Microsoft.Toolkit.Uwp.UI.Controls.DataGrid\bin\$(Configuration)\uap10.0.17763\Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.xml">
<Link>Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.xml</Link>
<Visible>False</Visible>
</EmbeddedResource>
<Compile Include="..\Microsoft.Toolkit.Uwp.UI.Controls.Core.Design\Common\*.cs" LinkBase="Common" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- No-op to avoid build error when packing solution from commandline -->
<Target Name="Pack" />

<Import Project="$(BuildToolsDirectory)Windows.Toolkit.VisualStudio.Design.targets" />

</Project>

This file was deleted.

Loading

0 comments on commit fe9f174

Please sign in to comment.