Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
boinst opened this issue Oct 27, 2014 · 6 comments
Open

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

boinst opened this issue Oct 27, 2014 · 6 comments

Comments

@boinst
Copy link

boinst commented Oct 27, 2014

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>
@augustoproiete
Copy link
Owner

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
Copy link
Owner

@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.

@boinst
Copy link
Author

boinst commented Nov 14, 2014

@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.

@augustoproiete
Copy link
Owner

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

@augustoproiete
Copy link
Owner

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?

@wpostma
Copy link

wpostma commented Feb 23, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants