DevExpress-NuGet icon indicating copy to clipboard operation
DevExpress-NuGet copied to clipboard

Suggestion: A small change to how .Design files are handled.

Open boinst opened this issue 9 years ago • 6 comments

I see you've used a little trick of setting "CopyLocal" to "false" to deal with the ".Design" files. I think that can be improved upon a little. The .Design files don't need to be referenced at all by the project. It might be better to include them in the parent component (e.g. in the example below I've modified the Xpf.PropertyGrid package to include the .Design file), and make use of the "references" section to reference only the appropriate files. This strategy still seems to work in the editor in Visual Studio. The appropriate .Design file is discovered by the IDE, despite not being referenced.

<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
  <metadata>
    <id>Unofficial.DevExpress.Xpf.PropertyGrid</id>
    <version>14.1.7.0</version>
    <title>Unofficial.DevExpress.Xpf.PropertyGrid</title>
    <authors>Developer Express Inc.</authors>
    <owners>Caio Proiete</owners>
    <licenseUrl>https://www.devexpress.com/Support/EULAs/NetComponents.xml</licenseUrl>
    <projectUrl>https://www.devexpress.com/Subscriptions/DXperience.xml</projectUrl>
    <requireLicenseAcceptance>true</requireLicenseAcceptance>
    <description>DevExpress.Xpf.PropertyGrid.v14.1, Version=14.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</description>
    <summary>Unofficial.DevExpress.Xpf.PropertyGrid NuGet package</summary>
    <copyright>Copyright (C) 2000-2014 Developer Express Inc.</copyright>
    <tags>unofficial devexpress xpf propertygrid</tags>
    <dependencies>
      <group targetFramework=".NETFramework4.0">
        <dependency id="Unofficial.DevExpress.Xpf.Core" version="14.1.7.0" />
        <dependency id="Unofficial.DevExpress.Data" version="14.1.7.0" />
        <dependency id="Unofficial.DevExpress.Mvvm" version="14.1.7.0" />
      </group>
    </dependencies>
    <references>
        <reference file="DevExpress.Xpf.PropertyGrid.v14.1.dll" /><!-- by omitting the .Design.dll here, it will not be referenced in the project -->
    </references>
  </metadata>
  <files>
    <file src="lib\DevExpress.Xpf.PropertyGrid.v14.1.dll" target="lib\net40" />
    <file src="lib\DevExpress.Xpf.PropertyGrid.v14.1.xml" target="lib\net40" />
    <file src="lib\Design\DevExpress.Xpf.PropertyGrid.v14.1.Design.dll" target="lib\net40" />
  </files>
</package>

boinst avatar Oct 27 '14 05:10 boinst

Thanks @boinst. Seems like a good idea. I didn't know the .Design files were automatically discovered. The less references in the project, the better, and we can get rid of the install.ps1 hack.

augustoproiete avatar Oct 27 '14 14:10 augustoproiete

@boinst: Considering DevExpress just released v14.1.8, I'll re-generate these NuGet packages at some point this weekend. Wondering if you're planning on sending a PR for v14.1.7 with your proposed changes to the nuspec files, otherwise I'll do it myself. Either way, I'd love your help to test some of the packages if you have time.

augustoproiete avatar Nov 14 '14 03:11 augustoproiete

@CaioProiete I'd be happy to help test files. I don't have a PR, I was anticipating you'd prefer to make the change in your C# code. I'd be happy to do that during next week though, if you're keen.

boinst avatar Nov 14 '14 07:11 boinst

@boinst Great. No worries then, I'll update the C# app and generate both versions, and let you know through here.

augustoproiete avatar Nov 15 '14 03:11 augustoproiete

Hi @boinst, I've finally managed to spend some time with this, and the problem is that I couldn't find a reliable way to discover all the .Design assemblies that a particular component relies on - as they don't seem do reference them directly.

I can guess the relationship based on the name of the main component, but that is not 100% accurate...

Any ideas?

augustoproiete avatar Feb 08 '15 05:02 augustoproiete

Probably you would want to write your own property bag file out that contains this information, so that as the framework evolves, you can just store these Facts somewhere.

wpostma avatar Feb 23 '17 14:02 wpostma